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

User-controllable sort criteria #793

Merged
merged 2 commits into from Oct 29, 2022
Merged

User-controllable sort criteria #793

merged 2 commits into from Oct 29, 2022

Conversation

kostmo
Copy link
Member

@kostmo kostmo commented Oct 27, 2022

When the inventory pane is selected (Alt+e), one can use the ; and : keys to cycle sort criteria and sort direction, respectively.
Screenshot from 2022-10-26 21-52-11

This functionality is implemented in a new module to avoid exacerbating #707.

Note that entityProperties may be an unreliable criteria to sort, because it is a list that itself may contain duplicates or items in unpredictable order. Perhaps this field should be made a Set (#794).

swarm.cabal Outdated Show resolved Hide resolved
@kostmo kostmo marked this pull request as ready for review October 27, 2022 05:39
@kostmo kostmo requested a review from byorgey October 27, 2022 05:39
Copy link
Member

@byorgey byorgey left a comment

Choose a reason for hiding this comment

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

This is looking very nice!

src/Swarm/TUI/Inventory/Sorting.hs Outdated Show resolved Hide resolved
src/Swarm/TUI/Inventory/Sorting.hs Show resolved Hide resolved
src/Swarm/TUI/Inventory/Sorting.hs Outdated Show resolved Hide resolved
src/Swarm/TUI/Inventory/Sorting.hs Outdated Show resolved Hide resolved
src/Swarm/TUI/Inventory/Sorting.hs Outdated Show resolved Hide resolved
src/Swarm/TUI/Model.hs Outdated Show resolved Hide resolved
@kostmo
Copy link
Member Author

kostmo commented Oct 29, 2022

All comments resolved.

@kostmo kostmo added the merge me Trigger the merge process of the Pull request. label Oct 29, 2022
Copy link
Member

@byorgey byorgey left a comment

Choose a reason for hiding this comment

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

🚀

@mergify mergify bot merged commit a433076 into main Oct 29, 2022
@mergify mergify bot deleted the inventory-sort branch October 29, 2022 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge me Trigger the merge process of the Pull request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants