Skip to content

Support find widget in lists/trees - #152481

Merged
João Moreno (joaomoreno) merged 6 commits into
mainfrom
joao/northern-wildebeest
Jul 18, 2022
Merged

João Moreno (joaomoreno) merged 6 commits into
mainfrom
joao/northern-wildebeest

Conversation

@joaomoreno

@joaomoreno João Moreno (joaomoreno) commented Jun 17, 2022 •

Copy link
Copy Markdown
Contributor

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 Jason Fields (@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

navigation and tree find. use proper FindInput widget
@joaomoreno João Moreno (joaomoreno) changed the title Explore improving the discoverability of filtering in tree views Support find widget in lists/trees Jul 16, 2022
@joaomoreno
João Moreno (joaomoreno) marked this pull request as ready for review July 17, 2022 06:11
@jrieken

Copy link
Copy Markdown
Contributor

João Moreno (@joaomoreno) there is CI failures

@joaomoreno
João Moreno (joaomoreno) enabled auto-merge (squash) July 18, 2022 14:10
@joaomoreno
João Moreno (joaomoreno) deleted the joao/northern-wildebeest branch July 18, 2022 14:25
Johannes Rieken (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
@FoundationKen

Copy link
Copy Markdown

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

@gjsjohnmurray

Copy link
Copy Markdown
Contributor

Ken Carpenter (@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