Add a developer option and selection mode for timeline messages - #6102
Open
Velin92 wants to merge 4 commits into
Open
Add a developer option and selection mode for timeline messages#6102Velin92 wants to merge 4 commits into
Velin92 wants to merge 4 commits into
Conversation
First step of the multi-select messages feature (element-meta#3255, iOS counterpart of element-x-android#6918). Everything is gated behind the new `messageMultiSelectEnabled` developer option and nothing changes while it is off. - Adds a "Select" action to the timeline item menu for remote messages in the room, focused and thread timelines. Choosing it enters selection mode with that message selected. - While selecting, every bubbled row shows a checkbox on its leading edge and tapping or long pressing a row toggles it. State events, redacted messages, live locations, unsupported events and local echoes cannot be selected and stay inert. Selected rows get the accent background. - The navigation bar swaps to a Cancel button and an "N selected" title, the back button is hidden and the composer is removed until the selection ends (Cancel or deselecting the last item). This is the hook where the bulk action bar will land in the next PR. - The selection is capped at 30 messages, showing a toast when the cap is hit, and is cleared if the developer option is switched off. - The selection state lives in `TimelineViewModel` so room and thread timelines share the behaviour without extra plumbing. Includes unit tests for the menu action gating and the selection state transitions, plus RoomScreen and bubble styler previews for the new state.
Velin92
marked this pull request as draft
September 3, 2026 14:32
pixlwave
removed their request for review
September 4, 2026 07:55
Velin92
marked this pull request as ready for review
September 4, 2026 08:25
- Reconcile the selection with timeline updates: selected messages that become unselectable (e.g. redacted) are dropped, and the selection is cleared when the timeline is swapped for a focused or live one, so the count can never refer to items that aren't on screen. - Keep the composer mounted but collapsed while selecting, instead of removing it from the hierarchy. This preserves the draft and composer mode and avoids the disappear side effects. The footer with the identity warnings stays visible. - Give the long press modifier an `isEnabled` flag so the recogniser is disabled while selecting, rather than only skipping the action while still animating and buzzing. - Gate the Mac context menu on the selection like the other gestures. - VoiceOver: a selectable bubble becomes a button carrying the selected trait whose default action toggles it, non-selectable rows lose their message actions while selecting, and reactions, thread summaries and the checkbox are hidden from the accessibility tree in selection mode.
The composer is collapsed rather than removed while selecting, so an in-progress recording would otherwise keep the microphone open out of sight. Entering the selection now stops the recording, which moves the composer to the preview state so the message is still there to play or send once the selection ends. Playback of voice messages is unaffected.
The selection strings have been imported to Localazy, so the untranslated placeholders are dropped in favour of `action_select`, `screen_room_maximum_messages_selected` and the `screen_room_selection_count` plural. Only these keys are taken from the download to keep the change focused.
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.
First step of the multi-select messages feature (element-meta#3255, iOS counterpart of element-x-android#6918).
Simulator.Screen.Recording.-.iPhone.17.-.2026-09-03.at.16.53.01.mov