Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HOLD for payment 2023-08-16] [$1000] Web - On back button press navigates to Confirm task screen instead of hide modal #21200

Closed
6 tasks
kbecciv opened this issue Jun 21, 2023 · 62 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Weekly KSv2

Comments

@kbecciv
Copy link

kbecciv commented Jun 21, 2023

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 + icon and choose Assign task option
  2. Enter title and click on Next button
  3. Click on Assign and select any Assign
  4. Click on confirm task button
  5. Go to task thread
  6. Click on Assign
  7. Click on back button

Expected Result:

It should hide the modal on click of back button

Actual Result:

on back button press navigates to Confirm task

Workaround:

UNknown

Platforms:

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

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.27-6

Reproducible in staging?: y

Reproducible in production?: y

If this was caught during regression testing, add the test name, ID and link from TestRail:

Logs: https://stackoverflow.com/c/expensify/questions/4856

Notes/Photos/Videos: Any additional supporting documentation

Screen.Recording.2023-06-14.at.3.49.29.PM.1.mov
Recording.798.mp4

Expensify/Expensify Issue URL:

Issue reported by: @gadhiyamanan

Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1686738116807699

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~012cb24f67bd54c980
  • Upwork Job ID: 1671909296462548992
  • Last Price Increase: 2023-07-27
  • Automatic offers:
    • Pujan92 | Contributor | 25886169
    • gadhiyamanan | Reporter | 25886171
@kbecciv kbecciv added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jun 21, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 21, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jun 21, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@daraksha-dk
Copy link
Contributor

Proposal

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

on back button press navigates to Confirm task screen instead of hide modal

What is the root cause of that problem?

The issue seems to be with the onBackButtonPress event handler for the HeaderWithBackButton component. The code navigates to the "Confirm task" screen instead of hiding the modal.

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

To solve this issue, we need to update the onBackButtonPress event handler to hide the modal instead of navigating to the "Confirm task" screen in TaskAssigneeSelectorModal.js

js
// Existing code
<HeaderWithBackButton
    onBackButtonPress={() => Navigation.goBack(ROUTES.NEW_TASK)}
/>

// Updated code
<HeaderWithBackButton
    onBackButtonPress={() => Navigation.dismissModal()}
/>

This change replaces the Navigation.goBack function with Navigation.dismissModal to hide the modal instead of navigating to the "Confirm task" screen.

What alternative solutions did you explore? (Optional)

@melvin-bot
Copy link

melvin-bot bot commented Jun 21, 2023

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.

@gadhiyamanan
Copy link
Contributor

Proposal

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

on back button press navigates to Confirm task screen instead of hide modal

What is the root cause of that problem?

onBackButtonPress we are navigating to "NEW_TASK" screen instead back

<HeaderWithBackButton
title={props.translate('newTaskPage.assignee')}
onBackButtonPress={() => Navigation.goBack(ROUTES.NEW_TASK)}
/>

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

we can remove onBackButtonPress from below code because as default it will be navigated to back

<HeaderWithBackButton
title={props.translate('newTaskPage.assignee')}
onBackButtonPress={() => Navigation.goBack(ROUTES.NEW_TASK)}
/>

What alternative solutions did you explore? (Optional)

@Pujan92
Copy link
Contributor

Pujan92 commented Jun 21, 2023

Proposal

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

On back button press navigates to Confirm task screen instead of hide modal

What is the root cause of that problem?

In this PR this navigation updation took place where on the back we are navigating ROUTES.NEW_TASK from the Assignee Selection page. This is causing the issue and it will take user to New Task page all the time.

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

It seems this navigation part added bcoz if the user refresh on assignee selection page and then click on back it will take the user to the New Task page but for already assigned task we should not want to be land on New Task page. So we need to navigate based on the params(if report id is available then just go back or else for new task part navigate to new task page)

onBackButtonPress={() => Navigation.goBack(ROUTES.NEW_TASK)}

Need to update the condition to

onBackButtonPress={() => (props.route.params && props.route.params.reportID) ? Navigation.goBack() : Navigation.goBack(ROUTES.NEW_TASK)}
Result
Screen.Recording.2023-06-21.at.7.05.03.PM.mov
Screen.Recording.2023-06-21.at.7.08.41.PM.mov

@isabelastisser isabelastisser added the External Added to denote the issue can be worked on by a contributor label Jun 22, 2023
@melvin-bot melvin-bot bot changed the title Web - On back button press navigates to Confirm task screen instead of hide modal [$1000] Web - On back button press navigates to Confirm task screen instead of hide modal Jun 22, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 22, 2023

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jun 22, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 22, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jun 22, 2023

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

@isabelastisser
Copy link
Contributor

I will be OOO until July 5, so assigning another team member. SO for reference.

@isabelastisser isabelastisser removed their assignment Jun 23, 2023
@isabelastisser isabelastisser added Bug Something is broken. Auto assigns a BugZero manager. and removed Bug Something is broken. Auto assigns a BugZero manager. labels Jun 23, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 23, 2023

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

@melvin-bot

This comment was marked as duplicate.

@isabelastisser isabelastisser self-assigned this Jun 23, 2023
@melvin-bot melvin-bot bot added the Overdue label Jun 26, 2023
@dylanexpensify
Copy link
Contributor

Didn't get to today, but will tackle tomorrow!

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Jun 26, 2023
@dylanexpensify
Copy link
Contributor

@eVoloshchak can we get reviews on proposals today??

@Pujan92
Copy link
Contributor

Pujan92 commented Jul 31, 2023

@eVoloshchak Thanks, I think reviewed stamp is required to assign it to the internal engineer.

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Aug 1, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 1, 2023

📣 @eVoloshchak Please request via NewDot manual requests for the Reviewer role ($1000)

@melvin-bot
Copy link

melvin-bot bot commented Aug 1, 2023

📣 @Pujan92 🎉 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
Copy link

melvin-bot bot commented Aug 1, 2023

📣 @gadhiyamanan 🎉 An offer has been automatically sent to your Upwork account for the Reporter role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

@isabelastisser
Copy link
Contributor

@Pujan92, I assigned you now. You can start working on this now, thanks!

@Pujan92
Copy link
Contributor

Pujan92 commented Aug 2, 2023

@eVoloshchak PR is ready for review!

@melvin-bot
Copy link

melvin-bot bot commented Aug 4, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Aug 7, 2023

Based on my calculations, the pull request did not get merged within 3 working days of assignment. Please, check out my computations here:

  • when @Pujan92 got assigned: 2023-08-01 18:05:07 Z
  • when the PR got merged: 2023-08-07 13:32:41 UTC
  • days elapsed: 3

On to the next one 🚀

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Aug 9, 2023
@melvin-bot melvin-bot bot changed the title [$1000] Web - On back button press navigates to Confirm task screen instead of hide modal [HOLD for payment 2023-08-16] [$1000] Web - On back button press navigates to Confirm task screen instead of hide modal Aug 9, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Aug 9, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 9, 2023

Reviewing label has been removed, please complete the "BugZero Checklist".

@melvin-bot
Copy link

melvin-bot bot commented Aug 9, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.51-2 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2023-08-16. 🎊

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

For reference, here are some details about the assignees on this issue:

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@melvin-bot
Copy link

melvin-bot bot commented Aug 9, 2023

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:

  • [@eVoloshchak] The PR that introduced the bug has been identified. Link to the PR:
  • [@eVoloshchak] 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:
  • [@eVoloshchak] 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:
  • [@eVoloshchak] Determine if we should create a regression test for this bug.
  • [@eVoloshchak] 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.
  • [@isabelastisser] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@pecanoro
Copy link
Contributor

@eVoloshchak Can you complete the list so we can proceed with the payment?

@isabelastisser All yours to handle payments!

@isabelastisser
Copy link
Contributor

Payment summary:

@isabelastisser
Copy link
Contributor

@eVoloshchak please complete the checklist when you have a chance, thanks!

@eVoloshchak
Copy link
Contributor

  • The PR that introduced the bug has been identified. Link to the PR: that's the way it was implemented initially in Create Task FrontEnd Changes #17992,
  • 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: N/A
  • 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: I don't think an additional discussion is needed, this is a typical bug with modal navigation
  • Determine if we should create a regression test for this bug.
    Is it easy to test for this bug? Yes
    Is the bug related to an important user flow? Yes
    Is it an impactful bug? No

    This has a very low impact, doesn't break the UX, a regression test isn't necessary I think

@JmillsExpensify
Copy link

Reviewed the details for @eVoloshchak. $1,000 approved for payment via NewDot based on BZ summary.

@isabelastisser
Copy link
Contributor

  • All the payments were processed.
  • A regression test is not needed.

We are all set here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Weekly KSv2
Projects
None yet
Development

No branches or pull requests