-
Notifications
You must be signed in to change notification settings - Fork 183
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
channel_list: All channels screen #832
base: main
Are you sure you want to change the base?
Conversation
e4fecd9
to
a0c2bb2
Compare
a0c2bb2
to
9a12a3e
Compare
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 @Khader-1!
Overall looks great, just some comments.
9a12a3e
to
75d75c1
Compare
Thanks @rajveermalviya! I've pushed a new revision PTAL. |
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 the revision!
This looks good to me, moving on to the mentor review from @kenclary.
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.
lgtm
We use sentence case throughout the Zulip app. So, "All channels", rather than "All Channels". |
Can you please include screenshots with the subscribed/unsubscribed messages? It's difficult to review text on a video. |
75d75c1
to
c567e9e
Compare
Thanks @rajveermalviya, @kenclary and @alya for the reviews! Moving on for maintainer review now. |
c567e9e
to
d1a1c59
Compare
(Thanks for making this update! I definitely appreciate when someone takes a comment from one PR and proactively applies it to other open PRs where it'd be relevant.) |
@alya some of the snackbar messages have exclamation marks in them; do we want to keep those? Not sure what our pattern is for ending punctuation. Maybe they should even all have a period. |
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.
Also, since we now have a dark theme (since #867 🎉), please update this to provide a dark-theme variant, and post screenshots of that. Since there isn't something we can really follow in the Figma or the web app, I expect each color will need one of these TODOs:
// TODO(design-dark) need proper dark-theme color (this is ad hoc)
(if you've chosen the dark-theme color yourself)
or
// TODO(design) check if this is the right variable
(if you've used a Figma design variable)
For examples, see c6abaf9.
@@ -363,6 +363,13 @@ | |||
"num": {"type": "int", "example": "4"} | |||
} | |||
}, | |||
"browseMoreNChannels": "Browse {num, plural, =0{all channels} =1{1 more channel} other{{num} more channels}}", | |||
"@browseMoreNChannels": { | |||
"description": "Label showing the number of other channels that user can subscribe to", |
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.
When first reading this, I couldn't understand the =0{all channels}
variant within the context of this description, until I look at where this text appears in the app. I would expect something like =0{no other channels}
by looking at this description alone.
I think we should mention that this is the label for the button that shows all channels.
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.
Because now we have a separate rule, the =0
variant can be dropped.
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.
Read the commits up to d16b58f, and left some comments.
For the confirmation notices:
|
For the exception ones, it seems like we're showing too much to the user. If it's not going to cause us difficulties investigating, I'd leave off the everything in the parentheses. |
d1a1c59
to
f816da7
Compare
f816da7
to
41de1fc
Compare
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 the revision! Some small nits from me, then I think @PIG208 will want to check this new revision against his review. Also see Alya's open comments at #832 (comment) and right after.
Widget build(BuildContext context) { | ||
final designVariables = DesignVariables.of(context); | ||
return Material( | ||
color: designVariables.background, |
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.
color: designVariables.background, | |
// TODO(design) check if this is the right variable | |
color: designVariables.background, |
lib/widgets/subscription_list.dart
Outdated
final notShownStreams = store.streams.length - store.subscriptions.length; | ||
final zulipLocalizations = ZulipLocalizations.of(context); | ||
final label = notShownStreams != 0 | ||
? zulipLocalizations.browseMoreNChannels(notShownStreams) |
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.
? zulipLocalizations.browseMoreNChannels(notShownStreams) | |
? zulipLocalizations.browseNMoreChannels(notShownStreams) |
(sounds more natural, given that the string could be e.g. "Browse 6 more channels".)
lib/widgets/channel_list.dart
Outdated
const SizedBox(width: 8), | ||
_ChannelItemSubscriptionToggle(stream: stream, channelItemContext: context), |
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.
const SizedBox(width: 8), | |
_ChannelItemSubscriptionToggle(stream: stream, channelItemContext: context), | |
const SizedBox(width: 8), | |
_ChannelItemSubscriptionToggle(stream: stream, channelItemContext: context), |
test/widgets/channel_list_test.dart
Outdated
} | ||
|
||
void checkItemCount(int expectedCount) { | ||
check(find.byType(ChannelItem).evaluate().length).equals(expectedCount); |
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:
check(find.byType(ChannelItem).evaluate().length).equals(expectedCount); | |
check(find.byType(ChannelItem).evaluate()).length.equals(expectedCount); |
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 the revision! Just took a quick look again. Reopened two previous comments and left another small one.
This creates the page that contains all channels list, still we need to implement subscribe/unsubscribe logic which will be introduced in the upcoming commits. Fixes parts of zulip#188
41de1fc
to
846174a
Compare
846174a
to
368ad56
Compare
Thanks @alya, @chrisbobbe and @PIG208 for the reviews!
I tried to use privacy icon but I could not find a direct way to inline the icon within the message text with proper wrapping. I'd love to hear any suggestion from Chris or Zixuan on how to do that.
I wrote them down. I tried to get the same as strings as mobile but I believe mobile shows a snackbar only if it fails to subscribe. |
Ok, please start a discussion in #mobile regarding what these strings should be. You can post a list of situations where messages are shown and your suggested strings (with |
Try using a |
Fixes: #188
Simulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2024-07-28.at.17.56.09.mp4