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

Inventory search/filter mode #1250

Merged
merged 12 commits into from May 12, 2023
Merged

Inventory search/filter mode #1250

merged 12 commits into from May 12, 2023

Conversation

byorgey
Copy link
Member

@byorgey byorgey commented May 10, 2023

When the inventory panel is focused, hit / to enter search mode (maybe "search" is a bit of a misnomer, it's really more of a "filter" mode). Then type stuff to modify the current search term, shown at the bottom of the inventory panel. You can still navigate the filtered inventory list with arrow keys etc. Hit Esc to exit search mode or Enter to pop out the focused item (and also exit search mode).

Closes #126.

@byorgey byorgey changed the title [WIP] Inventory search Inventory search/filter mode May 10, 2023
@byorgey byorgey marked this pull request as ready for review May 10, 2023 19:42
@byorgey byorgey requested review from kostmo and xsebek May 10, 2023 19:44
@byorgey
Copy link
Member Author

byorgey commented May 10, 2023

It was very gratifying to realize how much functionality could be reused here: we already have machinery for rebuilding the current view of the inventory and flagging when it needs to be rebuilt. All I had to do was hook into that and add an extra condition to filter out things that don't match the current search.

@byorgey byorgey requested a review from ussgarci May 11, 2023 12:31
@byorgey byorgey added the merge me Trigger the merge process of the Pull request. label May 12, 2023
@mergify mergify bot merged commit 07fc47e into main May 12, 2023
9 checks passed
@mergify mergify bot deleted the feature/inventory-search branch May 12, 2023 10:02
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.

Inventory search
2 participants