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

Reorganize context menu in FileSystem dock to put more used options higher #73519

Merged

Conversation

YuriSizov
Copy link
Contributor

@YuriSizov YuriSizov commented Feb 17, 2023

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.

Godot_v4 0-rc2_win64_2023-02-17_19-44-12

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:

godot windows editor dev x86_64_2023-02-17_20-34-54

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.

godot windows editor dev x86_64_2023-02-17_20-35-07


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:

godot windows editor dev x86_64_2023-02-17_20-35-43


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.

@YuriSizov YuriSizov added this to the 4.1 milestone Feb 17, 2023
@YuriSizov YuriSizov requested a review from a team February 17, 2023 19:50
@YuriSizov YuriSizov requested a review from a team as a code owner February 17, 2023 19:50
@fire
Copy link
Member

fire commented Feb 17, 2023

As part of the usability team I like this. @SaracenOne any thoughts?

@vonagam
Copy link
Contributor

vonagam commented Feb 17, 2023

My only nitpick is that it could have gone further - why isn't "Create New" a first item? "Expand" you can already do with a left click to the right of a folder name, "Expand All"/"Collapse All" - definitely used less often then creating new folder or scene or script.

Let's look at other IDEs, game engines and systems when it comes to context menu for a folder:

  1. VSCode (as mentioned in PR) "New File" and "New Folder" - first items.
  2. JetBrains products - "New" or "Add" - first context item.
  3. Sublime Text - "New File" - first.
  4. Unity - "Create" - first.
  5. Unreal Engine - "New Folder" and "New (Something)" - at the very top.
  6. MacOS - "New Folder" - first option when clicked inside a folder.
  7. Linux - depends, but for Ubuntu, for example, first options are "New Folder" and "New Document".

So, why should Godot differ from those in that regard?

@YuriSizov
Copy link
Contributor Author

YuriSizov commented Feb 17, 2023

@vonagam As I mentioned on RC, the more changes I add, the more opportunities to die to bikeshedding this PR has :) The central and bottom part of the context menu is consistent between folders and files. So it kind of makes sense to keep the differences at the top. I think it's pretty easy to filter out the expand options if those are not what you're looking for.

Also "Expand" is different from using the tree, because it applies to multiple folders. Otherwise it would be very much redundant.

PS. A follow-up PR is possible anyway if we agree on this and want to do further changes.

@Structed
Copy link

I am also confused why it's not the very first option. I see your point @YuriSizov you're afraid of this not getting merged fast enough, but perhaps it's not as controversial as you thought 😂

Anyways, I like any improvement in that area because, just like you, I am always looking for the "New " item.

@ygypt
Copy link

ygypt commented Feb 18, 2023

Making it the absolute first item would also solve the issue of the Create New submenu being between options when right clicking a File :)

@MangoDragonHub
Copy link

I really like this idea of having submenus in the editor. However, I would move up Resource above Scene since most of the labels are alphabetic.

@YuriSizov
Copy link
Contributor Author

YuriSizov commented Feb 18, 2023

@ygypt For the file's context menu having the New item at the top doesn't make sense. It's not the most important option when right-clicking files. Luckily, moving Expand options for folders elsewhere is not going to affect files, so it's all good.


I do however think that having a pretty similar bottom half is an okay middle ground. But if there is indeed no controversy, I can move Expand options.

@YuriSizov YuriSizov force-pushed the fsdock-top-down-contextual-order branch from d247919 to 2844a33 Compare February 18, 2023 19:56
@YuriSizov
Copy link
Contributor Author

Okay, by popular demand...

godot windows editor dev x86_64_2023-02-18_20-53-59

@YuriSizov YuriSizov force-pushed the fsdock-top-down-contextual-order branch from 2844a33 to 303a51d Compare February 19, 2023 00:13
@YuriSizov YuriSizov force-pushed the fsdock-top-down-contextual-order branch from 303a51d to f2ea991 Compare March 16, 2023 11:27
@YuriSizov YuriSizov merged commit 2d04973 into godotengine:master Mar 16, 2023
@YuriSizov YuriSizov deleted the fsdock-top-down-contextual-order branch March 16, 2023 11:49
@YuriSizov
Copy link
Contributor Author

The time has come 🙃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants