Skip to content

Add a developer option and selection mode for timeline messages - #6102

Open
Velin92 wants to merge 4 commits into
developfrom
mauroromito/multi-select-selection-mode
Open

Add a developer option and selection mode for timeline messages#6102
Velin92 wants to merge 4 commits into
developfrom
mauroromito/multi-select-selection-mode

Conversation

@Velin92

@Velin92 Velin92 commented Sep 3, 2026

Copy link
Copy Markdown
Member

First step of the multi-select messages feature (element-meta#3255, iOS counterpart of element-x-android#6918).

  • 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
  • Unit tests for the menu action gating and the selection state transitions, plus RoomScreen and bubble styler previews for the new state.
Simulator.Screen.Recording.-.iPhone.17.-.2026-09-03.at.16.53.01.mov

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
Velin92 requested a review from a team as a code owner September 3, 2026 14:32
@Velin92
Velin92 requested review from pixlwave and removed request for a team September 3, 2026 14:32
@Velin92
Velin92 marked this pull request as draft September 3, 2026 14:32
@pixlwave
pixlwave removed their request for review September 4, 2026 07:55
@Velin92 Velin92 added the pr-feature for a new feature label Sep 4, 2026
@Velin92
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-feature for a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant