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
[Awaiting checklist] [$250] Mention - Delay in removing mention list when pressing CMD+K #41136
@twisterdotcom FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors
When we open the search page through shortcut, the focus will shift from the composer to the search page search input after the navigation completes, so it feels delayed.
If we open the search page by mouse, then the composer is immediately blurred when we press the search button, so the issue doesn't happen.
If we open the keyboard shortcut page, then the composer will never be blurred and the suggestion will still be shown.
What changes do you think we should make in order to solve the problem?
Blur the composer immediately when the shortcut is pressed by blurring the active element.
document.activeElement.blur() // we do this for web only
Additional for Emoji suggestions menu we need update some code to make consistence between Emoji and Mention suggestions (These changes are not relevant in the case of useEffect, but for consistence I think these changes should be made in any case)
if (shouldBlockCalc.current || !value || !isComposerFocused) {
changed the title [-] Mention - Delay in removing mention list when pressing CMD+K[/-][+][$250] Mention - Delay in removing mention list when pressing CMD+K[/+]on Apr 29, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.79-11 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve 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:
[@eVoloshchak] The PR that introduced the bug has been identified. Link to the PR:
[@eVoloshchak] 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:
[@eVoloshchak] 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:
[@eVoloshchak] Determine if we should create a regression test for this bug.
[@eVoloshchak] 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.
[@twisterdotcom] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
changed the title [-][HOLD for payment 2024-06-13] [$250] Mention - Delay in removing mention list when pressing CMD+K[/-][+][Awaiting checklist] [$250] Mention - Delay in removing mention list when pressing CMD+K[/+]on Jun 14, 2024
The PR that introduced the bug has been identified. Link to the PR: unable to pinpoint the exact PR that has caused this, as this was present in the initial implementation
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: N/A
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: I don't think an additional discussion is needed
Regression Test Proposal
Open a chat
Enter "@" or start typing an emoji name to open mentions/emoji list
Press CMD+K to open the search modal
Verify there is no delay when mentions or emoji list is hidden
Activity
melvin-bot commentedon Apr 27, 2024
Triggered auto assignment to @twisterdotcom (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.lanitochka17 commentedon Apr 27, 2024
@twisterdotcom FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors
lanitochka17 commentedon Apr 27, 2024
We think that this bug might be related to #vip-vsp
bernhardoj commentedon Apr 27, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
The mention suggestion is closed with a delay when we open search page with shortcut.
What is the root cause of that problem?
The mention suggestion list will close when the composer is blurred.
App/src/pages/home/report/ReportActionCompose/SuggestionMention.tsx
Lines 346 to 348 in 10fc359
App/src/pages/home/report/ReportActionCompose/SuggestionMention.tsx
Lines 281 to 285 in 10fc359
When we open the search page through shortcut, the focus will shift from the composer to the search page search input after the navigation completes, so it feels delayed.
If we open the search page by mouse, then the composer is immediately blurred when we press the search button, so the issue doesn't happen.
If we open the keyboard shortcut page, then the composer will never be blurred and the suggestion will still be shown.
What changes do you think we should make in order to solve the problem?
Blur the composer immediately when the shortcut is pressed by blurring the active element.
App/src/libs/Navigation/AppNavigator/AuthScreens.tsx
Lines 246 to 248 in 10fc359
do for other shortcuts too
ZhenjaHorbach commentedon Apr 27, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Mention - Delay in removing mention list when pressing CMD+K
What is the root cause of that problem?
The main problem with issue is that when we open modal using CMD+K we still have isComposerFocused equal true
App/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions/ComposerWithSuggestions.tsx
Line 775 in 10fc359
And as a result, we have a short period of time when Suggestions menu is still open until the input is blurred
What changes do you think we should make in order to solve the problem?
To fix this issue we can update this line and add
isFocused(or useEffect and blur input when the screen out of focus )isComposerFocused={textInputRef.current?.isFocused() && isFocused}OR
App/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions/ComposerWithSuggestions.tsx
Line 775 in 10fc359
Additional for Emoji suggestions menu we need update some code to make consistence between Emoji and Mention suggestions (These changes are not relevant in the case of useEffect, but for consistence I think these changes should be made in any case)
if (shouldBlockCalc.current || !value || !isComposerFocused) {App/src/pages/home/report/ReportActionCompose/SuggestionEmoji.tsx
Line 154 in 10fc359
Like here
App/src/pages/home/report/ReportActionCompose/SuggestionMention.tsx
Line 281 in 10fc359
AND
App/src/pages/home/report/ReportActionCompose/SuggestionEmoji.tsx
Lines 181 to 186 in 10fc359
Like here
App/src/pages/home/report/ReportActionCompose/SuggestionMention.tsx
Lines 346 to 348 in 10fc359
Result:
Details
2024-04-27.16.59.51.mov
NA
[-] Mention - Delay in removing mention list when pressing CMD+K[/-][+][$250] Mention - Delay in removing mention list when pressing CMD+K[/+]melvin-bot commentedon Apr 29, 2024
Job added to Upwork: https://www.upwork.com/jobs/~014d621ca194199c72
melvin-bot commentedon Apr 29, 2024
Triggered auto assignment to Contributor-plus team member for initial proposal review - @eVoloshchak (
External)48 remaining items
melvin-bot commentedon Jun 6, 2024
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Jun 6, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.79-11 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 2024-06-13. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Jun 6, 2024
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:
twisterdotcom commentedon Jun 14, 2024
Payment Summary
Upwork Job
[-][HOLD for payment 2024-06-13] [$250] Mention - Delay in removing mention list when pressing CMD+K[/-][+][Awaiting checklist] [$250] Mention - Delay in removing mention list when pressing CMD+K[/+]twisterdotcom commentedon Jun 17, 2024
Still waiting on @eVoloshchak.
eVoloshchak commentedon Jun 18, 2024
Regression Test Proposal
Do we agree 👍 or 👎
JmillsExpensify commentedon Jun 19, 2024
$250 approved for @eVoloshchak