Navigate filtered nodes with arrow keys + smaller cleanup#208
Conversation
|
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. |
|
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 |
|
The problem is that it collapses and opens items in the tree explorer unexpectedly. Say I have a table called Inventory with columns last_restocked, warehouse_location, product_id I type in /r (searching for r keyword) If my cursor is on inventory and I press the up key, I end up in last_restored column. That's counter intuitive. It so happens it collapses and unfolds tree items automatically. |
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_typingand_tree_filter_visibleare always in sync (always bothtrueorfalse).And because of this an early exit in
on_key:I can't see how any of the
not self.tree_filter_typingstatement could be reached.Again thanks for your work 👍