-
Notifications
You must be signed in to change notification settings - Fork 162
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
fix: Misaligned 'Remove' button when no label is present in the attribute editor #528
Conversation
Codecov ReportBase: 92.61% // Head: 92.59% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #528 +/- ##
==========================================
- Coverage 92.61% 92.59% -0.02%
==========================================
Files 567 568 +1
Lines 16131 16165 +34
Branches 4417 4426 +9
==========================================
+ Hits 14939 14968 +29
- Misses 1112 1116 +4
- Partials 80 81 +1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
…esent When there is no visible label on any of the columns (e.g. because the label is inherited from a parent form field), the 'Remove' button had an incorrect vertical offset applied.
b37294e
to
f0de6d9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When there are multiple columns, they should all have labels, in order to differentiate what each column is for. If one of the columns doesn't have a label, it would be very difficult to users to know what that column is and what they should put there, so it's not really a supported or expected use case. This fix is primarily for the special case where there is only a single column. In that case, having a label on the column is redundant if there is already a visible label provided by a FormField (and this label is also used for announcing the column's input fields to screenreaders), so it is an expected use case to have no label in single-column situations. |
When there is no visible label on any of the columns (e.g. because the label is inherited from a parent form field), the 'Remove' button had an incorrect vertical offset applied.
Description
This change removes the additional padding from the button if no column has a label. This is mainly the case when there is only a single column and the attribute editor is inside a FormField (which provides the visible and screenreader-visible label).
Related links, issue #, if available: n/a
How has this been tested?
Manual testing (including with a screenreader). I added a new dev page with an example usage. Available locally at http://localhost:8080/#/light/attribute-editor/form-field-label
Review checklist
The following items are to be evaluated by the author(s) and the reviewer(s).
Correctness
CONTRIBUTING.md
.CONTRIBUTING.md
.Security
checkSafeUrl
function.Testing
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.