Group consecutive attachments in feed posts into horizontal scroll - #18
Merged
Merged
Conversation
A post's attachment events (image/video/audio/file) now group into one horizontally scrollable row instead of stacking vertically, so a multi-attachment post reads like a carousel. Text/caption events keep their normal stacked layout. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Gm3fUenbkKEw2B3xHkwVJe
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.
Description
This change improves the presentation of feed posts containing multiple consecutive attachments (images, videos, audio, files) by grouping them into a single horizontally scrollable container, rather than displaying them vertically stacked.
What changed:
feedAttachmentRuns.tswith logic to classify events as attachments and group consecutive attachment/non-attachment events into "runs"FeedPostCard.tsxto use the new grouping logic and render multi-attachment runs in a horizontalScrollcomponent from thefoldsdesign systemWhy:
This provides better UX for posts with galleries of images or multiple media items, allowing users to browse them horizontally without excessive vertical scrolling, while keeping text and single media items in their natural flow.
Testing:
Added comprehensive unit tests in
feedAttachmentRuns.test.tscovering:All tests pass.
Fixes #
https://claude.ai/code/session_01Gm3fUenbkKEw2B3xHkwVJe