-
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: add dropdown for category filter #1334
Conversation
d-loose
commented
Aug 15, 2023
- Exposes the category filter, introduced in feat: generalize search provider to support 'category' #1324, as a dropdown on the search result page
- Generalizes the search provider mocks accordingly and adds new test cases
@@ -40,6 +40,11 @@ enum SnapCategoryEnum { | |||
utilities, | |||
unknown; | |||
|
|||
bool get hidden => switch (this) { |
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.
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.
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.
Totally :D
I'll add at least one more 'hidden' category in the near future, but this can still be simplified a little - thanks
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.
A minor question on readability, otherwise LGTM 👍🏽
8a83dc3
to
5f85651
Compare
* add l10n strings * add 'hidden' property to SnapCategoryEnum * add category dropdown to search page * generalize mockSearchProvider * test category search * simplify 'hidden' property
* add l10n strings * add 'hidden' property to SnapCategoryEnum * add category dropdown to search page * generalize mockSearchProvider * test category search * simplify 'hidden' property
* add l10n strings * add 'hidden' property to SnapCategoryEnum * add category dropdown to search page * generalize mockSearchProvider * test category search * simplify 'hidden' property
* add l10n strings * add 'hidden' property to SnapCategoryEnum * add category dropdown to search page * generalize mockSearchProvider * test category search * simplify 'hidden' property