Repository navigation
Render the attachment carousel with a private headless carousel package instead of react-film - #5968
Closed
Eugene (OEvgeny) wants to merge 4 commits into
Closed
Eugene (OEvgeny) wants to merge 4 commits into
Eugene (OEvgeny) wants to merge 4 commits into
Conversation
added 4 commits
October 22, 2026 16:34
Props are validated with valibot in development builds instead of PropTypes, the activity is narrowed by type before reading message fields, and the component is memoized. No change in rendering.
@msinternal/botframework-webchat-component-carousel tracks a horizontally scrolling element and its items (overflow, edges, scrolling flag) and scrolls item by item, in LTR and RTL. It has no markup and no styles and will replace react-film in Web Chat.
The carousel uses the new headless carousel package and renders its own flippers (CarouselFlipper). Auto-center after a manual scroll becomes CSS scroll snapping (proximity). Flippers now appear after a resize without hovering, and are in logical order (previous, next) in RTL. The react-film__* class names are still emitted on the same elements, without styles. Tests and test helpers use the new class names.
Collaborator
Author
|
Doesn't seem wild, I'll continue on top of this branch. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog Entry
Changed
react-film, related to #5552, in PR #5968, by @OEvgenyDescription
react-filmimportsrenderfromreact-dom, adds ~14 KB gzip and its own emotion instance, and misses resizes. A private headless carousel package (1.8 KB gzip) now drives the attachment carousel; stage 2 moves suggested actions, stage 3 removesreact-film.Design
Defaults taken, each a question for review:
component-carouselinlined intocomponent, not code incomponent/src?react-film__*class names, unstyled and deprecated?scroll-snap-type: x proximity, notmandatoryor JS?Specific Changes
CarouselFilmStripto TSX only, 2 adds the package, 3 swaps react-filmcomponent-carousel:CarouselComposer, 5 hooks, specs for the scroll mathCarouselLayout,CarouselFlipper,CarouselFilmStrip(to TSX): same looks, existing snapshots unchanged, old class names keptflipperButton.resize.html: snapshots 1–3, flippers appear after narrowingautoCenter.html: snapshot 1, snapping centers card 2 after a wheel scrollflipperButton.tabOrder(.rtl).html: snapshots 1–4, card, button, "Previous", "Next".changelog/<PR#>-<slug>.mdReview Checklist
z-index)package.jsonandpackage-lock.jsonreviewed