You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment 2023-11-01] [$500] mWeb-Compose-Tapping emoji picker, for a million second, the message section is selected and shown #28698
changed the title [-]mWeb-Compose-Tapping emoji picker, for a million second, the message section is selected and shown[/-][+][$500] mWeb-Compose-Tapping emoji picker, for a million second, the message section is selected and shown[/+]on Oct 4, 2023
Please re-state the problem that we are trying to solve in this issue.
When tapping on emoji picker, for a million second, the message section is selected and shown and then only emoji box is displayed
What is the root cause of that problem?
We're using debounce for the window dimensions in withWindowDimensionshere. This leads to the windowHeight of withWindowDimensions being updated 300ms after the window dimensions change (for performance reasons). This windowHeight is being used in EmojiPicker. Meanwhile in PopoverWithMeasuredContent, we're using windowHeight from useWindowDimensions, which is updated immediately without the debounce. This means the popover dimensions and styles in EmojiPicker is updated 300ms late, causing message section to show briefly in the background.
What changes do you think we should make in order to solve the problem?
We need to use windowHeight (and other applicable props) from useWindowDimensions in EmojiPicker as well to be consistent with the PopoverWithMeasuredContent. Also we're planning to move away from HOC withWindowDimensions as per this comment as well so this makes sense.
We can optionally use the useWindowDimensions in the EmojiPickerMenu as well, but that one is currently still a class component. For now we can pass the windowHeight from EmojiPicker to EmojiPickerMenu (until the EmojiPickerMenu becomes a functional component, when we can use the hook).
What alternative solutions did you explore? (Optional)
We can apply a 300ms delay to showing the emoji picker to wait for the keyboard to close and also the window dimensions debounce to take effect.
changed the title [-][$500] mWeb-Compose-Tapping emoji picker, for a million second, the message section is selected and shown[/-][+][HOLD for payment 2023-11-01] [$500] mWeb-Compose-Tapping emoji picker, for a million second, the message section is selected and shown[/+]on Oct 25, 2023
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.90-2 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2023-11-01. 🎊
After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
External issue reporter
Contributor that fixed the issue
Contributor+ that helped on the issue and/or PR
For reference, here are some details about the assignees on this issue:
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
[@ntdiary] The PR that introduced the bug has been identified. Link to the PR:
[@ntdiary] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
[@ntdiary] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
[@ntdiary] Determine if we should create a regression test for this bug.
[@ntdiary] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
[@johncschuster] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
[@ntdiary] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion: No need
[@ntdiary] Determine if we should create a regression test for this bug. No need
[@ntdiary] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again. No need
[@johncschuster] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
No need for regression test, I think leaving the comment in the original PR is sufficient. Also, in our review checklist, we have stated that when changing a generic component, we should try to test the impacted components. : )
Activity
melvin-bot commentedon Oct 3, 2023
Triggered auto assignment to @johncschuster (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Oct 3, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)[-]mWeb-Compose-Tapping emoji picker, for a million second, the message section is selected and shown[/-][+][$500] mWeb-Compose-Tapping emoji picker, for a million second, the message section is selected and shown[/+]melvin-bot commentedon Oct 4, 2023
Job added to Upwork: https://www.upwork.com/jobs/~01968cbb3d0a1ef947
melvin-bot commentedon Oct 4, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ntdiary (
External)tienifr commentedon Oct 5, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
When tapping on emoji picker, for a million second, the message section is selected and shown and then only emoji box is displayed
What is the root cause of that problem?
We're using debounce for the window dimensions in
withWindowDimensionshere. This leads to thewindowHeightofwithWindowDimensionsbeing updated 300ms after the window dimensions change (for performance reasons). ThiswindowHeightis being used in EmojiPicker. Meanwhile in PopoverWithMeasuredContent, we're usingwindowHeightfromuseWindowDimensions, which is updated immediately without the debounce. This means the popover dimensions and styles inEmojiPickeris updated 300ms late, causing message section to show briefly in the background.What changes do you think we should make in order to solve the problem?
We need to use
windowHeight(and other applicable props) fromuseWindowDimensionsinEmojiPickeras well to be consistent with thePopoverWithMeasuredContent. Also we're planning to move away from HOCwithWindowDimensionsas per this comment as well so this makes sense.We can optionally use the
useWindowDimensionsin theEmojiPickerMenuas well, but that one is currently still a class component. For now we can pass thewindowHeightfromEmojiPickertoEmojiPickerMenu(until theEmojiPickerMenubecomes a functional component, when we can use the hook).What alternative solutions did you explore? (Optional)
We can apply a 300ms delay to showing the emoji picker to wait for the keyboard to close and also the window dimensions debounce to take effect.
johncschuster commentedon Oct 5, 2023
This isn't overdue. It was just triaged to @ntdiary
31 remaining items
[-][$500] mWeb-Compose-Tapping emoji picker, for a million second, the message section is selected and shown[/-][+][HOLD for payment 2023-11-01] [$500] mWeb-Compose-Tapping emoji picker, for a million second, the message section is selected and shown[/+]melvin-bot commentedon Oct 25, 2023
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Oct 25, 2023
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.90-2 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2023-11-01. 🎊
After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
For reference, here are some details about the assignees on this issue:
As a reminder, here are the bonuses/penalties that should be applied for any External issue:
melvin-bot commentedon Oct 25, 2023
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
ntdiary commentedon Nov 3, 2023
No need for regression test, I think leaving the comment in the original PR is sufficient. Also, in our review checklist, we have stated that when changing a generic component, we should try to test the impacted components. : )
melvin-bot commentedon Nov 6, 2023
@johncschuster, @marcochavezf, @ntdiary, @tienifr Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
johncschuster commentedon Nov 7, 2023
Payment has been issued! 🎉