-
-
Notifications
You must be signed in to change notification settings - Fork 480
[UI] Add options to sort games by title and status #1249
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
Conversation
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.
The sort order applies to the first installed order, so I see A-Z in installed then Z-A in not-installed. If I toggle the installed state sort, I get A-Z not-installed and then Z-A installed.
I imagine there's a bug in my original sort by state code (the one that only seem to apply in the build (?)).
A question on this is if we should store the sorting in the config, now the change is not persisted so if you change to another screen or restart heroic it falls back to the default A-Z installed first
src/screens/Library/index.tsx
Outdated
<ActionIcons /> | ||
<ActionIcons | ||
sortAscending={sortAscending} | ||
setSortAscending={() => setSortAscending(!sortAscending)} |
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.
maybe name these props toggleSort...
instead of setSort...
?
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.
Yes, sounds good.
Yes, I will experiment a bit more with this logic tomorrow and add the persistence on the store. Makes sense to get back to same filter after restarting heroic and changing screens. 👍 |
@arielj can you try again? I believe I could fix the logic 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.
When the sort shows A->Z, the games are sorted Z->A. The order is consistent for installed/not installed now.
Maybe this is intentional though, like if the icon means click here to sort from A->Z
instead of the current order is from A->Z, click here to toggle it
.
If this was intentional I vote to change it to mean the current order is ...
, I think it's more clear, and the yellow color gives the idea that that is the current
state of that action (like the layout icons and the installed sort icon)
Yes, I thought would he ideal to show what's next after clicking but that might he confusing as well. |
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.
Looks good!
simplescreenrecorder-2022-04-28_18.58.05.mp4
Use the following Checklist if you have changed something on the Backend or Frontend: