-
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: removed line height from all inputs #15804
Conversation
Hey! I see that you made changes to our Form component. Make sure to update the docs in FORMS.md accordingly. Cheers! |
@techievivek @aimane-chnaif 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] |
@allroundexperts this should be applied to composer as well |
977feeb
to
fab71d5
Compare
@aimane-chnaif Updated. |
@@ -1400,6 +1401,9 @@ const styles = { | |||
|
|||
// Be extremely careful when editing the compose styles, as it is easy to introduce regressions. | |||
// Make sure you run the following tests against any changes: #12669 |
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.
@allroundexperts please test #12669 as comment says.
I don't think it's related but just to be safe.
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.
@aimane-chnaif Android and iOS attached.
Screen.Recording.2023-03-10.at.2.16.05.PM.mov
Screen.Recording.2023-03-10.at.2.18.18.PM.mov
Here's comparison per each platform: diff.movcc: @shawnborton |
3e41b89
to
78c6732
Compare
Reviewer Checklist
Screenshots/VideosWebweb.movMobile Web - Chromemchrome.movMobile Web - Safarimsafari.mp4Desktopdesktop.moviOSios.mp4Androidandroid.mov |
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.
@shawnborton @techievivek please check videos, especially in #15804 (comment).
I think no problem with changes and approving but will defer to you.
Hmm I'm gonna be honest, I don't love that now the composer box has a tighter line height - now the text you type doesn't match the same line height styling it would have when the text is sent and turned into a message. Is there a way to only do this for our text inputs and not the composer itself? |
yes, we might not want to touch composer but unfortunately cursor flicker also happens in android on composer though barely noticeable to users. |
@shawnborton so which options do you want this fixed by? About composer:
Same options for other multiline inputs (close account, invite members) |
@shawnborton @aimane-chnaif Just FYI, On android for the composer, there is a change in size of composer when you enter the first character of second line. This is also caused by the line height being set. Removing line height fixes that jump as well. Screen.Recording.2023-03-10.at.9.31.28.PM.mov |
Interesting, got it. Okay, well I guess it makes sense to move forward with this and see how it feels then. |
@allroundexperts can you also test #15864? |
|
oops. too close. can you also test and share android diff? |
Hmmm the lines on iOS feel way too close together now. I'm starting to think that maybe this is not the best solution just to fix a cursor glitch in Android. Are we sure there isn't a better solution that can solve the Android issue without causing all of these other design inconsistencies? |
|
Can you share before/after on iOS with two lines of text (no emojis) please? |
@shawnborton We probably should not apply this to composer. There isn't any noticeable flickering in the composer anyways. For Close account multiline input, it looks fine because there are no emojis there. |
can you find root cause why barely noticeable in composer than other multiline inputs?
You still can input emoji though.
I agree fixing cursor glitch is not more important than too close between lines. |
It's because initially composer is a |
Seeing #15864, I see that current |
So now I'd like to get suggestions from both of you @shawnborton @techievivek |
Which one is before or after in this comment? |
I believe small one is after fix but this depends device font size. |
@shawnborton Small one is after the fix. |
How do we proceed here? @shawnborton @techievivek |
I kind of think we should go back to the drawing board here and try to find a better solution honestly. This one is starting to feel a bit hacky to me. Thoughts on that? |
I agree. @techievivek if you +1, can we close this PR, go back to the issue and find better solution? |
@aimane-chnaif Thanks for letting me know. Do I get any compensation for this? Previously, I got paid if the PR was created but not merged due to this sort of issue. Ref |
I experienced this first time, so I am not sure. I will defer to @techievivek and @zanyrenney |
Hmmm... it looks like getting rid of line height is not a good choice over here. @allroundexperts, do you think you can explore some other solution here, or should we close this PR and look for a better fix? |
@techievivek The only other solution I can think of is fixing this on the native side. I'm not sure if I'll be able to do it since I don't have good knowledge of the native code. I'm still not sure why we can't just apply this to the close account text input on android only? |
@aimane-chnaif @shawnborton How about fixing this only for Android? @allroundexperts has shared the screen recordings for Android. Without line-height: In case we don't feel confident with the above solution then I can reach out to Callstack developers and see if we can get anyone to work on this issue. Let me know what you guys think. |
I think this is related to facebook/react-native#35951 |
@aimane-chnaif Good catch. It looks like this should get fixed after enabling the new architecture. |
Closing this PR as the callstack developers will be handling the linked issue now. |
Details
This PR removes line height from all text inputs.
Fixed Issues
$ #14799
$ #14799 (comment)
Tests
Offline tests
Not applicable
QA Steps
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
Screen.Recording.2023-03-10.at.3.57.44.AM.mov
Mobile Web - Chrome
With LH:
https://user-images.githubusercontent.com/30054992/224184220-dd0f6f72-4ecb-419d-851a-fd0cb6897429.mp4
Without LH:
https://user-images.githubusercontent.com/30054992/224184244-052f750d-4dca-49e1-bb23-1b406099092a.mp4
Mobile Web - Safari
With LH:
https://user-images.githubusercontent.com/30054992/224184323-fef3c45a-6acf-4833-951b-ae8d846de4a1.mp4
Without LH:
https://user-images.githubusercontent.com/30054992/224184330-9cc0ef10-24ee-4ad0-be0b-e4da2caf7b20.mp4
Desktop
Screen.Recording.2023-03-10.at.3.59.44.AM.mov
iOS
With LH:
https://user-images.githubusercontent.com/30054992/224184440-55a50942-d446-4c26-affc-f874d7dc506a.mp4
Without LH:
https://user-images.githubusercontent.com/30054992/224184445-eca40ce6-4360-434a-be61-c9aed3186a16.mp4
Android
With LH:
https://user-images.githubusercontent.com/30054992/224184503-cd146bb8-91b4-45a7-b360-ba090d28240b.mp4
Without LH:
https://user-images.githubusercontent.com/30054992/224184511-3baa391f-ddf0-4282-b3cd-cc6854918190.mp4