element-hq / element-hq/element-meta
[Feature] Media and files: in-timeline preview without permanent download + consistent Media/Files gallery
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 112
- Forks
- 26
- Avg merge
- 6h 6m
- Merged PRs (30d)
- 4
Description
#### What would you like to do?
Preview files directly in the timeline and via **Room info -> Media and files** without requiring a permanent download. On Element X (Android + iOS): tap on image / video / PDF / text -> fullscreen native preview with swipe, Office (docx/xlsx/pptx) and zip -> system QuickLook / Open with on a temp cache (mxc:// buffered to sandbox, no Save to Files/Photos by default). Media tab = m.image / m.video / m.gallery, Files tab = m.file / m.audio. This is cross-platform (element-meta tracking issue).
#### Why would you like to do it?
- On Element Web, docx forces Download to disk; on Element X the file must be openable without that step.
- Users look for a recent image.png (m.image) in **Files**, but Element Web Files filters m.file only — expected that it appears in **Media** instead. On Element X phone it should be clearly in **Media** tab. Current confusion looks like a bug.
- Element X has no sidepanel/widget engine (element-meta#1915: No Integrations / Widgets / Matrix apps, No message search), so a custom sidepanel without forking Android+iOS is not possible. We want the native gallery/preview to cover the need.
- Covers room !JpfVweBAogOuHfYAEs:matrix.mettaway.voyage on matrix.mettaway.voyage with image.png (blob vector from @ardjo:matrix.org) and Current overview docx (17.7 KB) from @linalane:matrix.mettaway.voyage — verified 2026-08-17: timeline shows both inline, Room info -> Files lists only docx (image correctly in Media on X).
#### How would you like to achieve it?
Reuse existing native preview, no fork / no widget / no homeserver route:
- Android: libraries/mediaviewer/impl/.../LocalMediaView.kt:45-82 already dispatches image->MediaImageView, video->MediaVideoView, text->TextFileView, pdf->MediaPdfView (PdfRendererManager), audio->MediaAudioView, else->MediaFileView + Open with; cache via MatrixMediaLoader temp. Gallery via MediaGalleryState.kt / JoinedRustRoom.kt:198-217 (TimelineFilter.OnlyMessage).
- iOS: FilePreviewScreen/InteractiveQuickLook.swift / QLPreviewController, MediaEventsTimelineScreenCoordinator with allowedMessageTypes [.image,.video,.gallery] vs [.file,.audio,.gallery].
- Keep patch surface minimal: only MIME handling in LocalMediaView / InteractiveQuickLook if a gap is found during Phase 2 phone validation (tap in timeline + via Media and files, both tabs, pdf/txt without Save). No Synapse /last-30-days (client paginateBackwards + origin_server_ts filter), no LibreOffice conversion proxy.
Runbook: https://app.notion.com/p/3bf8ef36324d81ef9ee5d49f68bd8969
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with Android's libraries/mediaviewer/impl/.../LocalMediaView.kt and MediaGalleryState.kt, then review JoinedRustRoom.kt:198-217; on iOS, read FilePreviewScreen/InteractiveQuickLook.swift and MediaEventsTimelineScreenCoordinator. Run the Phase 2 phone validation from the issue for timeline and Media and files previews, and consider the work done when the listed file types open from both tabs without a permanent download.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, ios, kotlin, swift
- Domain
- mobile
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100