-
Notifications
You must be signed in to change notification settings - Fork 375
Show archive icon for archived channels and add test (fixes #1992) #2037
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
|
This PR makes a large number of extraneous changes. Please see our contributor guidelines, and revise this as best you can to be a highly reviewable PR with clear and coherent commits. |
dd9bb6a to
39fa711
Compare
|
Thanks for pointing this out. I see that the PR currently contains unrelated and generated changes. I’ll reset the branch, reapply only the archived-channel icon change, and split it into clean, reviewable commits following the contributor guidelines. I’ll post an update once done. |
39fa711 to
b6aad25
Compare
|
Thanks! I’ve cleaned up the branch, removed the unrelated changes, and kept the PR focused on the archived-channel icon and its test. All checks are passing and the branch is now up to date. |
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!
Please add the icon in a separate commit, saying where it came from. For similar commits which you can use as examples, please browse the commit history (instructions here), and be sure to format both commit messages according to the project style: https://github.com/zulip/zulip-mobile/blob/master/docs/style.md#git-commits-commit-messages
lib/widgets/all_channels.dart
Outdated
| size: 20, | ||
| color: colorSwatchFor(context, subscription).iconOnPlainBackground, | ||
| iconDataForStream(channel)), | ||
| channel.isArchived ? ZulipIcons.archive : iconDataForStream(channel)), |
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.
Let's give this responsibility to the iconDataForStream function 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! I’ll move the icon addition into a separate commit and include its source, and update the commit messages to follow the project style.
b6aad25 to
8892fd1
Compare
|
Thanks for the feedback! I've updated the PR:
Please let me know if there's anything else to adjust! |
|
Thank you! We now have a custom icon to use; please copy-paste the SVG from here and update the PR: #mobile-design > archived-channel icon @ 💬 |
|
Thanks , I will replace it and update pr |
8892fd1 to
23f7ab5
Compare
|
Thanks, I've updated the archive icon with Karl's custom SVG from the mobile-design discussion and regenerated the icon font. The PR is now updated with the custom Zulip design. |
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. Please also post "before" and "after" screenshots of the change, as required; this is mentioned in our contributing guides.
| // BEGIN GENERATED ICON DATA | ||
|
|
||
| /// The Zulip custom icon "archive". | ||
| static const IconData archive = IconData(0xf101, fontFamily: "Zulip Icons"); |
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.
How did you create the link to the design discussion, in the commit message? The channel-ID part is wrong, so it doesn't take me to the intended message.
| // see this message and the one after it: | ||
| // https://chat.zulip.org/#narrow/stream/243-mobile-team/topic/design.3A.20.23F117.20.22Inbox.22.20screen/near/1680637 | ||
| return switch(stream) { | ||
| ZulipStream(isArchived: true) => ZulipIcons.archive, |
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 don't start showing the icon in the same commit that adds the asset to the project. I mentioned this in my last review: #2037 (review)
test/widgets/all_channels_test.dart
Outdated
| final archivedIcon = tester.widgetList<Icon>(find.byType(Icon)) | ||
| .firstWhere((icon) => icon.icon == ZulipIcons.archive); | ||
| check(archivedIcon).isNotNull(); | ||
|
|
||
| final activeIcons = tester.widgetList<Icon>(find.byType(Icon)) | ||
| .where((icon) => icon.icon != ZulipIcons.archive); | ||
| check(activeIcons).isNotEmpty(); |
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.
Let's use check(…).findsOne() for both of these; see other tests for examples.
23f7ab5 to
2a19f33
Compare
Custom archive icon provided by Karl Stolley for Zulip mobile. Design discussion: https://chat.zulip.org/#narrow/channel/530-mobile-design/topic/archived-channel.20icon/near/1966830
2a19f33 to
812ece9
Compare
This PR updates the channel list to display an archive SVG icon for channels marked as archived.
Changes:
pubspec.yamland places it inassets/icons/archive.svgTesting:
Fixes #1992