App icon indicating copy to clipboard operation
App copied to clipboard

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

Open m-natarajan opened this issue 1 year ago β€’ 4 comments

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] 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

m-natarajan avatar Sep 07 '24 11:09 m-natarajan

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.

melvin-bot[bot] avatar Sep 07 '24 11:09 melvin-bot[bot]

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

dukenv0307 avatar Sep 07 '24 11:09 dukenv0307

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)

nkdengineer avatar Sep 07 '24 11:09 nkdengineer

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)

cretadn22 avatar Sep 07 '24 11:09 cretadn22

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

melvin-bot[bot] avatar Sep 09 '24 02:09 melvin-bot[bot]

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

melvin-bot[bot] avatar Sep 09 '24 02:09 melvin-bot[bot]

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

trjExpensify avatar Sep 10 '24 01:09 trjExpensify

@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

DylanDylann avatar Sep 10 '24 04:09 DylanDylann

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

melvin-bot[bot] avatar Sep 10 '24 04:09 melvin-bot[bot]

πŸ“£ @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] avatar Sep 10 '24 17:09 melvin-bot[bot]

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

melvin-bot[bot] avatar Sep 10 '24 17:09 melvin-bot[bot]

@kadiealexander This issue is ready for payment

DylanDylann avatar Oct 01 '24 15:10 DylanDylann

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [x] [@DylanDylann] The PR that introduced the bug has been identified. Link to the PR: NA
  • [x] [@DylanDylann] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment: NA
  • [x] [@DylanDylann] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion: NA
  • [x] [@DylanDylann] Determine if we should create a regression test for this bug. Yes
  • [x] [@DylanDylann] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [x] [@kadiealexander] Link the GH issue for creating/updating the regression test once above steps have been agreed upon: https://github.com/Expensify/Expensify/issues/432947

kadiealexander avatar Oct 02 '24 06:10 kadiealexander

Payouts due:

  • [x] Contributor: $250 @nkdengineer
  • [x] Contributor+: $250 @DylanDylann

Upwork job is here.

kadiealexander avatar Oct 02 '24 06:10 kadiealexander

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

[@DylanDylann] The PR that introduced the bug has been identified. Link to the PR: NA [@DylanDylann] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment: NA [@DylanDylann] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion: NA [@DylanDylann] Determine if we should create a regression test for this bug. Yes [@DylanDylann] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.

Regression Test Proposal

  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 the 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 the back button and link on this page
  9. Verify that we can click the back button and link to go back.

Do we agree πŸ‘ or πŸ‘Ž

DylanDylann avatar Oct 02 '24 17:10 DylanDylann

https://github.com/Expensify/Expensify/issues/432947

kadiealexander avatar Oct 02 '24 22:10 kadiealexander