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 2024-05-06] [HOLD #36071] [$1000] Textinput is not focused in chat after visiting conceirge help #21401
Looks like something related to react-navigation may have been mentioned in this issue discussion.
As a reminder, please make sure that all proposals are not workarounds and that any and all attempt to fix the issue holistically have been made before proceeding with a solution. Proposals to change our DeprecatedCustomActions.js files should not be accepted.
Please re-state the problem that we are trying to solve in this issue.
Chat doesn't get autofocus after visiting the concierge chat from the Get assistance page.
What is the root cause of that problem?
Chat will get autofocus if satisfies the below condition. shouldFocusInputOnScreenFocus is true for web/desktop platforms. The problematic condition is modal.isVisible. That condition tells us that it won't autofocus if a modal (including RHP) is visible.
When we open the Get Assistance page (or any RHP page), it will set the modal visibility to true and false if we close the page, but from this issue, when we visit the Concierge page by pressing the Chat with concierge button, modal visibility stays true.
// Clear search input (WorkspaceInvitePage) when modal is closed
SearchInputManager.searchInput='';
Modal.setModalVisibility(false);
},
};
It's because beforeRemove listener is never called, thus modal visibility stays true. Why? That's because we are doing a NAVIGATE action to the concierge chat.
On the web/desktop, it looks like the RHP is closed, but we can easily tell on a small screen that RHP is still open by pressing back.
What changes do you think we should make in order to solve the problem?
We should pass true as the first param of navigateToConciergeChat to dismiss the RHP modal and navigate to the concierge chat.
We need to fix this on some pages too (ManageTeamsExpensesModal, FinishChatCard, TroubleshootPage, and potentially in WalletStatementModal too but I don't how to access it).
changed the title [-]Textinput is not focused in chat after visiting conceirge help[/-][+][$1000] Textinput is not focused in chat after visiting conceirge help[/+]on Jun 29, 2023
changed the title [-][HOLD #36071] [$1000] Textinput is not focused in chat after visiting conceirge help[/-][+][HOLD for payment 2024-05-06] [HOLD #36071] [$1000] Textinput is not focused in chat after visiting conceirge help[/+]on Apr 29, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.67-7 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:
[@fedirjh] The PR that introduced the bug has been identified. Link to the PR:
[@fedirjh] 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:
[@fedirjh] 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:
[@fedirjh] Determine if we should create a regression test for this bug.
[@fedirjh] 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.
[@bfitzexpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
Activity
melvin-bot commentedon Jun 23, 2023
Triggered auto assignment to @michaelhaxhiu (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Jun 23, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)melvin-bot commentedon Jun 23, 2023
Looks like something related to
react-navigationmay have been mentioned in this issue discussion.As a reminder, please make sure that all proposals are not workarounds and that any and all attempt to fix the issue holistically have been made before proceeding with a solution. Proposals to change our
DeprecatedCustomActions.jsfiles should not be accepted.Feel free to drop a note in #expensify-open-source with any questions.
bernhardoj commentedon Jun 23, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Chat doesn't get autofocus after visiting the concierge chat from the Get assistance page.
What is the root cause of that problem?
Chat will get autofocus if satisfies the below condition.
shouldFocusInputOnScreenFocusis true for web/desktop platforms. The problematic condition ismodal.isVisible. That condition tells us that it won't autofocus if a modal (including RHP) is visible.App/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions/ComposerWithSuggestions.tsx
Lines 270 to 271 in 51ef6c1
When we open the Get Assistance page (or any RHP page), it will set the modal visibility to
trueandfalseif we close the page, but from this issue, when we visit the Concierge page by pressing the Chat with concierge button, modal visibility staystrue.App/src/libs/Navigation/AppNavigator/AuthScreens.tsx
Lines 141 to 150 in 51ef6c1
It's because
beforeRemovelistener is never called, thus modal visibility stays true. Why? That's because we are doing a NAVIGATE action to the concierge chat.App/src/pages/GetAssistancePage.tsx
Lines 37 to 40 in 51ef6c1
App/src/libs/actions/Report.ts
Lines 1744 to 1746 in 51ef6c1
On the web/desktop, it looks like the RHP is closed, but we can easily tell on a small screen that RHP is still open by pressing back.
What changes do you think we should make in order to solve the problem?
We should pass
trueas the first param ofnavigateToConciergeChatto dismiss the RHP modal and navigate to the concierge chat.We need to fix this on some pages too (ManageTeamsExpensesModal, FinishChatCard, TroubleshootPage, and potentially in WalletStatementModal too but I don't how to access it).
melvin-bot commentedon Jun 26, 2023
@michaelhaxhiu Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
melvin-bot commentedon Jun 28, 2023
@michaelhaxhiu Huh... This is 4 days overdue. Who can take care of this?
[-]Textinput is not focused in chat after visiting conceirge help[/-][+][$1000] Textinput is not focused in chat after visiting conceirge help[/+]melvin-bot commentedon Jun 29, 2023
Job added to Upwork: https://www.upwork.com/jobs/~01f42405b3f19296c4
melvin-bot commentedon Jun 29, 2023
Current assignee @michaelhaxhiu is eligible for the External assigner, not assigning anyone new.
137 remaining items
[-][HOLD #36071] [$1000] Textinput is not focused in chat after visiting conceirge help[/-][+][HOLD for payment 2024-05-06] [HOLD #36071] [$1000] Textinput is not focused in chat after visiting conceirge help[/+]melvin-bot commentedon Apr 29, 2024
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Apr 29, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.67-7 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-05-06. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Apr 29, 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:
habasefa commentedon May 9, 2024
Reporting bonus payment is pending. @bfitzexpensify the issue was created while bug reporting was being compensated $250
bfitzexpensify commentedon May 9, 2024
Payment complete to @bernhardoj
Offer sent @Habtamu-Asefa
Please complete the BZ checklist @fedirjh and I'll finalise your payment.
habasefa commentedon May 9, 2024
@bfitzexpensify Thank you, I just accepted the offer.
fedirjh commentedon May 10, 2024
BugZero Checklist:
bfitzexpensify commentedon May 10, 2024
Thanks @fedirjh. All payments complete, closing this out.