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
[$500] Request Money - [Scan receipt] Compose box is not focused when visiting requested money details chat after deleting another one #27249
Please re-state the problem that we are trying to solve in this issue.
Compose box is not focused when visiting requested money details chat after deleting another one
What is the root cause of that problem?
This bug occurs with the case manual request as well.
Below are the main steps occurs when deleting request money and visit another one:
When opening the TransactionThread and clicking on the "Delete Request" button, it will open the confirm modal and set the modal.isVisible to true. (ONYXKEYS.MODAL)
After clicking the "Delete" button in the confirm modal, it will navigate the user to the previous report screen without setting the modal.isVisible to true because the modal is unmounted before the onModalHide function (which will set the modal.isVisible to false) is called:
Because the modal.isVisible is still true, visiting another one will not auto focus on the composer
What changes do you think we should make in order to solve the problem?
We should set the Modal.isvisible to false before navigation actions like below:
function deleteMoneyRequest(transactionID, reportAction, isSingleTransactionView = false) {
...
Modal.setModalVisibility(false);
if (isSingleTransactionView && shouldDeleteTransactionThread && !shouldDeleteIOUReport) {
// Pop the deleted report screen before navigating. This prevents navigating to the Concierge chat due to the missing report.
Navigation.goBack();
Navigation.navigate(ROUTES.getReportRoute(iouReport.reportID));
return;
}
if (shouldDeleteIOUReport) {
// Pop the deleted report screen before navigating. This prevents navigating to the Concierge chat due to the missing report.
Navigation.goBack();
Navigation.navigate(ROUTES.getReportRoute(iouReport.chatReportID));
}
}
What alternative solutions did you explore? (Optional)
I reproduced this and do think it's a bug. Here's what I notice:
When I click into the User a owes $X thread from a DM chat, the compose box is focused/highlighted by default
When I click into an IOU or manual request (I.e. receipt scan in progress) from the User a owes $X thread, the compose box is unfocused by default (this is expected)
When I click back out to the User a owes $X thread via the "From" link at the top of the page, the compose box is focused (expected)
When I click back into the User a owes $X thread, then click into an IOU or manual request and delete that IOU/manual request, it brings me back to the User a owes $X thread with the compose box unfocused (not expected behavior).
changed the title [-]Request Money - [Scan receipt] Compose box is not focused when visiting requested money details chat after deleting another one[/-][+][$500] Request Money - [Scan receipt] Compose box is not focused when visiting requested money details chat after deleting another one[/+]on Sep 14, 2023
After clicking on the confirm button and navigating to previous report, this cleanup function is called but the isVisible is always false so the hideModal is not called. So we can fix this by adding the isVisible to the dependences
@DylanDylann can you please share video to verify your fix?
Activity
DylanDylann commentedon Sep 12, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?
App/src/components/MoneyRequestHeader.js
Lines 70 to 73 in a2d71a3
App/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions.js
Lines 422 to 435 in 7f5c14a
What changes do you think we should make in order to solve the problem?
What alternative solutions did you explore? (Optional)
Result
Screencast.from.11-09-2023.22.41.13.webm
melvin-bot commentedon Sep 12, 2023
Triggered auto assignment to @sakluger (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Sep 12, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)sakluger commentedon Sep 14, 2023
I reproduced this and do think it's a bug. Here's what I notice:
User a owes $Xthread from a DM chat, the compose box is focused/highlighted by defaultUser a owes $Xthread, the compose box is unfocused by default (this is expected)User a owes $Xthread via the "From" link at the top of the page, the compose box is focused (expected)User a owes $Xthread, then click into an IOU or manual request and delete that IOU/manual request, it brings me back to theUser a owes $Xthread with the compose box unfocused (not expected behavior).[-]Request Money - [Scan receipt] Compose box is not focused when visiting requested money details chat after deleting another one[/-][+][$500] Request Money - [Scan receipt] Compose box is not focused when visiting requested money details chat after deleting another one[/+]melvin-bot commentedon Sep 14, 2023
Job added to Upwork: https://www.upwork.com/jobs/~01a4ca96d5c6ee6b8d
melvin-bot commentedon Sep 14, 2023
Current assignee @sakluger is eligible for the External assigner, not assigning anyone new.
melvin-bot commentedon Sep 14, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @0xmiroslav (
External)sakluger commentedon Sep 18, 2023
@0xmiroslav could you please have a look at the proposal we got last week? Thanks!
6 remaining items
melvin-bot commentedon Sep 21, 2023
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
0xmiroslav commentedon Sep 21, 2023
@DylanDylann can you please share video to verify your fix?
DylanDylann commentedon Sep 21, 2023
@0xmiroslav Please help check this video
Screencast.from.21-09-2023.23.54.26.webm
sakluger commentedon Sep 22, 2023
Chill out Melvin, we're working on this one.
0xmiroslav commentedon Sep 22, 2023
@DylanDylann your solution was deprecated in #27639.
Please update proposal
DylanDylann commentedon Sep 22, 2023
@0xmiroslav Maybe this issue has been fixed. Can not reproduce this now
0xmiroslav commentedon Sep 22, 2023
I am also not able to reproduce.
@sakluger let's close
melvin-bot commentedon Sep 25, 2023
@sakluger, @0xmiroslav Whoops! This issue is 2 days overdue. Let's get this updated quick!
sakluger commentedon Sep 25, 2023
Okay, thanks you two. Closing.