-
-
Notifications
You must be signed in to change notification settings - Fork 90
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
library: Add Language and Category filters #967
Conversation
Initial implementation to add filters for demos
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.
Good start
I merged main into this branch, make sure to git pull
A few points
We shouldn't repeat the languages / categories - you can constructs the GTK from JavaScript
We shouldn't use human strings such as “All Languages” to keep track of the currently selected item. Use the index or some constant.
Set dropdown to flat style Construct dropdown values from JavaScript Logic change for filtering, make use of index values instead of strings
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.
This is looking good.
I guess based on #510 this will eventually use a list model of demos with a GridView, so the filtering logic can be re-used later with GtkExpressions.
Static maps for all category and Language filter strings style change for "No results" label
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!
Initial implementation to add language and category filters for available demos.
Minor issue
With the current implementation theDropdown
uses aStringList
to store the names of the categories, andPlatform APIs
as a category only shows demos if the category is namedPlatform
in the string list. Therefore the category in the dropdown is also shown asPlatform
instead of the idealPlatform APIs
Screengrab of it in action:
2024-07-12.01-19-07.mp4
Let me know if there are any issues with the implementation :)
Current state [commit]
2024-07-29.12-30-23.mp4