-
Notifications
You must be signed in to change notification settings - Fork 116
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
feat: import @Zoospora's banner gradients #1331
Conversation
@@ -105,4 +105,53 @@ enum SnapCategoryEnum { | |||
selected ? YaruIcons.swiss_knife_filled : YaruIcons.swiss_knife, | |||
_ => YaruIcons.application, | |||
}; | |||
|
|||
List<Color> get bannerColors => switch (this) { | |||
development => _kBannerColors[9], |
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 believe the indexing on the list of pairs of colors can be error prone. I'd rather translate the snap category to banner color straight in the switch statement for easy maintenance.
Think in the future a newcomer is asked to change the color of the Art & Design category banner. How many jumps around he'd have to do to figure out the right spot to change?
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 also thought about that - the design for the banners is still WIP, so there's no definite 'category' -> 'gradient color' association yet. Since we only have 10 color gradients but 20+ categories, I'd prefer to keep them separate for now :)
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'd recommend adding a TODO about this to avoid others making the same statement I did :D
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 👍🏽
* feat: import @Zoospora's banner gradients * add todo
* feat: import @Zoospora's banner gradients * add todo
* feat: import @Zoospora's banner gradients * add todo
* feat: import @Zoospora's banner gradients * add todo
Adds the accessibility-safe gradient colors for the banners from here.