-
Notifications
You must be signed in to change notification settings - Fork 314
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
base: main
Are you sure you want to change the base?
Show message content, sender, and timestamp in message action sheet #1624
Conversation
We're about to put a MessageContent in the action sheet itself, for zulip#217.
We're about to give _showActionSheet a `Widget? header` param, which we'll place as a child of this new Column.
For explicitness. All three callers are already passing a "page context" i.e. the result of PageRoot.contextOf.
This also mitigates #1142 because it gives a way to see one message by itself. |
There was a problem hiding this 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, |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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))), |
There was a problem hiding this comment.
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
8bc6031
to
6a2649a
Compare
Thanks! I've added TODOs for all those points. |
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 @ 💬
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 @ 💬
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.