Skip to content
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

action_sheet: Offer "Mark channel as read" in channel action sheet #1317

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

Conversation

chimnayajith
Copy link

Pull Request

Description

Adds a channel action sheet with a "Mark channel as read" option, accessible via long-press from both the inbox and subscription list pages. The action sheet is triggered by long-pressing on a channel header.

Related Issues

Screenshots

Additional Information

Currently the action sheet only appears in subscription list when the channel has unread messages, since the sheet doesn't have any default buttons.

@gnprice gnprice added the maintainer review PR ready for review by Zulip maintainers label Feb 4, 2025
Copy link
Collaborator

@chrisbobbe chrisbobbe left a comment

Choose a reason for hiding this comment

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

Thanks! Comments below.

assets/l10n/app_en.arb Outdated Show resolved Hide resolved
lib/widgets/action_sheet.dart Outdated Show resolved Hide resolved
lib/widgets/action_sheet.dart Outdated Show resolved Hide resolved
lib/widgets/action_sheet.dart Outdated Show resolved Hide resolved
lib/widgets/inbox.dart Outdated Show resolved Hide resolved
lib/widgets/action_sheet.dart Outdated Show resolved Hide resolved
test/widgets/action_sheet_test.dart Outdated Show resolved Hide resolved
@chimnayajith chimnayajith force-pushed the 1226-mark-stream-as-read branch 3 times, most recently from 0a8811a to 8a4937e Compare February 5, 2025 09:10
@chimnayajith
Copy link
Author

@chrisbobbe I’ve addressed all the requested changes. Please take a look. Thank you!

Copy link
Collaborator

@chrisbobbe chrisbobbe 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 the revision! Comments below.

lib/widgets/action_sheet.dart Outdated Show resolved Hide resolved
lib/widgets/icons.dart Show resolved Hide resolved
test/widgets/action_sheet_test.dart Outdated Show resolved Hide resolved
test/widgets/action_sheet_test.dart Outdated Show resolved Hide resolved
test/widgets/action_sheet_test.dart Show resolved Hide resolved
test/widgets/action_sheet_test.dart Outdated Show resolved Hide resolved
Comment on lines +336 to +340
@override
Future<void> onLongPress() async {
// TODO(#1272) action sheet for DM conversation
return;
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

bump on #1317 (comment) ; let me know if it doesn't make sense.

Copy link
Author

Choose a reason for hiding this comment

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

Couldn't figure this out. All the other changes have been pushed.

Continuing from the discussion in CZO added a commit 6791e61

@chimnayajith chimnayajith force-pushed the 1226-mark-stream-as-read branch 4 times, most recently from 06ed689 to 93d3199 Compare February 6, 2025 16:48
@chimnayajith chimnayajith force-pushed the 1226-mark-stream-as-read branch 2 times, most recently from 26973af to 5768d19 Compare February 7, 2025 08:22
chimnayajith added 3 commits February 8, 2025 00:29
…ct class

Move the high level operation markNarrowAsRead into
the new ZulipAction abstract class, per discussion in:
https://chat.zulip.org/#narrow/channel/516-mobile-dev-help/topic/.23F1317.20showErrorDialog/near/2080576

This makes it clearer at call sites that the methods combine API operations with UI feedback.
Figma doesn't specify this icon explicitly. Based on discussions in PR zulip#1274
(zulip#1274 (comment)),
we chose this icon for consistency with the "Mark as read" option on web.

reference: https://www.figma.com/design/1JTNtYo9memgW7vV6d0ygq/Zulip-Mobile?node-id=3512-7&t=iwirdCVutQls9R0A-4
@chimnayajith chimnayajith force-pushed the 1226-mark-stream-as-read branch from 5768d19 to da7af54 Compare February 7, 2025 19:00
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.

Offer "Mark channel as read" in channel action sheet
3 participants