-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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: input alignment & error border for input #5805
Conversation
cc @shawnborton. I will update the screens shortly. |
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.
Strange, I did tested that. Let me check again. |
Done. |
Tested it again in web/android, it is looking good. Is this still WIP? |
I think we want to keep the :focus styles for accessibility purposes right? |
Sorry didn't notice the title. I was waiting for Shawn's review. |
@shawnborton What do you want me to change here? I didn't get your comments clearly. |
@parasharrajat in this screenshot here: It feels like the "He/him" is over to the right by 1px too far. Can you inspect that one for me and show me the bounding boxes? |
I agree on that following those styles for focused inputs and errors is the right path, but this may be out of the scope of the original GH issue and the regression this is PR is trying to fix. |
Fair point @aldo-expensify - let's save these for a separate issue. @parasharrajat just see my comment above... the first screenshot feels a bit off, but the second screenshot you posted in the first comment seems okay. |
@shawnborton I noticed it. Let me check. |
src/styles/styles.js
Outdated
paddingBottom: 8, | ||
paddingHorizontal: 11.5, | ||
paddingHorizontal: 12, |
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 thought we discussed changing this to 11?
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.
Oh, I forget that point while figuring out other issues. I will update it.
So there won't be any alignment issues in the future. All inputs are now calculating their own label placement position so I am sure it would be 99.999% perfect.
Please let me know if there is something remaining. This PR thread has so many comments I could have missed some points. But I think fixed all along the way. I didn't expect that this issue would take this much time as I didn't think the original input implementation has issues and used the wrong props (use of translate props as it is). Now I decided to refactor it. |
Sounds good to me! |
Maria is in a different time zone. Please give it 🟢 🚦 for merge. |
I think it's okay if Maria merges this tomorrow once she sees it and gets a chance to review. Thanks for your patience! |
@MariaHCD Please review it. |
I don't think Maria is available. I see no other reason for holding this. Just not looking for more merge conflicts. cc: @aldo-expensify |
Yup - looks like Maria is OOO this week, so I think we can go ahead and merge. |
:( :( :( :( thanks @parasharrajat , had a laugh with your gif, it was perfect 😆 |
57e9a65
I guess we wait for the E2E tests and then merge? |
Merging, @MariaHCD is OOO this week |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by @aldo-expensify in version: 1.1.17-8 🚀
|
🚀 Deployed to production by @roryabraham in version: 1.1.18-3 🚀
|
color: themeColors.text, | ||
height: '100%', | ||
paddingTop: 25, | ||
paddingTop: 23, |
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.
Dropping a friendly note that expensiTextInputLabelBackground
has height of 25px.
And expensiTextInput
's paddingTop was changed to 23px.
This caused issue - #14674 because the paddingTop and height of the label were misaligned.
inputRange: [styleConst.ACTIVE_LABEL_SCALE, styleConst.INACTIVE_LABEL_SCALE], | ||
outputRange: [-(this.state.width - (this.state.width * styleConst.ACTIVE_LABEL_SCALE)) / 2, 0], | ||
}), | ||
this.props.labelScale, |
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.
Dropping a friendly note that this has caused a regression in #17715.
There is a detailed explanation here, but in short, on Android, onLayout
was firing after the screen animation, setting this.state.width
and moving thelabel. This resulted in labels jumping horizontally right after the screen animation on Android
Details
Follow up #5742.
Fixed Issues
$ #5462
Tests | QA Steps
Tested On
Screenshots
Web | Mobile Web | Desktop
iOS
Android