-
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 PR #23994][$1000] The keyboard is re rendered when an emoji appears #22052
Comments
Triggered auto assignment to @mallenexpensify ( |
Bug0 Triage Checklist (Main S/O)
|
according to Expected Result and Actual Result this is not an issue as they both are same |
@nitin-kukreti updated the steps, Keyboard rerenders and also you can see a weird flicker of the page too. |
Job added to Upwork: https://www.upwork.com/jobs/~01db7d5a756e5284d5 |
Current assignee @mallenexpensify is eligible for the External assigner, not assigning anyone new. |
was able to reproduce, moving along |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @abdulrahuman5196 ( |
The problem will be solved by: leveraging the shouldComponentUpdate method in thecomponent and checking for specific conditions related to the keyboard event.
In this example, the EmojiSafeTextInput component extends the TextInput component from React Native. The shouldComponentUpdate method is overridden to handle comparing the value and selection properties. If the selection's value or start and end positions remain the same, indicating an emoji selection event, the method returns false, preventing the component from re-rendering. Another way could be to use: Memoized Selectors with Reselect Reselect selectors are capable of computing derived data. |
📣 @soustab10! 📣
|
Contributor details |
✅ Contributor details stored successfully. Thank you for contributing to Expensify! |
Contributor details |
✅ Contributor details stored successfully. Thank you for contributing to Expensify! |
ProposalPlease re-state the problem that we are trying to solve in this issue.the keyboard should not re-rendered when we select an emoji What is the root cause of that problem?In iOS, when a modal (emoji modal) is opened while the keyboard is still opened, the default behavior is that the keyboard will be closed, then after the modal is closed, the keyboard will reopen again. This is the root cause and it's why the issue only happens on iOS. What changes do you think we should make in order to solve the problem?We can simply dismiss the keyboard ( The composer is already automatically focused after the emoji picker closes. What alternative solutions did you explore? (Optional)If we want to wait for the keyboard to close completely before opening the emoji picker, we can do the following: In here https://github.com/Expensify/App/blob/f9a8529f18696b2584d57c960933cefdf7b2e6af/src/components/EmojiPicker/EmojiPickerButton.js#L36C22-L36C22, we'll only open the modal after the keyboard hides completely
( The above is reusable so we can create an util like |
@mallenexpensify, @abdulrahuman5196 Whoops! This issue is 2 days overdue. Let's get this updated quick! |
Will provide review on the proposals in the morning |
Current assignee @abdulrahuman5196 is eligible for the Internal assigner, not assigning anyone new. |
@mallenexpensify Gentle ping on this #22052 (comment) |
@mallenexpensify We should just close this. The other issue has a contributor assigned |
The two issues are slightly different in nature. We know that in iOS, UIKit will save the keyboard state when opening a modal, and then forcibly restore it when closing the modal. For this issue, the keyboard flashing is because we call Finally, the patch to Just making a small note here. : ) |
Thanks for the information @ntdiary . Then I think we can have this on hold @mallenexpensify just to reverify after the other issue is closed. |
@mallenexpensify, @abdulrahuman5196 Huh... This is 4 days overdue. Who can take care of this? |
@ntdiary I saw you got hired for #13922 last week, do you think it's best to put this on hold, pending that being fixed or should we fix this independently? Also.. thanks for the comments above. Also, also... sorry I've been lagging (espec to @abdulrahuman5196 ), I was out a bit and have a project with a deadline I've been focused on. |
@mallenexpensify, if this is not a very urgent issue, we could wait for PR #23994 to be merged (i.e., put this issue on hold), since the patch file there also fixes this issue. 🙂 |
@mallenexpensify, @abdulrahuman5196 10 days overdue. Is anyone even seeing these? Hello? |
1 similar comment
@mallenexpensify, @abdulrahuman5196 10 days overdue. Is anyone even seeing these? Hello? |
@mallenexpensify, @abdulrahuman5196 12 days overdue now... This issue's end is nigh! |
Looks like this is fixed now. #23994 (comment) |
Closing. The bug reporting bounty isn't eligible because #13922 was reported well before this issue |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Action Performed:
Expected Result:
the keyboard should not re-rendered when we select an emoji
Actual Result:
keyboard is re-rendered when we select an emoji and also there is a flickering of the page
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.35-5
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
RPReplay_Final1688151270.1.mov
RPReplay_Final1688217113.MP4
Expensify/Expensify Issue URL:
Issue reported by: @eusalazar
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1688152676612889
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: