-
Notifications
You must be signed in to change notification settings - Fork 310
msglist: Colorize channel icon in the app bar, following Figma #1524
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
msglist: Colorize channel icon in the app bar, following Figma #1524
Conversation
This will avoid an inconsistency with the topic-list page (PR #1500), which colorizes the icon. |
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! Overall looks good to me. Left some comments. Looks like the CI is failing, but it should be an easy fix.
iconColor = colorSwatchFor(context, store.subscriptions[stream.streamId]) | ||
.iconOnBarBackground; |
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.
Should we fall back to the default base color kDefaultChannelColorSwatchBaseColor
(by passing a possibly null subscription) until we get to fully implementing #188?
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 think that's what this code already does; am I reading too quickly? store.subscriptions[stream.streamId]
might be null, and if it is, colorSwatchFor
uses a swatch based on kDefaultChannelColorSwatchBaseColor
.
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.
Oh right. I think I meant the case when stream
is null
, i.e. we got a "(unknown channel)".
} | ||
testChannelIconInChannelRow(ZulipIcons.globe, isWebPublic: true, inviteOnly: false); | ||
testChannelIconInChannelRow(ZulipIcons.lock, isWebPublic: false, inviteOnly: true); | ||
testChannelIconInChannelRow(ZulipIcons.hash_sign, isWebPublic: false, inviteOnly: false); |
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! It's nice to have this tested.
e745ebf
to
d94b011
Compare
Updated to fix the analyzer warning; PTAL at my reply above: #1524 (comment) |
The Figma: https://www.figma.com/design/1JTNtYo9memgW7vV6d0ygq/Zulip-Mobile?node-id=6089-28394&m=dev And while we're adding a test for it, also check that the chosen channel icon is the intended one.
d94b011
to
245d9d9
Compare
Thanks — looks good, merging. |
Following the Figma:
https://www.figma.com/design/1JTNtYo9memgW7vV6d0ygq/Zulip-Mobile?node-id=6089-28394&m=dev
And while we're adding a test for it, also check that the chosen channel icon is the intended one.