godotengine / godot-proposals

Godot Improvement Proposals (GIPs)
MIT License
1.06k stars 65 forks source link

Prompt to rename root node of newly created scene #9245

Closed RedMser closed 2 weeks ago

RedMser commented 2 months ago

Describe the project you are working on

Does not matter

Describe the problem or limitation you are having in your project

When creating a new scene using the + button in the tab bar, an [empty]​ tab is created and you can choose the type of root node. When doing so, the name of the root node is always defaulted to the class name of the node you added.

Since the root node name is used as default file name when Ctrl+S, it would be nice to quickly allow renaming the new node directly on creation.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

After selecting the node type, allow optionally typing in a name for the root node directly.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

It would use the same UX as when renaming a node by pressing F2 or right click -> Rename. So a simple inline textbox.

image

When the user does not want to rename (or does not notice the option to), they can simply keep on working as normal, and the rename prompt will automatically cancel.

If this enhancement will not be used often, can it be worked around with a few lines of script?

It's a usability improvement in the editor.

Is there a reason why this should be core and not an add-on in the asset library?

It's a usability improvement in the editor. Could be implemented via add-on, but not easily and definitely not worth doing it that way.

fire commented 2 months ago

I am not sure that we want a dialogue here without user action. Isn't this like a forced focus?

Side note, some game engines enforce the root node is the same as the filename.

RedMser commented 2 months ago

It's not a dialogue, in the sense that you can simply keep working as if it wasn't there. It'll cancel the rename in any case. It's just nice to be able to start typing immediately instead of having to go out of your way to start a rename.

Are there any shortcuts that would be captured by a textbox which are commonly used as the first thing when creating a scene?

KoBeWi commented 2 months ago

You can press F2 after creating the node and you will get the same effect. And it's not like editing name can be completely ignored, because any keyboard input will be intercepted by the name edit.

If you want to customize a new scene, create it from FileSystem dock. It comes with a specialized dialog for that.

fire commented 2 months ago

To clarify editing name can not be ignored for someone with a screen reader. I don't think anything else in the engine uses this construction for probably similar reasons.

RedMser commented 2 months ago

Counter example would be how Windows handles the user creating a new folder or file. It also immediately asks for name with a similar pattern.

But I understand the concerns and don't intend to pursue this further if it's not desired

fire commented 2 months ago

I wonder if we can generalize this feature to every creation of a new label or something.

RedMser commented 2 weeks ago

There does not seem to be enough community interest in this feature, so I will close this proposal to avoid a controversial change.