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.35k stars 2.77k forks source link

[$250] No response when clicking back button and link on not found page #48761

Open m-natarajan opened 2 weeks ago

m-natarajan 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: 9.0.30-15 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 Expensify/Expensify Issue URL: Issue reported by: @dukenv0307 Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1725706526160129

Action Performed:

  1. Create a new workspace
  2. Navigate to Workspace Settings > More Features > Enable Report Field.
  3. In Report Field, add a field, name it, choose a type, and save.
  4. Go to Workspace Chat > Click the plus sign > Submit Expense > Add amount, merchant, and submit.
  5. In Expense report, click on the custom report fields
  6. Edit field id on router and press enter
  7. Notice that page not found is displayed
  8. Try to click back button and link on this page

    Expected Result:

    Can click the back button and link to go back.

    Actual Result:

    Can't click the back button and link to go back.

    Workaround:

    Unknown

    Platforms:

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

    • [ ] Android: Native
    • [ ] Android: mWeb Chrome
    • [ ] iOS: Native
    • [ ] iOS: mWeb Safari
    • [x] MacOS: Chrome / Safari
    • [ ] MacOS: Desktop

Screenshots/Videos

https://github.com/user-attachments/assets/7df94954-4c6f-4e80-8333-a18c023baab5

https://github.com/user-attachments/assets/a6c99ba3-db1c-4854-b7f5-40d3842e9ec0

Add any screenshot/video evidence

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021832973509277607149
  • Upwork Job ID: 1832973509277607149
  • Last Price Increase: 2024-09-09
  • Automatic offers:
    • DylanDylann | Reviewer | 103901827
    • nkdengineer | Contributor | 103901829
Issue OwnerCurrent Issue Owner: @DylanDylann
melvin-bot[bot] commented 2 weeks ago

Triggered auto assignment to @kadiealexander (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.

dukenv0307 commented 2 weeks ago

@kadiealexander I report this bug so I can help take it as C+

nkdengineer commented 2 weeks ago

Proposal

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

No response when clicking back button and link on not found page

What is the root cause of that problem?

Currently, we are setting 2 functions onBackButtonPress and onLinkPress which are empty here

https://github.com/Expensify/App/blob/4af620b439636f714ff72a26320ed57f9d2faac3/src/pages/EditReportFieldPage.tsx#L70-L71

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

We just need to remove the 2 props onBackButtonPress and onLinkPress because we already have the default values here

https://github.com/Expensify/App/blob/4af620b439636f714ff72a26320ed57f9d2faac3/src/components/BlockingViews/FullPageNotFoundView.tsx#L52-L55

What alternative solutions did you explore? (Optional)

cretadn22 commented 2 weeks ago

Proposal

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

No response when clicking back button and link on not found page

What is the root cause of that problem?

https://github.com/Expensify/App/blob/4af620b439636f714ff72a26320ed57f9d2faac3/src/pages/EditReportFieldPage.tsx#L70-L71 We assign empty functions to onBackButtonPress and onLinkPress

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

To fix this bug, we should simply remove the onBackButtonPress and onLinkPress props, as default values have already been set for them.

Additionally, for clarity and simplicity, I recommend removing this section entirely

https://github.com/Expensify/App/blob/4af620b439636f714ff72a26320ed57f9d2faac3/src/pages/EditReportFieldPage.tsx#L61-L75

And using FullPageNotFoundView as a wrapper

<FullPageNotFoundView shouldShow={!reportFieldsEnabled || !reportField || !report || isDisabled}>

This way is used widely in many other places

https://github.com/Expensify/App/blob/4af620b439636f714ff72a26320ed57f9d2faac3/src/pages/AddPersonalBankAccountPage.tsx#L70-L71

https://github.com/Expensify/App/blob/4af620b439636f714ff72a26320ed57f9d2faac3/src/pages/FlagCommentPage.tsx#L161-L162

https://github.com/Expensify/App/blob/4af620b439636f714ff72a26320ed57f9d2faac3/src/pages/ProfilePage.tsx#L188-L189

What alternative solutions did you explore? (Optional)

melvin-bot[bot] commented 2 weeks ago

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

melvin-bot[bot] commented 2 weeks ago

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

trjExpensify commented 1 week ago

Report field config was added in #wave-control, moving this to that project.

DylanDylann commented 1 week ago

@cretadn22 Your improvement looks good. But I think the main fix already be mentioned in @nkdengineer's proposal

Let's go with @nkdengineer's proposal because they go first

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

melvin-bot[bot] commented 1 week ago

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

melvin-bot[bot] commented 1 week ago

πŸ“£ @DylanDylann πŸŽ‰ 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

πŸ“£ @nkdengineer πŸŽ‰ 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 πŸ“–