Skip to content

The file tree has confusing behavior when selecting a file from a search result

Created by: coury-clark

Slack thread for context.

Navigating from the repository root provides access to the full file tree. When landing on a file from a search result the file tree is limited in scope to the current directory. Some context from @felixfbecker is that this was a decision to support monorepos and large nested structures; however, it is a confusing experience when compared to normal behavior from an editor.

CleanShot 2021-07-22 at 08 40 45@2x

In an editor, the default behavior is the file tree would open to the current location. Jetbrains editors deal with a nested hierarchy by having a horizontal scroll component and aligning the current directory to the left side of the panel.

CleanShot 2021-07-22 at 12 33 05@2x

There is also no way to navigate up the tree from this view without clicking on the breadcrumbs at the top once landing on this view. This doesn't really give the same context as a file tree, and isn't as easy to explore.

Demonstration

CleanShot 2021-07-22 at 08 43 19