Closed fperillo closed 6 years ago
Good question. I have a feeling that I initially followed Material-UI's naming. It is possible that their API has changed quite a bit since then, of course.
After some thinking, I came up with the following rule of thumb, but this is very much open for discussion:
(In case of the label, I thought "floating" was referring to the effect when the label is moving upwards, and since this can be disabled, it would be more appropriate to call it just "label.")
I added a wiki page for this.
- Be consistent with Qt naming conventions and API design style.
I agree
use google naming for elements
Ok
The exception here would be if there is an existing Qt API which has its own naming. Then Qt's naming should be used.
So it is Label and not floatingLabel
I think it should be Label, because I interpret "floating" in the Material spec. as a specific behavior of the label. Looking at this page; https://material.io/guidelines/components/text-fields.html#text-fields-layout, it says:
Text fields contain the following elements:
Label
Text field labels display the type of input a field requires. Every text field should have a label.
Labels are aligned with the input line and always visible. They can be resting (when a field is inactive and empty) or floating.
(emphasis added)
PS.
I also noticed that they call the line inputLine
, and not underLine, as I wrote, so I'll go ahead and change I changed that.
Feel free to reopen if the explanation on the wiki page can be improved.
I'd like to know where are you taking the name of the methods from so to be consistent with your naming My sources are http://www.material-ui.com/#/components/text-field and https://material.io/guidelines/components/text-fields.html#text-fields-layout
For example in TextField we have the moving label:
The placeholder text
Are you following the meterial.io naming?