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

feat: import @Zoospora's banner gradients #1331

Merged
merged 2 commits into from
Aug 14, 2023
Merged

Conversation

d-loose
Copy link
Member

@d-loose d-loose commented Aug 14, 2023

Adds the accessibility-safe gradient colors for the banners from here.

@@ -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],

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?

Copy link
Member Author

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 :)

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

Copy link

@CarlosNihelton CarlosNihelton left a comment

Choose a reason for hiding this comment

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

LGTM 👍🏽

@d-loose d-loose enabled auto-merge (squash) August 14, 2023 16:12
@d-loose d-loose merged commit 2121121 into ubuntu:dev Aug 14, 2023
6 checks passed
@d-loose d-loose deleted the banner-colors branch August 14, 2023 16:20
kenvandine pushed a commit that referenced this pull request Aug 15, 2023
* feat: import @Zoospora's banner gradients

* add todo
tim-hm pushed a commit to tim-hm/app-center that referenced this pull request Sep 1, 2023
* feat: import @Zoospora's banner gradients

* add todo
tim-hm pushed a commit to tim-hm/app-center that referenced this pull request Sep 1, 2023
* feat: import @Zoospora's banner gradients

* add todo
ashuntu pushed a commit to ashuntu/app-center that referenced this pull request Feb 28, 2024
* feat: import @Zoospora's banner gradients

* add todo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants