Reorganize context menu in FileSystem dock to put more used options higher #73519
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.
So during these last few weeks I've been using the editor quite a lot to test various PRs and reports, and was constantly feeling awkward about the position of the "New" context menu item in the FileSystem dock.
For some reason, it's at the bottom while I expect useful items to be at the top. So it always takes a bit of time to scan the context menu from the top to find it. I started to get used to it, but I don't think that this position ideal, or makes sense. There is an argument to be made that this matches File Explorer in Windows (and maybe similar tools on other platforms), but that's not a great comparison IMO. A better comparison is a code editor or an IDE, a professional creator's tool that operates on a "project". So, for example, in VS Code "New" items are at the top of the list, and it feels very intuitive.
At the same time, an arguably less useful option, "Add to Favorites" (and its "Remove" counterpart) are located very high, always getting in the way.
Additionally, folders have this "Open" option which only expands selected folders, and it's located in the middle. At the same time we have "Expand/Collapse All" at the top (for a single folder). So it felt very natural for the "Open" option to be renamed to "Expand" and put to the top, next to its cousins.
Overall, the new context menu for a folder looks like this:
I think it's very reasonable like that, and provides quicker and more intuitive access to the most used items.
Interestingly, single items also have the "New" menu option available, likely to make it easier to create new items in their parent folder. Not all apps do that, but I didn't want to change any functionality, so I kept it as is. That means, however, that the new position of this item is in between various file options. But I don't think it's too bad. The "New" option should be high, as I established above, so it wouldn't make sense to move it anywhere else.
The menu you see when clicking on an empty space is exactly as it was. When you have multiple items selected, the menu is only slightly different:
As mentioned, some renames were made for clarity and consistency (items describe actions). Some icons were also adjusted. This PR also does a bit of a clean-up in the relevant FileSystem dock code.
As a closing note, I fully expect this to be controversial, but I think it makes more sense this way, and is in line with what is expected from such tools. There was a bit of support in the contributors chat to these ideas, so I'm hoping we can merge it quickly.