Improve multi-screenshot composer workflow#33609
Conversation
Stage pasted or dropped images in the composer, use the normal composer text as shared media context, and render same-send image batches as one coherent timeline group while preserving standard Matrix media events. Refs element-hq/element-meta#3231
|
Note for maintainers: I do not have label permissions on this repository. The Preview Changelog check appears to require a changelog/type label; this should likely be |
Well I did already, it’s working on my laptop for weeks now, I wanted to share what I did. I’m quite new in this PR thing |
|
Even if it works for you right now (it will stop working once the gallery implementation gets merged), your implementation won't be interoperable with other Matrix clients, including the upcoming gallery implementation in Element X, as you (or probably Claude) reinvented the gallery feature without any documentation/discussion. |
Summary
This draft PR implements the full multi-screenshot composer workflow proposed in element-hq/element-meta#3231:
m.image) under the hood;This is opened as a draft because the product/design direction should be confirmed first. If maintainers prefer smaller review units, I can split the implementation into composer-side staging first and timeline grouping second while keeping the same product goal.
Why
Desktop users frequently paste/drop several screenshots while explaining a bug, support case, design review, or technical workflow. The explanation usually belongs to the whole screenshot set, not to each image independently.
This PR keeps the protocol-compatible media-event model while improving the sender and receiver UX in Element Web/Desktop.
Event compatibility
The implementation keeps sending standard
m.room.messagemedia events withmsgtype: "m.image".For same-send image batches, it adds an extra namespaced content object:
Clients that do not understand this key should continue to display normal media events. Element uses it only to group consecutive same-sender, same-batch image events in the timeline.
UI behavior
Tests run
Local verification on this branch:
Notes
Notes: Add a multi-screenshot composer workflow that stages pasted/dropped screenshots, uses the normal composer text as shared context, and groups same-batch screenshots in the timeline while preserving standard Matrix media events.