- Notifications
You must be signed in to change notification settings - Fork 369
action: Add dialog to markNarrowAsRead for CombinedFeedNarrow view #2006
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
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! Comments below.
1de2a51 to 970aee6 Compare | @chrisbobbe Thanks for reviewing! Squash the 4 commits into one.
|
That's not accurate. We should show the dialog when the narrow is not a conversation narrow. A "conversation narrow" is a topic narrow or a DM narrow; see e.g. the top of the Zulip Help Center "Reading conversations" article. These details are provided for you in the issue description and discussions linked from there. In the zulip-flutter codebase, there are multiple kinds of |
1613f50 to f0bf130 Compare
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! Comments below.
Since the issue is about the mark-as-read button at the bottom of the message list, I'd like to have some tests in the 'MarkAsReadWidget' group in test/widgets/message_list_test.dart that explicitly target the behavior. (I see you've already made some changes to existing tests there, basically as needed to make them pass.)
How about a new group('confirmation dialog', () {}); inside the 'MarkAsReadWidget' group, with tests like these:
test('CombinedFeedNarrow: show dialog', () {});test('MentionsNarrow: show dialog', () {});test('ChannelNarrow: show dialog', () {});test('DmNarrow: do not show dialog', () {});test('TopicNarrow: do not show dialog', () {});
For the 'do not show dialog' tests, you should be able to use the checkNoDialog helper in test/widgets/dialog_checks.dart.
test/widgets/message_list_test.dart Outdated
| return checkSuggestedActionDialog(tester, | ||
| expectedTitle: zulipLocalizations.markAllAsReadConfirmationDialogTitle, | ||
| expectedMessage: zulipLocalizations.markAllAsReadConfirmationDialogMessage(unreadCount), | ||
| expectDestructiveActionButton: true, |
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.
Why expectDestructiveActionButton: true?
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.
Set to false. Read can be reverted.
1f1b5ab to a595644 Compare A confirm ActionDialog is added to prevent accidentally marking many messages as read outside conversation views. Also, adjust existing MarkAsReadWidget tests and MarkChannelAsReadButton tests to account for the added confirmation dialog. Fixes: zulip#1858.
a595644 to ef8f94f Compare ef8f94f to a2042c6 Compare | Thanks @chrisbobbe! it's ready for another review. |
Fixes: #1858
Still picture
Screencasts
combined feed narrow
combined_feed_sc.mp4
channel narrow
channel_sc.mp4
mentions narrow
mention_sc.mp4