element-hq / element-meta

Shared/meta documentation and project artefacts for Element clients
65 stars 11 forks source link

Editing messages: allow moving them into/between threads #2442

Open omichalek opened 3 weeks ago

omichalek commented 3 weeks ago

Your use case

What would you like to do?

Just as one can edit past messages (posts), it would be great to be able to organize them into threads retroactively.

Why would you like to do it?

Some use cases:

The benefits

I think it would actually benefit the thread functionality and alleviate the mental overhead of having to think of where to post messages before one even starts writing them. (I believe for most users this is the greatest obstacle to using threads in general.) If there was no downside to not selecting a thread at the moment of writing, the organicity of a live chat would not be compromised, while the benefits of organizing information and topics into threads would become more accessible.

How would you like to achieve it?

I don't know how threads work. I assume there is a link inside each message pointing to a thread, if so, I would like the ability to add/edit/delete these links.

Have you considered any alternatives?

I sometimes copy URL of a message to reference it inside a thread (or another conversation). This however does make it possible to organize the main feed ex post. Additionally the message linked in new thread is not shown either.

Additional context

I do not feel the need for it but (the sequence of) messages moved from their previous place could be replaced by a note akin to the "🗑 Message deleted", possibly with a link to the message in its new location. Any placeholder, especially when replacing a sequence of messages, should however take up less space than the original messages for this to make any sense.

bkil commented 3 weeks ago

As a proof of concept, did you try to hit the API endpoint via curl to post an edit event that contains the new JSON with the thread relationship inserted? Does your client render it correctly? Then no placeholder would be needed at all. You can check the JSON of a normal event vs. one within the thread via the ... -> view source button (you may have to enable development mode) to see the difference you need to make.