Hierarchical file menu for editor #2096
Open
+290
−11
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR replaces the editor File menu with a hierarchical menu, which resembles a file picker in a regular text editor.
There is a subtle change from previous behaviour which is that the currently selected file will be highlighted by having a different background color for the currently selected file in the menu. This is instead of the caret '>' in front of the file name in the current version.
Otherwise, for users with only a few beancount files, the menu will look almost like it used to. The only difference will be that the directory where the file(s) reside is shown in the top and the files then listed below.
So instead of:
It will look like:
For users with multiple files in a directory hierarchy, the change will be bigger.
Instead of:
It will look like:
And can be expanded to:
Unlike usually directories are not first in the order. Instead the order of the files and directories follows the existing alphabetic file ordering.
By default the directories leading to the currently selected file will be expanded, but can be collapsed. In which case the collapsed directory will show as being selected.
Here is an example of how it looks like:
