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

[$1000] mweb - App displays same welcome message page on back click on mobile chrome #22082

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. Open the app
  2. Open any room
  3. Click on room title in header to open room details
  4. Open settings
  5. Open welcome message
  6. Edit welcome message and click on save
  7. Again open welcome message
  8. Click on back button of your device and observe that it reopens same welcome message page

Expected Result:

App should display room settings when we click on back on welcome message page

Actual Result:

App displays same welcome message page when we save welcome message, reopen it and click on back

Workaround:

Unknown

Platforms:

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

Version Number: 1.3.35-5 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): Logs: https://stackoverflow.com/c/expensify/questions/4856 Notes/Photos/Videos: Any additional supporting documentation

https://github.com/Expensify/App/assets/93399543/36e02196-eaeb-4977-90d5-55b046eda68c

https://github.com/Expensify/App/assets/93399543/12fa4e3f-2662-47f7-88fe-90bb4c766bed

Expensify/Expensify Issue URL: Issue reported by: GH handle - @dhanashree-sawant Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1688225568421009

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01974ff1b6dd73c766
  • Upwork Job ID: 1677138510188093440
  • Last Price Increase: 2023-07-14
melvin-bot[bot] commented 1 year ago

Triggered auto assignment to @adelekennedy (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)

s-alves10 commented 1 year ago

Proposal

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

When click back button, app displays the same welcome message page This happens on mac/chrome as well

What is the root cause of that problem?

ReportWelcomeMessagePage and ReportSettingsPage are in different stack navigator

https://github.com/Expensify/App/blob/3b687018c3d907f1bcdea8f9a4a8cae90101959f/src/libs/Navigation/AppNavigator/ModalStackNavigators.js#L148-L155

https://github.com/Expensify/App/blob/3b687018c3d907f1bcdea8f9a4a8cae90101959f/src/libs/Navigation/AppNavigator/ModalStackNavigators.js#L203-L211

I think the root cause is same as here

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

We can replace the current path instead of going back.

  1. Replace the below code line https://github.com/Expensify/App/blob/3b687018c3d907f1bcdea8f9a4a8cae90101959f/src/pages/ReportWelcomeMessagePage.js#L59

with

        <HeaderWithBackButton
            title={props.translate('welcomeMessagePage.welcomeMessage')}
            onBackButtonPress={() => Navigation.navigate(ROUTES.getReportSettingsRoute(props.report.reportID, 'UP'))}
        />
  1. In updateWelcomeMessage function in Report.js, replace Navigation.goBack() with Navigation.navigate(ROUTES.getReportSettingsRoute(reportID, 'UP'))

This works as expected.

Result https://github.com/Expensify/App/assets/126839717/29747860-90a9-4c29-9157-2a780cd08665

What alternative solutions did you explore? (Optional)

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.

melvin-bot[bot] commented 1 year ago

@adelekennedy Whoops! This issue is 2 days overdue. Let's get this updated quick!

melvin-bot[bot] commented 1 year ago

Job added to Upwork: https://www.upwork.com/jobs/~01974ff1b6dd73c766

melvin-bot[bot] commented 1 year ago

Current assignee @adelekennedy is eligible for the External assigner, not assigning anyone new.

melvin-bot[bot] commented 1 year ago

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

adelekennedy commented 1 year ago

little glitchy, good to fix

melvin-bot[bot] commented 1 year ago

@parasharrajat, @adelekennedy Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

adelekennedy commented 1 year ago

one proposal to review - not doubling yet!

parasharrajat commented 1 year ago

@s-alves10 Proposal missing a proper explanation of the root cause and also an explanation of how you are solving the root cause (not what code is doing but theory).

parasharrajat commented 1 year ago

Waiting for proposals.

s-alves10 commented 1 year ago

@parasharrajat

Please read this https://github.com/react-navigation/react-navigation/issues/6434

ShogunFire commented 1 year ago

Can you still reproduce ? I think a change has been made in linkTo and that should solve it: https://github.com/Expensify/App/blob/main/contributingGuides/NAVIGATION.md#why-we-need-to-use-minimal-action-in-the-linkto-function

parasharrajat commented 1 year ago

@s-alves10 I will go through that when possible but it is better if you can explain here.

adelekennedy commented 1 year ago

I'm not able to reproduce (but I find the android reproduction steps tricky)

s-alves10 commented 1 year ago

yeah. it's not reproducible now

melvin-bot[bot] commented 1 year ago

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

adelekennedy commented 1 year ago

I'm going to close this one as I think this has been fixed - I think 25% is still due here for the proposal reviews

dhanashree-sawant commented 1 year ago

Hi @adelekennedy, @parasharrajat is it eligible for reporting bonus?

adelekennedy commented 1 year ago

Ah! Yes - thank you for catching that @dhanashree-sawant will you apply here ?

parasharrajat commented 1 year ago

@adelekennedy Requested 25% on NewDot.

anmurali commented 1 year ago

Approved $250 based on https://github.com/Expensify/App/issues/22082#issuecomment-1636284267

dhanashree-sawant commented 1 year ago

Hi @adelekennedy, @anmurali , sorry I missed that message, if possible, can you send me invite to the job?

adelekennedy commented 1 year ago

@dhanashree-sawant hired! Please accept and I'll pay out

dhanashree-sawant commented 1 year ago

Thanks @adelekennedy, Offer accepted.

dhanashree-sawant commented 1 year ago

Hi @adelekennedy, ping for approving the offer on upwork