-
Notifications
You must be signed in to change notification settings - Fork 3k
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 long text cut in iOS single line input #14273
Conversation
Hey! I see that you made changes to our Form component. Make sure to update the docs in FORMS.md accordingly. Cheers! |
@yuwenmemon @mollfpr One of you needs to copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Reviewer Checklist
Screenshots/VideosWeb14273.Web-Safari.mov14273.Web-Chrome.movMobile Web - Chrome14273.mWeb-Chrome.movMobile Web - Safari14273.mWeb-Safari.movDesktop14273.Desktop.moviOS14273.iOS.movAndroid14273.Android.mov |
Co-authored-by: Luthfi <luthfi.ufi14@gmail.com>
So far so good! I'm surprised that my testing on the native app with increased font size doesn't break any input. 👍 Just need to complete the recordings and test one more time against the input refactoring PR. |
Maybe thanks to #10312 |
There's a side effect with removing the
cc @yuwenmemon |
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.
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.
One small comment (about a comment!)
this.props.secureTextEntry && styles.secureInput, | ||
!this.props.multiline && {height: this.state.height}, | ||
!this.props.multiline && {height: this.state.height, lineHeight: undefined}, |
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 think lineHeight: undefined
would look a bit odd to anyone coming across it randomly - can we add a comment explaining why it's here and what it's doing?
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.
+ // Remove `lineHeight` in single line input to fix long text cut issue on iOS
How about 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.
+ // Explicitly remove `lineHeight` from single line inputs so that long text doesn't disappear once it exceeds the input space (See https://github.com/Expensify/App/issues/13802)
How about that?
Thanks! |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
Performance Comparison Report 📊Significant Changes To DurationThere are no entries Meaningless Changes To DurationShow entries
Show details
|
🚀 Deployed to staging by @yuwenmemon in version: 1.2.55-0 🚀
|
🚀 Deployed to production by @AndrewGable in version: 1.2.55-0 🚀
|
|
||
// Explicitly remove `lineHeight` from single line inputs so that long text doesn't disappear | ||
// once it exceeds the input space (See https://github.com/Expensify/App/issues/13802) | ||
!this.props.multiline && {height: this.state.height, lineHeight: undefined}, |
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.
No inline styles.
|
||
// Explicitly remove `lineHeight` from single line inputs so that long text doesn't disappear | ||
// once it exceeds the input space (See https://github.com/Expensify/App/issues/13802) | ||
!this.props.multiline && {height: this.state.height, lineHeight: undefined}, |
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 the lineHeight is set to 'undefined,' there is a noticeable shift in the input causing it to move by a pixel or two when emoji is added to the input.
Issue: #26735
Platform: Web/Safari
Details
Fixed Issues
$ #13802 (comment)
PROPOSAL: #13802
Tests
Miroslav.stevanovic12345's Workspacelongnametest test
....
should be added at the end.Offline tests
Miroslav.stevanovic12345's Workspacelongnametest test
....
should be added at the end.QA Steps
Miroslav.stevanovic12345's Workspacelongnametest test
....
should be added at the end.PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.Screenshots/Videos
Web
web.mov
Mobile Web - Chrome
mchrome.mp4
Mobile Web - Safari
msafari.mp4
Desktop
desktop.mov
iOS
ios.mp4
While testing on iOS, I noticed that Save button blinks when open & close picker while showing keyboard. This is not related to this issue and can be handled in a separate issue.
Android
android.mp4