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

Rename Label to TextLabel #40124

Closed

Conversation

aaronfranke
Copy link
Member

@aaronfranke aaronfranke commented Jul 4, 2020

Implements #16863 (comment), implements and closes godotengine/godot-proposals#1815.

This is a huge change and probably conflicts with tons of other PRs.

@Malkverbena
Copy link

What exactly the reason for change the name of this node?
I mean, "Label" is totally self explanatory. A change like this will really help?

@ghost
Copy link

ghost commented Jul 5, 2020

What exactly the reason for change the name of this node?
I mean, "Label" is totally self explanatory. A change like this will really help?

For better search results. Allows for typing text or label when filtering nodes.

@aaronfranke
Copy link
Member Author

aaronfranke commented Jul 5, 2020

In addition to better search results:

  • More consistent with RichTextLabel since it's still text but without the rich.

  • More familiar for users of other engines (in Unity it's called TextMesh, so this way both names contain "Text")

The improved search results also helps people who haven't used Godot before and are just searching for "Text".

@Chaosus
Copy link
Member

Chaosus commented Jul 5, 2020

I don't like it - Label is a simple explanatory term in many GUI API's, the gain of adding "Text" is very little in my opinion

@Xrayez
Copy link
Contributor

Xrayez commented Jul 5, 2020

I'd much prefer a general purpose Text/TextBlock node or similar, something like godotengine/godot-proposals#826 suggests, people could then make a global script to make a default Label/TextLabel implementation if we go the "barebones" Godot route, but yeah if the logic is to make it consistent with RichTextLabel, no big evil. 🙂

Also, how often do we actually need to use something like ImageLabel which would justify the rename? Those kind of stuff can be represented as texture icons I think.

For better search results.

The poor searching might be already addressed by #39990. Perhaps the searching could also be improved to seek within method descriptions to suggest better results.

@Xrayez
Copy link
Contributor

Xrayez commented Jul 5, 2020

What about LineEdit? I find this one more difficult to find in the documentation compared to Label personally. I forget about the name and type something like TextField or InputField. 😄

See also #20611.

@aaronfranke aaronfranke force-pushed the text-label-rename branch 2 times, most recently from eae1930 to b75b7af Compare August 28, 2020 07:40
@aaronfranke aaronfranke force-pushed the text-label-rename branch 2 times, most recently from 8940e50 to 534437f Compare November 10, 2020 19:44
@akien-mga
Copy link
Member

We discussed this in a PR review meeting today, and decided to reject the proposal (and the PR). Label is a very common term in UI libraries and the addition of a Text prefix doesn't seem particularly beneficial (Qt uses QLabel, GTK uses GtkLabel).

What about LineEdit? I find this one more difficult to find in the documentation compared to Label personally. I forget about the name and type something like TextField or InputField. smile

That's a more valid point in my opinion (also was @Faless' opinion). Godot uses LineEdit probably because Qt uses QLineEdit too, so it's also a common UI term. And it goes together with TextEdit which is the multiline / free form version, so LineEdit makes it clear that it's only a single line of text. But I'm not sure I'm convinced by any change proposal, and it doesn't seem to be a big deal to me, so I'd err on the side of the status quo personally (but if anyone feels strongly about LineEdit, feel free to open a proposal for further discussion).

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.

Rename Label to TextLabel
5 participants