Skip to content

Add realistic media layouts, complete threads, and sharper video previews - #1

Merged
haltakov merged 2 commits into
mainfrom
feat/media-carousel-thread-layout
Sep 22, 2026
Merged

haltakov merged 2 commits into
mainfrom
feat/media-carousel-thread-layout

Conversation

@haltakov

@haltakov haltakov commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

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.

  • Instagram: vertically centered overlay arrows, upper-right counter, and pagination dots below the media.
  • X: arrow-free swipeable cards with dots above and a visible next image; xMediaLayout: "grid" supports the classic feed variant.
  • Threads: rounded horizontal cards with a next-card peek. TikTok: swipeable portrait photo mode with overlaid dots. Pinterest: carousel Pin controls.
  • Bluesky: native 2/3/4-image grid geometry, checked against the official app source. Telegram: tiled albums. Facebook and LinkedIn: photo collages with overflow counts; LinkedIn responds to the first image's orientation.
  • Collage tiles open an inline album viewer so all attachments remain accessible, with Back/Escape and focus restoration. Support touch/trackpad scrolling, mouse dragging, and keyboard navigation.
  • Render every thread reply; add threadLayout: "scroll" | "expand" and maxHeight (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 examples and 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 check passes (build, type checks for all packages, 60 tests, package dry runs) and git diff --check passes. 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 media width/height seed layout before images load. HTML-string consumers can call initializePostPreview; 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.

@haltakov haltakov changed the title Add media carousels, complete threads, and sharper video previews Add realistic media layouts, complete threads, and sharper video previews Sep 22, 2026
@haltakov
haltakov merged commit 484aa4a into main Sep 22, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant