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 2024-11-01] [$500] Tags - Background report changes to Tags page after clicking Custom tag name in RHP #49883

Closed
2 of 6 tasks
lanitochka17 opened this issue Sep 28, 2024 · 44 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor

Comments

@lanitochka17
Copy link

lanitochka17 commented Sep 28, 2024

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.41-2
Reproducible in staging?: Y
Reproducible in production?: N/A Unable to check
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Email or phone of affected tester (no customers): applausetester+kh010901@applause.expensifail.com
Issue reported by: Applause - Internal Team

Action Performed:

Precondition:

  • User is logged in to two devices
  • Workspace has tags
  1. Go to staging.new.expensify.com
  2. [Device A] Go to workspace chat
  3. [Device A] Click + > Submit expense > Manual
  4. [Device A] Proceed to confirmation page and click Tag
  5. [Device B] Go to workspace settings > Tags
  6. [Device B] Disable all tags
  7. [Device A] Click Edit tags
  8. [Device A] Click Settings > Custom tag name

Expected Result:

The report in the background will remain after clicking Custom tag name

Actual Result:

The report in the background changes to Tags page after clicking Custom tag name

Workaround:

Unknown

Platforms:

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

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Bug6617841_1727469118066.20240928_042600.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021840631550279932147
  • Upwork Job ID: 1840631550279932147
  • Last Price Increase: 2024-10-10
  • Automatic offers:
    • paultsimura | Reviewer | 104272735
Issue OwnerCurrent Issue Owner: @Christinadobrzyn
@lanitochka17 lanitochka17 added DeployBlockerCash This issue or pull request should block deployment Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. DeployBlocker Indicates it should block deploying the API labels Sep 28, 2024
Copy link

melvin-bot bot commented Sep 28, 2024

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

@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Sep 28, 2024
Copy link
Contributor

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

Copy link

melvin-bot bot commented Sep 28, 2024

