-
Notifications
You must be signed in to change notification settings - Fork 370
message list: Add (you) indicator for self user in DM conversations #2019
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?
Conversation
20d2bbe to
c8cf146
Compare
|
Fixes #1320. SummaryThis PR adds a localized “(you)” indicator next to the self user’s display Main changes
Test updates
All tests pass locally. Ready for review |
c8cf146 to
1af1048
Compare
|
This sounds familiar; is there an issue in the tracker about this? Please change the commit message and PR description so that they both refer to the issue, according to the project style. That way, when reviewing, we can compare your work to the requirements. |
Yes — the related issue is #1320. |
1af1048 to
af69e30
Compare
|
Thanks! I see part of the issue description that looks like it's not yet implemented here:
Please do that (maybe try 50% opacity?) and update the screenshots to show what it looks like. |
af69e30 to
be6e33b
Compare
be6e33b to
598feb9
Compare
|
@chrisbobbe The label appears next to the user’s display name at 50% opacity using I’ve attached screenshots in both light mode and dark mode to show consistent rendering across themes.
|
chrisbobbe
left a comment
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! Here's a brief review of the app code; I haven't read the tests yet.
assets/l10n/app_en.arb
Outdated
| "youLabel": "(you)", | ||
| "@youLabel": { | ||
| "description": "Label shown after the current user's display name in direct messages." | ||
| }, |
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.
nit: make indentation consistent with surrounding code
assets/l10n/app_en.arb
Outdated
| }, | ||
| "youLabel": "(you)", | ||
| "@youLabel": { | ||
| "description": "Label shown after the current user's display name in direct messages." |
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.
nit: "Label shown after the self-user's name on the 'Direct messages' page."
| switch (narrow.otherRecipientIds) { // TODO dedupe with DM items in [InboxPage] | ||
| case []: | ||
| title = TextSpan(text: store.selfUser.fullName, children: [ | ||
| final youLabel = ZulipLocalizations.of(context).youLabel; |
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.
I'd like to organize the code differently:
- Make a helper function that takes a user ID and returns a
TextSpanwith all the appropriate elements: name, then status emoji if applicable, then "(you)" if applicable. - Use that helper function here and in the other cases.
I notice that status emojis aren't being shown in the group-DM case. This approach will cause them to be shown, which seems desirable. Since that's an independent behavior change, please make that happen in a separate commit from the commit that implements the "(you)" label.
| textScaler: MediaQuery.textScalerOf(context),),],);} | ||
| else { |
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.
Please pay attention to the style of the existing code—we don't say ),),],);} anywhere else. "Be tofu" 🙂
|
I see you've pushed some changes to the PR but I don't know if you intend it to be ready for another review. Please reply here to request another review when ready. Thanks! |
|
Hi @chrisbobbe , |


Fixes #1320.
What this PR changes
This PR adds a localized "(you)" marker after the current user's own
display name in the DM conversation list. This helps distinguish the
self-user from other participants in self-DMs and group DMs.
Screenshots
Before:

After:

Adding "(you)" improves clarity and matches common UX patterns.