element-hq / element-hq/element-meta

Message multi-select for bulk copy, forward and delete

Open
#3,255 2 comments 0 reactions 1 assignee Claimed by @mxandreas View on GitHub
Dominant language
No language data
Stars
112
Forks
25
Avg merge
6h 6m
Merged PRs (30d)
4

Description

### Description

* As a user
* I want to pick a few messages at once and act on them together
* So that I can copy, forward or delete them in one go instead of opening the action sheet for each one

Today you act on one message at a time through the action sheet. That is fine for a single message, but it gets tedious as soon as you want to forward part of a conversation, or delete several messages that are not next to each other. Telegram and Signal both let you tap a few messages and then copy, forward or delete them together, so it feels like something is missing here if you come from those apps.

I have a first version running on Android behind a Labs flag (off by default) in element-hq/element-x-android#6918. The interaction follows Telegram: long-press a message to start selecting, tap to add or remove, and a top bar holds the actions. It is the pattern most people already know. I have been using it daily in a fork for a while now and it has held up well. Before taking it further I would like to agree the behaviour across clients, so product and design can have a say.

On the limit: I set it to 30 for now. Forward and delete each send one request per message, throttled slightly to stay under the homeserver rate limit, so a large batch becomes a long run of sequential calls. 30 covers what I had in mind while staying quick. It is a starting point, not a hard requirement.

# Acceptance criteria
- You start selection from the "Select" entry in the message menu. For media that is the way in, since a long-press there already opens the menu.
- A long-press on a text message starts selection straight away.
- While selecting, tapping a message adds or removes it, and a checkbox shows what is picked.
- A top bar shows how many messages are selected and offers Copy, Forward and Delete.
- Only real messages can be selected. State events (joins, leaves, name and avatar changes), call notifications and already-deleted messages are skipped, so they cannot be swept into an action by accident.
- Copy joins the selected text messages together. Non-text messages in the selection are left out of the copied text.
- Forward sends the selected messages to one or more rooms (see element-hq/element-x-android#6520).
- Delete is gated by redaction permissions, on two levels. The button is only enabled when you are allowed to redact every message in the selection: your own messages need the redact-own power level, other people's need redact-others. If the selection holds even one message you cannot redact, Delete stays disabled rather than partially failing. On top of that, the redaction itself filters again and only ever touches the messages you are permitted to, so nothing can slip through.
- Selection is capped at 30 messages. Once you reach the cap, further taps are ignored.
- The selection survives rotation and process death.
- Everything runs on the active timeline, so it also works in threads and focused timelines.
- Nothing changes while the flag is off.

# Dependencies
- None

# Out of scope
- The press-and-drag gesture to sweep over a range of messages. It can come later as its own change.

# Open questions
- [ ] Which message types should be selectable, and should Copy keep quietly skipping non-text or behave differently?
- [ ] Visual design of the top bar and the selection indicator.

# Subtasks

### Android
- element-hq/element-x-android#6918

### iOS
-

### Web
-

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.