Unify the two image viewers: timeline ImageViewer should open the gallery lightbox at that item #219

Closed
opened 2026-09-18 21:31:31 -04:00 by jared · 1 comment
Owner

From the #164 audit. The client ships two different full-screen viewers: the gallery lightbox (MediaGallery.tsx: dark backdrop, sender + date, 1/N counter, ←/→ between the room's media, +/-/0, double-click, download, jump to message) and the timeline ImageViewer (components/image-viewer: light grey backdrop, file name only, no prev/next, no sender/time, no jump). Clicking an image in the timeline should open the same lightbox positioned at that event (the detached media timeline from #163 already knows the room's media), so behaviour, keys and look are identical everywhere; the small ImageViewer then only remains for avatars (UserHero). Includes: dark backdrop, video support in the timeline viewer, pinch-zoom on touch (neither viewer supports it — buttons only).

From the #164 audit. The client ships two different full-screen viewers: the **gallery lightbox** (`MediaGallery.tsx`: dark backdrop, sender + date, 1/N counter, ←/→ between the room's media, +/-/0, double-click, download, jump to message) and the **timeline `ImageViewer`** (`components/image-viewer`: light grey backdrop, file name only, no prev/next, no sender/time, no jump). Clicking an image in the timeline should open the same lightbox positioned at that event (the detached media timeline from #163 already knows the room's media), so behaviour, keys and look are identical everywhere; the small `ImageViewer` then only remains for avatars (UserHero). Includes: dark backdrop, video support in the timeline viewer, pinch-zoom on touch (neither viewer supports it — buttons only).
jared added this to the Features 2026-Q4 milestone 2026-09-18 21:31:31 -04:00
jared added the enhancementpriority: mediumuxarea: media labels 2026-09-18 21:31:31 -04:00
Author
Owner

Done in f111b3c9: clicking an image in the room or thread timeline opens the gallery lightbox positioned at that event — dark backdrop, sender + date, 1/N counter, ←/→ across the room's media, +/-/0 and wheel/double-click zoom, download, jump to message — identical keys and look to Media Gallery.

RoomMediaLightbox feeds it from the same detached media timeline as the gallery (#163). If the clicked event isn't in the loaded window yet, it pages back (bounded, 6 pages) and shows the clicked image alone in the meantime, so the viewer opens instantly. ImageContent gained onOpenViewer; its small built-in viewer remains only where there is no room media context (stickers, search results, pins, notifications, avatars in UserHero).

Verified headless: click → "Media viewer" dialog focused, counter 1 / 2, + → 120 %, Jump to message present, Esc closes; an older image ten pages up → found at 10 / 45 after paging.
lightbox

Not done from the wish-list: pinch-zoom on touch (neither viewer has it; still buttons/wheel/double-tap) — happy to add as a follow-up if wanted.

Done in `f111b3c9`: clicking an image in the room *or thread* timeline opens the gallery lightbox positioned at that event — dark backdrop, sender + date, 1/N counter, ←/→ across the room's media, +/-/0 and wheel/double-click zoom, download, jump to message — identical keys and look to Media Gallery. `RoomMediaLightbox` feeds it from the same detached media timeline as the gallery (#163). If the clicked event isn't in the loaded window yet, it pages back (bounded, 6 pages) and shows the clicked image alone in the meantime, so the viewer opens instantly. `ImageContent` gained `onOpenViewer`; its small built-in viewer remains only where there is no room media context (stickers, search results, pins, notifications, avatars in UserHero). Verified headless: click → "Media viewer" dialog focused, counter 1 / 2, `+` → 120 %, Jump to message present, Esc closes; an older image ten pages up → found at 10 / 45 after paging. ![lightbox](https://code.lotusguild.org/attachments/b910d565-4b92-4bf7-9e26-21f930e482b9) Not done from the wish-list: pinch-zoom on touch (neither viewer has it; still buttons/wheel/double-tap) — happy to add as a follow-up if wanted.
jared closed this issue 2026-09-19 13:15:04 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: LotusGuild/cinny#219