zulip-flutter icon indicating copy to clipboard operation
zulip-flutter copied to clipboard

Show edited/moved marker on messages

Open gnprice opened this issue 2 years ago • 6 comments

When a message has been edited or moved, Zulip web shows this with a small "EDITED" or "MOVED" marker. This can be important for understanding a conversation; we should do either the same thing or another way of conveying the same information.

The Help Center describes this feature on the following page: https://zulip.com/help/view-a-messages-edit-history though that page also covers showing the details of the edits or moves, which is a separate issue #531.

UI design

See first comments below, and see this later chat thread: https://chat.zulip.org/#narrow/stream/48-mobile/topic/check-x.20icons.20in.20left.20margin/near/1908288

Implementation

We don't currently store the information of whether and how a message has been edited or moved. The first phase of work on this issue will be to start storing and maintaining that information. This will involve adding a field to the Message class, and then updating that field as appropriate in response to events.

Concretely, this field should look like MessageEditState edited; where MessageEditState is an enum with three values: none, moved, and edited. In other words it will store only the information needed to control the edited/moved marker; storing the full edit history is out of scope for this issue (and will be left for #531).

After that we can start showing the information in the UI.

Related issues

These related features are all out of scope for this issue:

  • #126
  • #530
  • #531

(The details of the edits or moves can be important information too, but for a lot of purposes just the fact that the message was edited or moved, or the ability to confirm that it wasn't, is very helpful.)

Note that some of these have the "Post-launch" milestone — those are things we expect to get to much later than this issue.

gnprice avatar Jun 09 '23 00:06 gnprice

The main idea was to use the left gutter to put a small icon of edited or moved + allow to swipe/drag the message horizontally to reveal full label: image This design isn't final, but let me know what do you think about interaction. Would it be hard to do or not?

terpimost avatar Dec 04 '23 02:12 terpimost

Interesting, thanks.

I think that gesture should be doable from the implementation side. There may not be anything drop-in we can use for the whole swipe interaction; but we can give each message a GestureDetector that responds to onHorizontalDragStart and its update/end/etc. friends, and build the interaction out of those pieces.

(There is a drop-in implementation for "drag". But that's for a gesture that starts by long-pressing a thing to pick it up; I don't think it's designed for this use case.)

gnprice avatar Dec 04 '23 02:12 gnprice

Hi, I've been working on this issue and I've partially implemented the Edit marker, using Greg's suggestion (GestureDetector responding to onHorizontalDragStart). I'd like to work on the UI and complete the implementation, it would be great if you could assign the issue to me.

Image

This is how it looks so far.

fizy069 avatar Feb 23 '24 21:02 fizy069

For ease of reference: here's the spot in @terpimost's Figma design that I think corresponds to the screenshot he posted above: https://www.figma.com/file/1JTNtYo9memgW7vV6d0ygq/Zulip-Mobile?node-id=538-21662 (That screen for "edited", and the next one to the right for "moved".)

gnprice avatar Mar 04 '24 21:03 gnprice

I've edited the description to be more specific that as part of this issue, we'll be storing only the information that the message was moved or edited, not all the details of the edit history.

There's a previous attempted PR for this at #543. For whoever picks this issue up next, feel free to consult that PR, but don't feel obligated to borrow code from it — it's fine to start writing your changes from scratch.

gnprice avatar May 13 '24 20:05 gnprice

Chat thread about the design for the markers: https://chat.zulip.org/#narrow/stream/48-mobile/topic/check-x.20icons.20in.20left.20margin/near/1908288

gnprice avatar Aug 11 '24 20:08 gnprice

This was resolved with #900 (a few weeks ago).

gnprice avatar Oct 08 '24 23:10 gnprice