-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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 2023-10-23] [HOLD for payment 2023-10-23] [$500] Web - Chat - Edit message box blink on escape from keyboard shortcut popup #26527
Comments
Triggered auto assignment to @anmurali ( |
Bug0 Triage Checklist (Main S/O)
|
Can reproduce and is not a dupe |
Job added to Upwork: https://www.upwork.com/jobs/~01ad8834baac53effd |
Current assignee @anmurali is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @narefyev91 ( |
What is the expected behavior here @anmurali? Should the edit message box be focused? |
This comment was marked as outdated.
This comment was marked as outdated.
Hey @ayazalavi ! Removing focus will fully break this logic: |
@narefyev91 Working video: 480.Screen.Recording.2023-09-06.at.5.13.08.PM.movIt is not not breaking this "We want to focus or refocus the input when a modal has been closed or the underlying screen is refocused." Which modal is this referring to? |
@ayazalavi your fix will break all modal closing re-focus input logic: Screen.Recording.2023-09-06.at.15.23.36.movWithout your fix: Screen.Recording.2023-09-06.at.15.24.23.mov |
ProposalPlease re-state the problem that we are trying to solve in this issue.After selecting any chat from the sidebar and editing any comment within it, the focus shifts to the main compose input once you close the modal with the glitch. What is the root cause of that problem?Root cause is the modal we are using in our codebase. It shifts focus back to input field as soon as it closes. reactjs/react-modal#680 What changes do you think we should make in order to solve the problem?Use ONYX to tap edit field focus. In Line 9 in ea5f461
add EDITFOCUSED: 'editFocused',
Add
in App/src/pages/home/report/ReportActionItemMessageEdit.js Lines 455 to 468 in ea5f461
and this
in
The above useEffect ensures that if the edit input is focused, then ONYX EDITFOCUSED should be set to true. In the second condition, it checks if the input is not focused but was previously focused. In this case, it checks if the modal becomes visible using a timeout. If it doesn't become visible, then it sets ONYX EDITFOCUSED to false. This ensures that the input is only considered out of focus when it happens for reasons other than the modal. The above code will work generically for all modals. It can be made more generic to ensure input field can maintain focus with modal opening and will prevent shifting focus to main composer input field. We can make it a hook as well to ensure field focus doesn't gets broken due to modal. Here App/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions.js Lines 532 to 540 in ea5f461
Add
Update this App/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions.js Lines 434 to 435 in ea5f461
to
add Result: Untitled.11.mp4What alternative solutions did you explore? (Optional)before opening modal blur edit text field. |
@ayazalavi can you please explain why those lines of code will fix issues - and did you test your code? Will it introduce any regression? Just the same as i mentioned above with focusing composer - after closing right panel |
@narefyev91 please take a look at my new proposal here |
@ayazalavi thank you for your updated proposal - but your code still introduce regressions Screen.Recording.2023-09-11.at.12.03.55.movHow it's after your code: Screen.Recording.2023-09-11.at.12.06.05.mov |
Also some issues with Android web as well Screen.Recording.2023-09-11.at.12.16.12.movAfter: Screen.Recording.2023-09-11.at.12.13.51.movWe should be sure that any new changes regarding autofocus will not introduce any regression on each platform |
@narefyev91 thanks for such detailed review. Let me fix my proposal. Thanks again for the feedback as well. |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
@narefyev91 update to #26527 (comment) proposal: Root cause:As soon as modal gets closed then this react hook gets called forcing focus to compose field: App/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions.js Lines 423 to 436 in 662af46
SolutionRemove modal.isVisible from dependency array so that callback does'nt gets triggered on every modal closing.
Here is how it looks: Untitled.mp4 |
Based on my calculations, the pull request did not get merged within 3 working days of assignment. Please, check out my computations here:
On to the next one 🚀 |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.84-10 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-10-23. 🎊 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:
|
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:
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.84-10 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-10-23. 🎊 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:
|
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:
|
@narefyev91 could you complete the checklist please? |
|
Payment Summary:
@dhanashree-sawant = $50 |
@dhanashree-sawant = paid |
Everyone has been paid so closing this. |
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:
Edit message box should not glitch out on change of focus to main compose box as it works currently on ESC from CTRL+K or CTRL+SHIFT+K shortcuts
Actual Result:
Edit message box blinks on change of focus to main compose box when keyboard shortcut is open using CTRL+J and closed by ESC
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: v1.3.61-3
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): Y
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
edit.box.blink.on.ESC.mp4
Bandicam.2023-09-01.23-37-36-100.mp4
Expensify/Expensify Issue URL:
Issue reported by: @dhanashree-sawant
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1692944783305439
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: