Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.11k stars 2.61k forks source link

[$250] Search - RHP closes or returns to transaction thread depending on which field is edited #43958

Open lanitochka17 opened 2 weeks ago

lanitochka17 commented 2 weeks ago

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 1.4.85-1 Reproducible in staging?: Y Reproducible in production?: Y If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4641773 Issue reported by: Applause - Internal Team

Action Performed:

Precondition:

Expected Result:

After editing the fields, there should be consistency whether the RHP should close and return to previous page. The RHP should not close after editing any field

Actual Result:

After editing Amount, Tag and Billable field, RHP closes. While for the rest of the fields, RHP returns to transaction thread after editing the fields

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

Screenshots/Videos

Add any screenshot/video evidence

https://github.com/Expensify/App/assets/78819774/0ef8de32-2858-4270-8aa1-5b3552a68880

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01d87627b980e14f86
  • Upwork Job ID: 1803575274326292159
  • Last Price Increase: 2024-06-19
  • Automatic offers:
    • ishpaul777 | Reviewer | 102865693
    • Krishna2323 | Contributor | 102865694
Issue OwnerCurrent Issue Owner: @ishpaul777
melvin-bot[bot] commented 2 weeks ago

Triggered auto assignment to @MitchExpensify (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 commented 2 weeks ago

@MitchExpensify 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

Krishna2323 commented 2 weeks ago

Proposal

Please re-state the problem that we are trying to solve in this issue.

Search - RHP closes or returns to transaction thread depending on which field is edited

What is the root cause of that problem?

There is inconsistency between edit request components, some uses Navigation.dismissModal() and some Navigation.goBack(backTo);.

https://github.com/Expensify/App/blob/362953d307fb97ff56e90cb5458f887b4b4132b1/src/pages/iou/request/step/IOURequestStepTag.tsx#L98-L104

https://github.com/Expensify/App/blob/362953d307fb97ff56e90cb5458f887b4b4132b1/src/pages/iou/request/step/IOURequestStepDate.tsx#L106-L110

https://github.com/Expensify/App/blob/362953d307fb97ff56e90cb5458f887b4b4132b1/src/pages/iou/request/step/IOURequestStepMerchant.tsx#L86-L107

https://github.com/Expensify/App/blob/362953d307fb97ff56e90cb5458f887b4b4132b1/src/pages/iou/request/step/IOURequestStepCurrency.tsx#L44-L56

https://github.com/Expensify/App/blob/362953d307fb97ff56e90cb5458f887b4b4132b1/src/pages/iou/request/step/IOURequestStepTaxRatePage.tsx#L86-L98

https://github.com/Expensify/App/blob/362953d307fb97ff56e90cb5458f887b4b4132b1/src/pages/iou/request/step/IOURequestStepAmount.tsx#L305-L306

https://github.com/Expensify/App/blob/362953d307fb97ff56e90cb5458f887b4b4132b1/src/pages/iou/request/step/IOURequestStepDescription.tsx#L128-L141

https://github.com/Expensify/App/blob/362953d307fb97ff56e90cb5458f887b4b4132b1/src/components/ReportActionItem/MoneyRequestView.tsx#L206-L216

Note: There are more components that are being used for editing IOU request, we should check all components which are used in the IOU request edit flow.

What changes do you think we should make in order to solve the problem?

We should update all components to navigate back instead of dismissing the modals. If we don't want to navigate back in all cases, we can just navigate back when editing, all components has isEditing variable to check for that.

For MoneyRequestView billable edit action we can use useIsReportOpenInRHP hook and won't call Navigation.dismissModal(); in saveBillable function.

What alternative solutions did you explore? (Optional)

Result

https://github.com/Expensify/App/assets/85894871/f2df7325-80b6-422f-80a3-4ef9d36988ed

Krishna2323 commented 2 weeks ago

Proposal Updated

MitchExpensify commented 2 weeks ago

I agree this is weird; the RHP should not close after editing any field IMO. If we close the RHP we're assuming the user is finished editing that expense which may not be the case. We should drop them back in the view they were previously on which is the RHP open.

melvin-bot[bot] commented 2 weeks ago

Job added to Upwork: https://www.upwork.com/jobs/~01d87627b980e14f86

melvin-bot[bot] commented 2 weeks ago

Triggered auto assignment to Contributor-plus team member for initial proposal review - @ishpaul777 (External)

ishpaul777 commented 1 week ago

We can go with @Krishna2323 Proposal!

πŸŽ€ πŸ‘€ πŸŽ€ C+ reviewed!

melvin-bot[bot] commented 1 week ago

Triggered auto assignment to @NikkiWines, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

NikkiWines commented 1 week ago

Agreed, @Krishna2323's proposal looks fine for this issue

melvin-bot[bot] commented 1 week ago

πŸ“£ @ishpaul777 πŸŽ‰ An offer has been automatically sent to your Upwork account for the Reviewer role πŸŽ‰ Thanks for contributing to the Expensify app!

Offer link Upwork job

melvin-bot[bot] commented 1 week ago

πŸ“£ @Krishna2323 πŸŽ‰ An offer has been automatically sent to your Upwork account for the Contributor role πŸŽ‰ Thanks for contributing to the Expensify app!

Offer link Upwork job Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review πŸ§‘β€πŸ’» Keep in mind: Code of Conduct | Contributing πŸ“–

Krishna2323 commented 1 week ago

Will raise PR for this tomorrow.

ishpaul777 commented 1 week ago

Update ^

Krishna2323 commented 5 days ago

@ishpaul777, PR ready for review ^