Triggered auto assignment to @stitesExpensify (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

@roryabraham
Copy link
Contributor

Looks pretty NAB to me

@roryabraham roryabraham added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment DeployBlocker Indicates it should block deploying the API Hourly KSv2 labels Sep 29, 2024
@NJ-2020
Copy link
Contributor

NJ-2020 commented Sep 29, 2024

Proposal

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

Tags - Background report changes to Tags page after clicking Custom tag name in RHP

What is the root cause of that problem?

We're not passing the backTo param when navigating to the Custom tag name page

onPress={() => Navigation.navigate(ROUTES.WORKSPACE_EDIT_TAGS.getRoute(policyID, policyTagLists[0].orderWeight))}

App/src/ROUTES.ts

Lines 847 to 850 in 3047c1b

WORKSPACE_EDIT_TAGS: {
route: 'settings/workspaces/:policyID/tags/:orderWeight/edit',
getRoute: (policyID: string, orderWeight: number) => `settings/workspaces/${policyID}/tags/${orderWeight}/edit` as const,
},

And same when navigating to the Settings page
const navigateToTagsSettings = () => {
Navigation.navigate(ROUTES.WORKSPACE_TAGS_SETTINGS.getRoute(policyID));
};

App/src/ROUTES.ts

Lines 843 to 846 in 3047c1b

WORKSPACE_TAGS_SETTINGS: {
route: 'settings/workspaces/:policyID/tags/settings',
getRoute: (policyID: string) => `settings/workspaces/${policyID}/tags/settings` as const,
},

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

We can add the backTo param inside the getRoute function and pass the backTo param by using route.params.backTo

WORKSPACE_TAGS_SETTINGS: {
    route: 'settings/workspaces/:policyID/tags/settings',
    getRoute: (policyID: string, backTo?: string) => getUrlWithBackToParam(`settings/workspaces/${policyID}/tags/settings` as const, backTo),
},
WORKSPACE_EDIT_TAGS: {
    route: 'settings/workspaces/:policyID/tags/:orderWeight/edit',
    getRoute: (policyID: string, orderWeight: number, backTo?: string) => getUrlWithBackToParam(`settings/workspaces/${policyID}/tags/${orderWeight}/edit` as const, backTo),
},

WorkspaceTagsPage.tsx when navigating to Settings page

const backTo = route.params.backTo;
const navigateToTagsSettings = () => {
    Navigation.navigate(ROUTES.WORKSPACE_TAGS_SETTINGS.getRoute(policyID, backTo));
};

// ...types for route.params
[SCREENS.WORKSPACE.TAGS]: {
    policyID: string;
    backTo?: Routes;
};

And same for WorkspaceTagsSettingsPage when navigating to Custom tag name page

<MenuItemWithTopDescription
    title={policyTagLists[0]?.name}
    description={translate(`workspace.tags.customTagName`)}
    onPress={() => Navigation.navigate(ROUTES.WORKSPACE_EDIT_TAGS.getRoute(policyID, policyTagLists[0].orderWeight, backTo))}
    shouldShowRightIcon
/>

Result

Screen.Recording.2024-09-28.at.22.57.04.mov

What alternative solutions did you explore? (Optional)

@Christinadobrzyn
Copy link
Contributor

Christinadobrzyn commented Sep 30, 2024

What does NAB mean?

@NJ-2020
Copy link
Contributor

NJ-2020 commented Sep 30, 2024

@Christinadobrzyn NAB stands for Not a blocker

@truph01
Copy link
Contributor

truph01 commented Sep 30, 2024

Proposal

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

The report in the background changes to Tags page after clicking Custom tag name

What is the root cause of that problem?

  • We have logic to push a new full screen navigator to the stacks if the RHN is in FULL_SCREEN_TO_RHP_MAPPING list:

// Check for FullScreenNavigator
for (const [fullScreenName, RHPNames] of Object.entries(FULL_SCREEN_TO_RHP_MAPPING)) {
if (RHPNames.includes(route.name)) {
const paramsFromRoute = getParamsFromRoute(fullScreenName);
return createFullScreenNavigator({name: fullScreenName as FullScreenName, params: pick(route.params, paramsFromRoute)});
}
}

  • When we click on "Custom tag name", the custom tag name screen is in FULL_SCREEN_TO_RHP_MAPPING:

hence we push a new full screen navigator to stacks.

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

  • In general, we should add a backTo param to the route when we click "Custom tag name". With this, in:

function getMatchingRootRouteForRHPRoute(route: NavigationPartialRoute): NavigationPartialRoute<CentralPaneName | typeof NAVIGATORS.FULL_SCREEN_NAVIGATOR> | undefined {

logic:

// Check for backTo param. One screen with different backTo value may need diferent screens visible under the overlay.
if (route.params && 'backTo' in route.params && typeof route.params.backTo === 'string') {

is called instead of pushing a new full screen navigator to stacks:

// Check for FullScreenNavigator
for (const [fullScreenName, RHPNames] of Object.entries(FULL_SCREEN_TO_RHP_MAPPING)) {

  • In detail:

  • First, update the getRoute function so that it can receive the additional backTo param:

App/src/ROUTES.ts

Lines 843 to 850 in d187665

WORKSPACE_TAGS_SETTINGS: {
route: 'settings/workspaces/:policyID/tags/settings',
getRoute: (policyID: string) => `settings/workspaces/${policyID}/tags/settings` as const,
},
WORKSPACE_EDIT_TAGS: {
route: 'settings/workspaces/:policyID/tags/:orderWeight/edit',
getRoute: (policyID: string, orderWeight: number) => `settings/workspaces/${policyID}/tags/${orderWeight}/edit` as const,
},

  • Then, update:

Navigation.navigate(ROUTES.WORKSPACE_TAGS_SETTINGS.getRoute(policyID));

    const navigateToTagsSettings = () => {
        Navigation.navigate(ROUTES.WORKSPACE_TAGS_SETTINGS.getRoute(policyID, Navigation.getActiveRoute()));
    };

and:

onPress={() => Navigation.navigate(ROUTES.WORKSPACE_EDIT_TAGS.getRoute(policyID, policyTagLists[0].orderWeight))}

                        onPress={() => Navigation.navigate(ROUTES.WORKSPACE_EDIT_TAGS.getRoute(policyID, policyTagLists[0].orderWeight, Navigation.getActiveRoute()))}

It will add new backTo param to the route when we click "Custom tag name"

What alternative solutions did you explore? (Optional)

@Christinadobrzyn
Copy link
Contributor

Ah thanks @NJ-2020! That makes sense. Given that, I think this can be external so adding the label.

@Christinadobrzyn Christinadobrzyn added the External Added to denote the issue can be worked on by a contributor label Sep 30, 2024
@melvin-bot melvin-bot bot changed the title Tags - Background report changes to Tags page after clicking Custom tag name in RHP [$250] Tags - Background report changes to Tags page after clicking Custom tag name in RHP Sep 30, 2024
Copy link

melvin-bot bot commented Sep 30, 2024

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 30, 2024
Copy link

melvin-bot bot commented Sep 30, 2024

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

Copy link

melvin-bot bot commented Oct 10, 2024

Upwork job price has been updated to $500

@stitesExpensify
Copy link
Contributor

Doubling bounty because we are fixing 2 extra bugs

@Christinadobrzyn
Copy link
Contributor

Just an update for melvin that we're working on the PRs

@twilight2294
Copy link
Contributor

@stitesExpensify the PR is ready for your review

@dylanexpensify dylanexpensify moved this to Release 3: Fall 2024 (Nov) in [#whatsnext] #expense Oct 18, 2024
@Christinadobrzyn
Copy link
Contributor

PR in the works! #50416

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Oct 25, 2024
@melvin-bot melvin-bot bot changed the title [$500] Tags - Background report changes to Tags page after clicking Custom tag name in RHP [HOLD for payment 2024-11-01] [$500] Tags - Background report changes to Tags page after clicking Custom tag name in RHP Oct 25, 2024
Copy link

melvin-bot bot commented Oct 25, 2024

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

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Oct 25, 2024
Copy link

melvin-bot bot commented Oct 25, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.53-1 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 2024-11-01. 🎊

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

Copy link

melvin-bot bot commented Oct 25, 2024

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:

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

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Oct 31, 2024
@Christinadobrzyn
Copy link
Contributor

Christinadobrzyn commented Nov 1, 2024

@paultsimura Do we need a regression for this?

Payouts due:

@twilight2294
Copy link
Contributor

twilight2294 commented Nov 1, 2024 via email

@Christinadobrzyn
Copy link
Contributor

Ah thanks for letting me know @twilight2294 - can you please accept the offer here

@twilight2294
Copy link
Contributor

twilight2294 commented Nov 1, 2024 via email

@paultsimura
Copy link
Contributor

Regression Test Proposal

Precondition:

  • The user is logged in on two devices
  • Workspace has tags

Test:

  1. [Device A] Go to a workspace chat
  2. [Device A] Click + > Submit expense > Manual
  3. [Device A] Proceed to the confirmation page and click Tag
  4. [Device B] Go to the workspace settings > Tags
  5. [Device B] Disable all tags
  6. [Device A] Click Edit tags
  7. [Device A] Click Settings > Custom tag name
  8. Verify the report in the background remains unchanged

Do we agree 👍 or 👎

@melvin-bot melvin-bot bot added the Overdue label Nov 4, 2024
@Christinadobrzyn
Copy link
Contributor

Regression test - https://github.com/Expensify/Expensify/issues/441268

Paid out based on payment summary - #49883 (comment)

But I just checked and there was discussion after the PR went to production- is there a regression that we need to track for this? @twilight2294 @paultsimura

@melvin-bot melvin-bot bot removed the Overdue label Nov 4, 2024
@paultsimura
Copy link
Contributor

Thank you @Christinadobrzyn. That one bug was related to a super edge case that is not even possible to reproduce fully in ND as the multilevel tags are not currently supported, therefore it was missed while testing.
IMO, it wouldn't be quite fair to apply the 50% penalty for such a case in the 30-files PR that covers 10+ other navigational scenarios. But if you think otherwise, let's adjust the bounty here.

@Christinadobrzyn
Copy link
Contributor

hi @paultsimura thank you for the additional information. I think it sounds fair to keep the payment as is.

Closing this as complete!

@github-project-automation github-project-automation bot moved this from Release 3: Fall 2024 (Nov) to Done in [#whatsnext] #expense Nov 5, 2024
Copy link

melvin-bot bot commented Nov 5, 2024

@stitesExpensify @Christinadobrzyn Be sure to fill out the Contact List!

@paultsimura
Copy link
Contributor

Thank you @Christinadobrzyn.

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. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor
Projects
Archived in project
Development

No branches or pull requests

9 participants