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.36k stars 2.78k forks source link

Web -LHN - LHN doesn't reflect report value before click #21620

Closed kbecciv closed 1 year ago

kbecciv commented 1 year 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!


Action Performed:

1, Click on FAB menu

  1. Click on split bill button
  2. Click Enter amount
  3. Search & select multiple user
  4. Click on split button
  5. Click on one of the newly created reports from LHN

Expected Result:

LHN should reflect report value before click

Actual Result:

LHN reflects report value after a click on LHN

Workaround:

Unknown

Platforms:

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

Version Number: 1.3.31-1 Reproducible in staging?: n/a Reproducible in production?: n/a If this was caught during regression testing, add the test name, ID and link from TestRail: Email or phone of affected tester (no customers): Logs: https://stackoverflow.com/c/expensify/questions/4856 Notes/Photos/Videos: Any additional supporting documentation

https://github.com/Expensify/App/assets/93399543/cd701d08-b7f1-40fa-8eed-f611d860628b

Expensify/Expensify Issue URL: Issue reported by: @Natnael-guchima Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1687456348210999

View all open jobs on GitHub

melvin-bot[bot] commented 1 year ago

Triggered auto assignment to @dylanexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

melvin-bot[bot] commented 1 year ago

Bug0 Triage Checklist (Main S/O)

Shivam7-1 commented 1 year ago

Proposal

LHN reflects report value after a click on LHN

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

What is the root cause of that problem? The issue in the code is that the Left Hand Navigation (LHN) does not reflect the report value before clicking on it. Currently, it updates the LHN after a click on the report. This happens in SplitBillDetailsPage.js code file In this code file SplitBillDetailsPage Function Given this error in UI

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

In Solution of this issue The code can modify as follows:

  1. In the withReportOrNotFound HOC (Higher Order Component), update the reportActions prop to fetch the report actions for the given report ID before rendering the component. This will ensure that the report actions are available in the component's props when it mounts.

  2. Update the SplitBillDetailsPage component to handle the case where the report or report action is not found. In the case where the report or report action is not found, display an appropriate error message or fallback UI.

By making these changes, the SplitBillDetailsPage component will receive the reportActions prop with the necessary data before rendering. It will also handle the case where the report action is not found and display an appropriate error message or fallback UI.

melvin-bot[bot] commented 1 year ago

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.

Feel free to drop a note in #expensify-open-source with any questions.

jjcoffee commented 1 year ago

Not reproducible in v1.3.33-3.

Natnael-Guchima commented 1 year ago

@jjcoffee It is still reproducible. The reports that are affected are not the ones with GBR, rather are the chats I have opened at the end of the video.

Screencast from 2023-06-27 13-26-49.webm

dylanexpensify commented 1 year ago

Clarifying something in channel

dylanexpensify commented 1 year ago

bumped channel for thoughts!

Natnael-Guchima commented 1 year ago

@dylanexpensify I think the issue is fixed on the latest build. I will check again and let you know if it is fixed or not.

dylanexpensify commented 1 year ago

reviewing today and posting next steps!

dylanexpensify commented 1 year ago

agreed, i believe this is fixed!