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: add dropdown for category filter #1334

Merged
merged 6 commits into from
Aug 15, 2023
Merged

Conversation

d-loose
Copy link
Member

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

@@ -40,6 +40,11 @@ enum SnapCategoryEnum {
utilities,
unknown;

bool get hidden => switch (this) {

Choose a reason for hiding this comment

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

Is not this switch an overkill over a trivial Boolean expression? Even considering that the list of values resulting in true can grow, it will still be a one-liner conjunction expression.

Copy link
Member Author

Choose a reason for hiding this comment

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

Totally :D
I'll add at least one more 'hidden' category in the near future, but this can still be simplified a little - thanks

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.

A minor question on readability, otherwise LGTM 👍🏽

@d-loose d-loose enabled auto-merge (squash) August 15, 2023 15:54
@d-loose d-loose merged commit 000f705 into ubuntu:dev Aug 15, 2023
6 checks passed
kenvandine pushed a commit that referenced this pull request Aug 15, 2023
* add l10n strings

* add 'hidden' property to SnapCategoryEnum

* add category dropdown to search page

* generalize mockSearchProvider

* test category search

* simplify 'hidden' property
tim-hm pushed a commit to tim-hm/app-center that referenced this pull request Sep 1, 2023
* add l10n strings

* add 'hidden' property to SnapCategoryEnum

* add category dropdown to search page

* generalize mockSearchProvider

* test category search

* simplify 'hidden' property
tim-hm pushed a commit to tim-hm/app-center that referenced this pull request Sep 1, 2023
* add l10n strings

* add 'hidden' property to SnapCategoryEnum

* add category dropdown to search page

* generalize mockSearchProvider

* test category search

* simplify 'hidden' property
@d-loose d-loose deleted the category-dropdown branch September 19, 2023 21:01
ashuntu pushed a commit to ashuntu/app-center that referenced this pull request Feb 28, 2024
* add l10n strings

* add 'hidden' property to SnapCategoryEnum

* add category dropdown to search page

* generalize mockSearchProvider

* test category search

* simplify 'hidden' property
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