Skip to content

Show message content, sender, and timestamp in message action sheet #1624

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

chrisbobbe
Copy link
Collaborator

@chrisbobbe chrisbobbe commented Jun 24, 2025

Fixes #217.

We've had some complaints about not being able to see the timestamps of messages in a run of messages from the same sender, e.g.:

#mobile > Sent time not visible @ 💬

There is a "message sent" time shown in an upper right hand corner of the message. But when the messages are sent by bot, the time is only shown for the first message of the day. The old android app at least shown the time when tapped on the message, but I haven't found a way how to display the time here.

We have #457 for how to offer that in a really quick interaction. But this PR lets you get that information, and it aligns with a different part of the Figma, namely #217. As discussed: #mobile > Sent time not visible @ 💬

Light Dark
image image
image image
image image

This revision leaves the message completely interactable; you can open images in the lightbox, open and close spoilers, etc.; that seemed most straightforward to implement. It does not implement text selection of the content; that's requested in the Figma, and #10 is for that, and I've left a TODO for it.

@chrisbobbe chrisbobbe added the maintainer review PR ready for review by Zulip maintainers label Jun 24, 2025
@chrisbobbe
Copy link
Collaborator Author

This also mitigates #1142 because it gives a way to see one message by itself.

Copy link
Member

@rajveermalviya rajveermalviya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this @chrisbobbe!

This looks and works great for me, one small comment below.

SizedBox(height: 8),
if (header != null)
Flexible(
flex: 1,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The figma design says:

Menu should grow until it fits the whole screen

But currently it doesn't, so maybe let's have a TODO for it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah; there's a note on #1077 that's relevant:

(TODO upstream issue)
Richer Flex (aka Row and Column), with more CSS flexbox features like flex-basis vs flex-grow vs flex-shrink. (This is one of the few things we miss from React Native: its Yoga layout engine has those features.)
We probably need something like this for: [etc.]

padding: const EdgeInsets.symmetric(horizontal: 16),
// TODO(#10) offer text selection; the Figma asks for it here:
// https://www.figma.com/design/1JTNtYo9memgW7vV6d0ygq/Zulip-Mobile?node-id=3483-30210&m=dev
child: MessageContent(message: message, content: parseMessageContent(message))),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of things I noticed with interactions in the message content:

  • There was no hero animation when opening an image.
  • Clicking on a narrow link, would open the narrow, but wouldn't close the action sheet (which we do for some for some cases).

Neither seem blocker for this feature though.

See Figma:
  https://www.figma.com/design/1JTNtYo9memgW7vV6d0ygq/Zulip-Mobile?node-id=3483-29966&m=dev

See also a different header variant in Figma:
  https://www.figma.com/design/1JTNtYo9memgW7vV6d0ygq/Zulip-Mobile?node-id=3481-26993&m=dev

At first I'd thought this wouldn't be possible without more work
toward issue zulip#488:

- zulip#488 "content: Support Zulip content outside messages (even
  outside per-account contexts)".

But it turns out that our content widgets don't assume a MessageList
ancestor; it's sufficient that we provide a per-account context, via
PerAccountStoreWidget, and a per-message context, via
InheritedMessage (created by MessageContent).

Fixes: zulip#217
@chrisbobbe chrisbobbe force-pushed the pr-message-content-in-action-sheet branch from 8bc6031 to 6a2649a Compare June 26, 2025 07:17
@chrisbobbe
Copy link
Collaborator Author

Thanks! I've added TODOs for all those points.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintainer review PR ready for review by Zulip maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Show message text in bottom sheet
2 participants