Repository navigation
Add realistic media layouts, complete threads, and sharper video previews - #1
Merged
Merged
Conversation
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.
Previews previously discarded replies after the second thread item, hid attachments, and stretched small video posters. This change makes all content reachable while rendering multi-image posts in platform-specific feed layouts.
xMediaLayout: "grid"supports the classic feed variant.threadLayout: "scroll" | "expand"andmaxHeight(720px default). Decode original video frames without autoplay and prefer original image URLs. These changes are shared by vanilla, React, and Vue consumers.Run
yarn examplesand open http://127.0.0.1:5173/examples/. The demo includes a side-by-side platform comparison, count/shape/theme controls, both X layouts, a twelve-reply thread, and a local video-quality comparison.Research notes and source links document the chosen UI variants and fidelity boundaries. X's carousel rollout varies by client; Telegram uses a simplified justified album layout. Collage viewing deliberately stays inline rather than opening the platforms' full-screen lightboxes. Pinterest models its business carousel format; LinkedIn photo collages are distinct from document carousels. Supplied attachments above publishing limits remain inspectable and are not publishing validation.
Validation:
yarn checkpasses (build, type checks for all packages, 60 tests, package dry runs) andgit diff --checkpasses. Browser-verified Instagram arrow centers, X mouse dragging, keyboard navigation through every carousel, collage overflow and return, LinkedIn orientation, Bluesky/Telegram grids, light/dark styling, complete thread scrolling/expansion, and original video-frame decoding.Compatibility: previews default to a 720px scroll cap; use
threadLayout: "expand"for unconstrained height. Optional mediawidth/heightseed layout before images load. HTML-string consumers can callinitializePostPreview; direct rendering and adapters initialize automatically. YouTube and Forem retain their single video/cover layout. Video frame quality depends on source availability and browser codec support, with the poster retained until a frame decodes.