-
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
[HOLD for payment 2025-01-02] [$250] iOS - Profile - Display Name - Keyboard blinks when focus is changed #53078
Comments
Triggered auto assignment to @jliexpensify ( |
ios <> Android swap |
Edited by proposal-police: This proposal was edited at 2024-11-25 22:15:00 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.In the iOS app, users experience keyboard blinking and re-rendering when switching focus between display name input fields (first and last name) What is the root cause of that problem?This is an iOS-specific rendering issue where:
What changes do you think we should make in order to solve the problem?We have few options as workarounds, root cause is deeply embedded in iOS. App/src/pages/settings/Profile/DisplayNamePage.tsx Lines 92 to 116 in e4ac07a
Trade-offs to consider:
we can use What alternative solutions did you explore? (Optional)Another approach involves modifying the React Native App/src/components/ScreenWrapper.tsx Line 278 in b4876bc
ignoreIOSKeyboardWillChangeEvents for iOS to selectively preventproblematic keyboard re-render events. facebook/react-native#39411 (comment) Screen.Recording.2024-11-26.at.3.08.43.AM.mov |
Job added to Upwork: https://www.upwork.com/jobs/~021861288508956384711 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @DylanDylann ( |
Edited by proposal-police: This proposal was edited at 2024-11-26 15:56:42 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.Keyboard blinks when focus is changed What is the root cause of that problem?The soft keyboard briefly resets when switching between input fields. This occurs due to the autoCapitalize behavior in React Native's TextInput. Initially, the keyboard defaults to uppercase but adjusts to lowercase after recognizing the input state. What changes do you think we should make in order to solve the problem?Using the
src/pages/settings/Profile/DisplayNamePage.tsx#L94
<View style={styles.mb4}>
<InputWrapper
InputComponent={TextInput}
inputID={INPUT_IDS.FIRST_NAME}
name="fname"
label={translate('common.firstName')}
aria-label={translate('common.firstName')}
role={CONST.ROLE.PRESENTATION}
defaultValue={currentUserDetails.firstName ?? ''}
spellCheck={false}
isMarkdownEnabled
+ autoCapitalize="words"
/>
</View>
<View>
<InputWrapper
InputComponent={TextInput}
inputID={INPUT_IDS.LAST_NAME}
name="lname"
label={translate('common.lastName')}
aria-label={translate('common.lastName')}
role={CONST.ROLE.PRESENTATION}
defaultValue={currentUserDetails.lastName ?? ''}
spellCheck={false}
isMarkdownEnabled
+ autoCapitalize="words"
/>
</View> Note: If a similar case arises(Legal name), we can reuse this solution POCScreen.Recording.2024-11-26.at.22.54.07.movWhat alternative solutions did you explore? (Optional)Using the |
I can't reproduce this bug on IOS simulators |
@huult As per your explanation, I am confused as to why |
@DylanDylann I am still able to reproduce this bug on iOS simulators Screen.Recording.2024-11-28.at.11.59.40.mov |
Hmmm... Or it can be only reproduced on iPhone 16 |
Can't reproduce on IP 15 pro max (IOS 17.2) Screen.Recording.2024-11-28.at.12.12.11.mov |
Your rCA isn't correct in my case |
I will try testing the same as your model. |
@DylanDylann I tested it, and this only happens on iOS 18. When we change the text input field, the keyboard switches to uppercase and then to lowercase. Screen.Recording.2024-11-28.at.13.12.53.mov |
Since you are using iOS 17.2, this issue does not occur on this version. I initialized a new project and tested it as shown in the video below. Screen.Recording.2024-11-28.at.13.41.35.mov |
@huult Do you have any reference for this point? |
Another thing, your proposal will change expected behavior that we confirmed before |
Also please help to detail why alternative solution will solve this problem |
facebook/react-native#47997 I posted this issue in the React Native community and hope to get support soon. I searched but did not find any related bug reports.
We asked the design team when I was hired.
I found the solution in this ticket: #16685, and we have used the same approach in this case. I believe we can use it as well |
Let's make it clear first, I can't approve proposals that change the expected behavior (maybe cause regression) |
@parasharrajat I see the current behavior still matches with the expected. Could you help to point out what regression is here? (if possible please detail it as much as possible) |
@MariaHCD I think this is okay, could you please take a look and confirm? |
Thanks for the screenshots, @rezkiy37 - that definitely helps visualize the change :)
The change in the size of the emojis have decreased. However, in my opinion, it's a very minor change and the keyboard blinking is a more noticeable UX issue than the size of the emoji. I also notice that the size of the field labels have increased - is that a side effect of removing My recommendation is to keep our change as is. Happy to hear thoughts from @parasharrajat @DylanDylann @rezkiy37 if you agree or have concerns. |
Agree 👍 |
Yes, we increased the emoji to look bigger in the old PR as per scene 5. Now, because we removed markdown input, it will behave like normal text and emoji will not look bigger. If we want to keep this change, then we should update the regression steps to indicate that change and possibly create a slack thread to inform the design team or original proposer who created that issue. |
Issue not reproducible during KI retests. (First week) |
@Expensify/design this fix makes a change to the size of emojis, would love for you guys to weigh in on whether this is okay. |
Hmm. I don't think the decrease in emoji's is a huge deal. Ideally it should just match the font size and I dunno enough about the technical implications here etc. If we believe this is the only way to get rid of the blinking than this seems fine. Keen to hear the other designers thoughts as well |
I'm a bit lost when it comes to emoji sizes since things have changed so frequently over the past few months. I agree with Jon's sentiment though - I would imagine that in most cases, the emoji is just the same size as the font we're using. Only in the special cases where the message is just emojis would we increase the size (similar to WhatsApp or Slack). In the particular change being called out above, how much has the emoji size decreased? |
Basically, it has been aligned with the text size: Lines 1230 to 1232 in cdc4c4a
Line 54 in cdc4c4a
So the default value is 15pt. For instance, the emoji size was 19pt. |
I feel the same as Shawn and Jon. |
Sounds like we all agree to keep our PR as is 👍🏼 @kadiealexander I think we can move forward here? |
Awesome! Payment summary is here for the NewDot payment reviewer. |
@kadiealexander I still get paid via Upwork |
Ah sorry for that @DylanDylann, I've issued payment and updated the summary. |
Another issue led me here - I just wanted to confirm, did we end up changing the emoji font size? @rezkiy37 can you confirm and point me to the corresponding PR? Thanks! |
@shawnborton, yes, we did. #54293. |
Can you show me where/how in the PR we are changing the emoji size though? I'm not connecting the dots very well, apologies! |
@shawnborton Sure! We've replaced the markdown input with the regular one from RN. I didn't change some styles because the previous input parsed emojis and made them bigger. ![]() |
Ah okay, so basically what happened is that we removed |
Ah, yeah. We have changed only inputs on the profile display name page. Nowhere else. |
Ah okay, apologies for misunderstanding and thanks for clarifying! |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 9.0.66-3
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Issue reported by: Applause - Internal Team
Action Performed:
Expected Result:
Keyboard shouldn’t blink when focus is changed
Actual Result:
Keyboard blinks when focus is changed
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6642786_1729655434200.E-16685.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @kadiealexanderThe text was updated successfully, but these errors were encountered: