Godot-proposals: Rename 'Control' to 'NodeUI'/'NodeGUI'

Created on 29 Apr 2020  路  8Comments  路  Source: godotengine/godot-proposals

Recently, the Spatial node was renamed to Node3D, as to match Node2D as one of the base nodes. Considering that Control is also a base node, I think it makes sense for it to follow the Node* naming. Specially since the name "Control" is not that intuitive as to what it does.

I propose either NodeUI or NodeGUI, with me being personally inclined to the former. They immediately convey that the node's function is related to UI/GUI manipulation.

gui

Most helpful comment

I am not for this change because:

  • From what I know Control is quite common to name GUI elements,
  • Unlike a Node3D or a Node2D, a Control is not really a very generic, multi-purpose node,
  • The Node3D rename made sense as most of the 3D nodes had a 2D counterpart, which is not the case at all for UI nodes. So using the NodeUI name may lead to confusion, as it would make some nodes having similar names for no reason.

All 8 comments

NodeUI looks a bit weird. For Node3D and Node2D suffixes, it's understandable because they can't start with a number (convention not just seen in Godot) but NodeUI... eeh. It spells in the wrong sense, and it becomes weirder when renaming other UI nodes.
Maybe UINode or GuiNode would be better? Because UI can be used as proper prefix/namespace.

If we are going down the hill of renames for all GUI nodes as well, then some of those would get a much needed rename IMO, like Tree -> TreeView/UITree or GraphNode -> GraphEditNode/UIGraphNode.

Though I hope nobody hates piling uppercases like UIHBoxContainer :p

I know there's a special reason for the "Node" part on those being on the start that does not apply here. But because the other two are named like that, it looks weird for the third one not to.

Also, I don't really see the need for adding "UI" to the other nodes.

I think adding UI to other nodes isn't needed. I don't mind NodeUI but also don't mind the sound of something like 'Widget' (UE4 uses this). But then if it's just a rename for the sake of renaming (Control -> Widget) rather than for consistency (Control -> NodeUI), why bother in the first place unless "Control" is confusing a lot of people.

Maybe it's ok for UI related nodes to have a different convention?

I am not for this change because:

  • From what I know Control is quite common to name GUI elements,
  • Unlike a Node3D or a Node2D, a Control is not really a very generic, multi-purpose node,
  • The Node3D rename made sense as most of the 3D nodes had a 2D counterpart, which is not the case at all for UI nodes. So using the NodeUI name may lead to confusion, as it would make some nodes having similar names for no reason.

@groud

From what I know Control is quite common to name GUI elements,

This is first and foremost why I'm against moving away from the Control naming scheme. Control[s] is how many UI frameworks commonly refer to their UI elements, and I think we lose a legitimate case for familiarity that makes migration from other platforms to Godot, easier for UI devs.

Have to agree that both 'Control' and 'Widget' are very commonly used like this (and 煤sed synonymously). Vote for letting this stay as-is. :)

HTML, QT, and mostly every UI framework I've ever used reffered to these as either widgets or controls.

For 3D, having everything be renamed to end in 3D helps with consistency due to all of the 2D nodes ending in 2D already, as most of these nodes have alternate versions between 2D and 3D.

For Control nodes, there is only one version of each, so there is no suffix needed anywhere. "NodeUI" or "NodeGUI" would imply the existence of other nodes ending in "UI", which would be misleading. I think the current name of "Control" is already great and should be kept.

For Control nodes, there is only one version of each, so there is no suffix needed anywhere. "NodeUI" or "NodeGUI" would imply the existence of other nodes ending in "UI", which would be misleading

While the first reason mentionned at the beginning of this thread might not be the best or explanatory ("i.e 2D and 3D suffixes exist, let's do the same for everything"), I believe a better motivation (which is my own opinion) is that GUI nodes are components of a family of nodes. That assumes a lot of context. This goes in pair with what I said that UI should be a prefix and not a suffix. Indeed, When you find a class named Tree, TreeItem, Range, GraphNode or TextureRect, do you immediately think about UI? Or do you think about: a tree data structure and its nodes, a terrain tree, an simple min/max value type, a graph data structure for doing pathfinding, a sub-rectangle of a texture? Just by name, it's not obvious that they are actually full blown UI controls instead. Btw, those names are taken so should you want to use them, you have to name yours differently.

I (and maybe you) know most Godot nodes very well already so I don't mind much if they keep these names, I can tell them apart quickly after years of experience when I see their name (same for 3D nodes btw!). But I don't know about other people with less experience.

At least if the idea of prefixing is rejected, I believe some of these nodes need a rename.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

SpyrexDE picture SpyrexDE  路  3Comments

aaronfranke picture aaronfranke  路  3Comments

lupoDharkael picture lupoDharkael  路  3Comments

Dorifor picture Dorifor  路  3Comments

rainlizard picture rainlizard  路  3Comments