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

Support find widget in lists/trees #152481

Merged
merged 6 commits into from
Jul 18, 2022
Merged

Support find widget in lists/trees #152481

merged 6 commits into from
Jul 18, 2022

Conversation

joaomoreno
Copy link
Member

@joaomoreno joaomoreno commented Jun 17, 2022

Feature

This PR replaces the existing list/tree type filter:

image

with an bona fide find widget:

image

While a seemingly simple change, this has some (desired) consequences when searching/filtering in trees. Namely:

  • We will restore simple keyboard navigation by default. That is: pressing the letter A will focus the next element which starts with A.
  • Initiating a search operation requires pressing Ctrl-F or F3, like the editor.
  • While searching, focus is in the find input box as opposed to the list itself. Pressing DownArrow will focus the first list element which was found.
  • We'll preserve all custom behavior of context keys, eg. used by the VIM extension). In VIM, the pre-existing / command will trigger simple keyboard navigation, as opposed to opening the find widget. The VIM extension has the option to change this behavior themselves. cc @J-Fields

Changes

We've taken the opportunity to reframe and rephrase the feature along with all its settings/commands/context keys. Notice that all old names will be marked as deprecated but still be respected for a while, until enough time has passed for extensions to migrate to the new ones.

In general:

  • Keyboard navigation is now called type navigation
  • Filter on type is now called find mode, aligned with a new find concept

Settings

  • workbench.list.keyboardNavigation has been renamed to workbench.list.defaultFindMode
  • workbench.list.automaticKeyboardNavigation has been deleted

Commands

  • list.toggleKeyboardNavigation has been renamed to list.triggerTypeNavigation
  • list.find has been added
  • list.closeFind has been added
  • list.toggleFilterOnType has been renamed to list.toggleFindMode

Context Keys

Mainly used by the vim extension:

  • listSupportsKeyboardNavigation has been renamed to listSupportsTypeNavigation
  • listAutomaticKeyboardNavigation has been renamed to listTypeNavigationMode

Pending Items

  • Review vim extension usage
  • Document API/settings/context keys changes
  • Review outline view usage of filter
  • Review problems view usage

Fixes #70646
Fixes #146806
Fixes #153612

cc @misolori

@joaomoreno joaomoreno added the tree-widget Tree widget issues label Jun 17, 2022
@joaomoreno joaomoreno added this to the June 2022 milestone Jun 17, 2022
@joaomoreno joaomoreno self-assigned this Jun 17, 2022
@connor4312 connor4312 modified the milestones: June 2022, July 2022 Jul 1, 2022
navigation and tree find. use proper FindInput widget
@joaomoreno joaomoreno changed the title Explore improving the discoverability of filtering in tree views Support find widget in lists/trees Jul 16, 2022
@joaomoreno joaomoreno marked this pull request as ready for review July 17, 2022 06:11
jrieken
jrieken previously approved these changes Jul 18, 2022
@jrieken
Copy link
Member

jrieken commented Jul 18, 2022

@joaomoreno there is CI failures

@joaomoreno joaomoreno enabled auto-merge (squash) July 18, 2022 14:10
@joaomoreno joaomoreno merged commit 4b0d6f3 into main Jul 18, 2022
@joaomoreno joaomoreno deleted the joao/northern-wildebeest branch July 18, 2022 14:25
jrieken pushed a commit that referenced this pull request Jul 18, 2022
* replace list type filter and tree type label controller with list type
navigation and tree find. use proper FindInput widget

* make sure vim doesn't break

* polish outline use case

* 💄

* remove unused import
@joaomoreno joaomoreno mentioned this pull request Jul 24, 2022
3 tasks
@FoundationKen
Copy link

Is there a way to make it search through closed folders too?

@gjsjohnmurray
Copy link
Contributor

@FoundationKen not yet. See #66971

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
tree-widget Tree widget issues
Projects
None yet
6 participants