chore(combobox, datepicker,et all): add displayLabel arg#3660
Conversation
|
|
🚀 Deployed on https://pr-3660--spectrum-css.netlify.app |
File metricsSummaryTotal size: 1.38 MB* 🎉 No changes detected in any packages * Size is the sum of all main files for packages in the library.* An ASCII character in UTF-8 is 8 bits or 1 byte. |
ca1fb6f to
2659e83
Compare
rise-erpelding
left a comment
There was a problem hiding this comment.
This definitely feels like the simpler solution and works nicely.
It is interesting to note though, looking through the guidelines they say "text fields should always have a label" and then in something like combobox, the field label can exist but the markup is outside .spectrum-Textfield (and .spectrum-Combobox for that matter).
2659e83 to
9709150
Compare
- without the displayLabel arg set to false in the following components, the textfield was still rendering a label, and offsetting a bunch of the icons & buttons within these components combobox, datepicker, form, pagination, search, stepper
9709150 to
68cc237
Compare
Description
After rebasing the search field migration branch, I noticed that the icons were placed awkwardly. I realized that the nested textfield in my search component was just missing a
displayLabel: falseargument. That arg was updated in the textfield S2 migration, to be set totrueon default (based on guidance that "a textfield should always have a label"), but because search isn't utilizing the field label that ships with textfield, that arg should be set tofalse. Without the displayLabel arg set to false, the textfield was still rendering an additional, empty field label component, and offsetting the icon & button within search.After scanning the repo, the following components needed similar
displayValue: falseargs:combobox, datepicker, form, pagination, stepper
Jira/Specs
CSS-1174
How and where has this been tested?
Please tag yourself on the tests you've marked complete to confirm the tests have been run by someone other than the author.
Validation steps
spectrum-two(these components do look broken):Regression testing
Validate:
Screenshots
Before 🚫

combobox
datepicker

search

pagination

form

stepper

After ✅

combobox
datepicker

search

pagination

form

stepper

To-do list