-
Notifications
You must be signed in to change notification settings - Fork 201
fix(textfield): icon positioning with field label #2380
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
Conversation
🚀 Deployed on https://pr-2380--spectrum-css.netlify.app |
File metricsSummaryTotal size: 3.93 MB*
Detailstextfield
* Results are not gzipped or minified. * An ASCII character in UTF-8 is 8 bits or 1 byte. |
76f75a7
to
c81095c
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.
Looking great! Just one question in the code.
components/textfield/index.css
Outdated
@@ -443,7 +443,7 @@ governing permissions and limitations under the License. | |||
Sets the opacity to 1 as normalize.css sets an opacity to placeholders | |||
Details: https://github.com/csstools/normalize.css/blob/main/normalize.css#L297 | |||
*/ | |||
-moz-appearance: textfield; | |||
appearance: textfield; |
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.
Curious about the changes to appearance throughout this file, and wondering if we should remove the comments where we've removed prefixes?
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.
this is the stylelint rule that removed these: https://stylelint.io/user-guide/rules/property-no-vendor-prefix/
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.
I wonder if that's what we want 🤔 It looks like the vendor prefixes were added 5+ years ago when the project moved to individual package versions...
It seems like we should either:
- Thoroughly browser test this PR with the prefixes removed to see if behavior matches prod
- Or revert the automatic removal of these and create a card in the backlog to explore further
What do you think?
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.
I agree that it needs closer looking at before they are just removed. I was able to get them back in and added some TODO comments. Writing up a backlog ticket to investigate it further as well.
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.
It looks like the prefixes were reverted again. Maybe try adding --no-verify
to your commit?
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.
oop, they are back now
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.
Great work, thanks for fixing this!
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.
Looks great - I noticed the prefixes were stripped again and had a few minor notes on the story format. Thanks!
551c105
to
ae59ace
Compare
b3fef3e
to
77e60e7
Compare
Description
The position of the textfield validation icons currently does not match design spec when the associated feild label wraps or when a side label is applied.
Changes:
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
In storybook for the text area
displayLabel: true
,sideLabel: true
, andvalid: true
: the check mark icon is properly positioneddisplayLabel: true
,sideLabel: true
, andinvalid: true
: the alert icon is properly positioneddisplayLabel: true
,sideLabel: false
andvalid: true
: the check mark is properly positioneddisplayLabel: true
,sideLabel: false
andinvalid: true
: the alert icon is properly positionedIn storybook for the text field
displayLabel: true
,sideLabel: true
, andvalid: true
: the check mark icon is properly positioneddisplayLabel: true
,sideLabel: true
, andinvalid: true
: the alert icon is properly positioneddisplayLabel: true
,sideLabel: false
andvalid: true
: the check mark is properly positioneddisplayLabel: true
,sideLabel: false
andinvalid: true
: the alert icon is properly positionedin both cases, increasing the label text to wrap does not alter icon position
The docs site should not have any changes
Chromatic should include kitchen sink approach displaying various label options for text field and text area
Regression testing
Validate:
Screenshots
Before
After
To-do list