godotengine / godot-proposals

Godot Improvement Proposals (GIPs)
MIT License
1.07k stars 69 forks source link

Rename OptionButton to DropDownList #1998

Open madmiraal opened 3 years ago

madmiraal commented 3 years ago

Describe the project you are working on

Godot engine

Describe the problem or limitation you are having in your project

As originally mentioned in https://github.com/godotengine/godot/issues/6558, the OptionButton is actually a Drop-down List.

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

Rename OptionButton to DropDownList.

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

As above.

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

N/A

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

N/A

Calinou commented 3 years ago

It's still a button technically, so I'd rename it to DropdownButton instead. (I think DropDownButton looks kind of ugly.)

madmiraal commented 3 years ago

It's still a button technically, so I'd rename it to DropdownButton instead. (I think DropDownButton looks kind of ugly.)

It's only a Button, because, within the engine, it inherits Button, but it's a Drop-down list. Note: Checkbox also inherits Button, but it's not called CheckboxButton. I think it should be called what it is.

groud commented 3 years ago

Hmm, this is not correct to me. For me, the dropdown list is the list that pops up, not the button itself. I believe the current naming is better.

Mickeon commented 1 year ago

It's been 2 years since this proposal, but my vote still goes to DropdownButton mostly because it extends Button. There's no need to be accurate to HTML standards in this case, because it's clear on all users coming to Godot what DropdownButton does simply because of namesake. It's a Button that, when pressed, brings up a Dropdown list.

YuriSizov commented 1 year ago

There doesn't seem to be a lot of support for the OP, though there are many likes to Calinou's counter-suggestion. Not sure if this should be considered as "We vote for rename" or as "If we were to rename, this is a better idea".

Be that as it may, I'm not convinced this is actually helpful anymore. I think the Option qualifier explains better that this button provides a way to select from one of the options. Dropdown is vague and non-specific, it describes how it looks rather than what it does. Even if other UI libraries use that quite often, I don't think it's a major win to rename here.

Of course, this can be bikeshed to death too. We now have a proposal to add a carousel button which is essentially the same but with a different interaction mechanic. So maybe naming this one after its interaction mechanic is not that bad, etc, etc. Personally, I'd go the "no consensus" route here.

akien-mga commented 1 year ago

We discussed this proposal in a PR review meeting and agreed on the DropdownButton proposal, to keep the inheritance of Button clear (and as @groud pointed it out the "list" part can be understood as the PopupMenu that shows up when you click the button, not the button itself).

Won't die on that hill but the main consensus seems to be "Dropdown" without capitalizing "down" (it's not clearly established in the codebase whether compound names with an hyphen should have both terms capitalized or not).

Calinou commented 1 year ago

We discussed this proposal in a PR review meeting and agreed on the DropdownButton proposal

Note that if we decide to add carousel-style functionality to OptionButton, then the name "DropdownButton" will no longer be applicable for that particular style of UI control.