Skip to content

Navigate filtered nodes with arrow keys + smaller cleanup#208

Open
eibx wants to merge 1 commit into
Maxteabag:mainfrom
eibx:feature/filter-navigation
Open

Navigate filtered nodes with arrow keys + smaller cleanup#208
eibx wants to merge 1 commit into
Maxteabag:mainfrom
eibx:feature/filter-navigation

Conversation

@eibx
Copy link
Copy Markdown
Contributor

@eibx eibx commented May 20, 2026

I've added the option to use up and down arrows to select the previous and next filter matches.

I've also removed code relating to _tree_filter_typing.

As far as I can see, _tree_filter_typing and _tree_filter_visible are always in sync (always both true or false).

And because of this an early exit in on_key:

if not self._tree_filter_visible:
    # Pass to next mixin in chain (e.g., AutocompleteMixin)
    super().on_key(event)  # type: ignore[misc]
    return

I can't see how any of the not self.tree_filter_typing statement could be reached.

Again thanks for your work 👍

@Maxteabag
Copy link
Copy Markdown
Owner

Hi. Thanks for the PR. I have tested the code but there seems to be some jumping around the nodes. It doesn't feel very intuitive.

@eibx
Copy link
Copy Markdown
Contributor Author

eibx commented May 25, 2026

The behavior is taken from how the database browser in Rider works. But I now see that the use case in Rider is a bit different, since it doesn't remove the nodes when you search. So jumping around the nodes is more important.

With that in mind and if you feel it's unintuitive, I think we should just close this PR. But I do feel the clean up is still relevant :)

riderdemo.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants