App icon indicating copy to clipboard operation
App copied to clipboard

[HOLD for payment 2024-12-07] [$250] Clean-up in the `Categorize it` flow

Open trjExpensify opened this issue 1 year ago โ€ข 24 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: v9.0.59-0 Reproducible in staging?: Y Reproducible in production?: Y If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A 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: @trjExpensify Slack conversation https://expensify.slack.com/archives/C07HPDRELLD/p1731032656572279?thread_ts=1731032605.304139&cid=C07HPDRELLD

Action Performed:

Case: Is not a member of collect or control workspaces

  1. Sign-up for a new account
  2. Choose "Track my personal spend" > complete onboarding
  3. Go to the selfDM > + icon > Track expense
  4. Create a manual expense
  5. Click Categorize it

Case: Is a member of collect or control workspaces

  1. Sign-up for a new account
  2. Choose "Manage my team's expenses" > complete onboarding
  3. Go to the selfDM > + icon > Track expense
  4. Create a manual expense
  5. Click Categorize it

Expected Result:

This is considered a feature request as it's improvements to the flow.

  1. When you click Categorize it, if your "default workspace" (activePolicyID) is type collect or control, skip the selector and show the categories list of the default workspace.
image
  1. If you have no workspaces (or your default workspace is a personal policy), show an upgrade interstitial. When Upgrade is clicked, create a collect workspace. When Got it, thanks is clicked, move on to show the list of categories on the workspace created.
image

Actual Result:

  1. When the user has workspaces, we show a selector to enter a name, email or phone number or create a new workspace. It's incredibly easy to go wrong here and create a second workspace, as evident in the thread.
image
  1. When the user has no workspaces, we seem to be showing an empty state for the submit expense flow which doesn't make sense or match the action you just took to "categorize it" not "submit it to someone"
image

Workaround:

N/A

Platforms:

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

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

Screenshots/Videos

In-line above.

Add any screenshot/video evidence

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021856320183270003796
  • Upwork Job ID: 1856320183270003796
  • Last Price Increase: 2024-11-12
  • Automatic offers:
    • nkdengineer | Contributor | 104948536
Issue OwnerCurrent Issue Owner: @trjExpensify

trjExpensify avatar Nov 08 '24 12:11 trjExpensify

Current assignee @trjExpensify is eligible for the NewFeature assigner, not assigning anyone new.

melvin-bot[bot] avatar Nov 08 '24 12:11 melvin-bot[bot]

@jamesdeanexpensify can you just sense check the copy, and then I'll send it external. Figgy here if you want it.

trjExpensify avatar Nov 08 '24 12:11 trjExpensify

Do you upgrade to a workspace, or do you upgrade to a plan? Because I'm thinking of saying something like "You've upgraded to a workspace on the Collect plan!" or "You've upgraded to the Collect plan!" because it sounds a bit clearer to me.

jamesdeanexpensify avatar Nov 08 '24 17:11 jamesdeanexpensify

Do you upgrade to a workspace

Yeah, I mean you don't have a workspace before this. That's where I was going with that, and also to hopefully teach them about the "workspace" terminology in that sense.

trjExpensify avatar Nov 08 '24 18:11 trjExpensify

Cool - only a couple comments in Figma!

jamesdeanexpensify avatar Nov 08 '24 18:11 jamesdeanexpensify

Alright, moving this on.

trjExpensify avatar Nov 12 '24 12:11 trjExpensify

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

melvin-bot[bot] avatar Nov 12 '24 12:11 melvin-bot[bot]

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

melvin-bot[bot] avatar Nov 12 '24 12:11 melvin-bot[bot]

Edited by proposal-police: This proposal was edited at 2024-11-12 14:56:01 UTC.

Proposal

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

When the user has workspaces, we show a selector to enter a name, email or phone number or create a new workspace. It's incredibly easy to go wrong here and create a second workspace, as evident in the thread.

What is the root cause of that problem?

This is a new feature request

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

  1. For the upgrade page, we can create a new page like IOURequestStepUpgradePage. We can re-use UpgradeConfirmation, UpgradeIntro as we do in WorkspaceUpgradePage.
  • UpgradeIntro: we will create a new policy or draft policy when we click on the upgrade button

  • UpgradeConfirmation: This will be shown when we create a policy/draft successfully and when clicking on got it button navigate to the select category step

  • We need to add a new translation for the category upgrade feature and custom UpgradeIntro and UpgradeConfirmation to dynamic the price, and the description

https://github.com/Expensify/App/blob/cd3f30f73a18c29532d6886b4bb3744fd700ab9d/src/pages/workspace/upgrade/WorkspaceUpgradePage.tsx#L122

https://github.com/Expensify/App/blob/cd3f30f73a18c29532d6886b4bb3744fd700ab9d/src/pages/workspace/upgrade/WorkspaceUpgradePage.tsx#L128

  1. When we click on Categorize it,
  • if the default workspace is control or collect, set the participant of the transaction as this workspace like we do here and navigate to the category step.

  • If filteredPolicies is an empty object, navigate to the IOURequestStepUpgradePage that we created above

  • If we have multiple workspaces, navigate to the selector page.

https://github.com/Expensify/App/blob/cd3f30f73a18c29532d6886b4bb3744fd700ab9d/src/libs/ReportUtils.ts#L8204

What alternative solutions did you explore? (Optional)

Result

https://github.com/user-attachments/assets/221945c3-e8e2-4739-a30c-b7726fa80d1f

nkdengineer avatar Nov 12 '24 13:11 nkdengineer

The test branch here.

nkdengineer avatar Nov 12 '24 14:11 nkdengineer

If we have multiple workspaces, navigate to the selector page.

Just a note that we don't want to do this part from your proposal. We want to show the categories list of the user's "default workspace" (activePolicyID) in both cases of having either one or multiple existing workspaces.

trjExpensify avatar Nov 12 '24 16:11 trjExpensify

@trjExpensify But what is the expected if activePolicyID is a personal workspace? In this case the user has many workspace, the default workspace still can be updated to personal in OD.

nkdengineer avatar Nov 12 '24 16:11 nkdengineer

@trjExpensify But what is the expected if activePolicyID is a personal workspace?

The expectation is that we treat that like having no workspace, and show the upgrade flow to create one.

trjExpensify avatar Nov 12 '24 20:11 trjExpensify

The expectation is that we treat that like having no workspace, and show the upgrade flow to create one.

@trjExpensify This is also expected when we have many collect or control workspace and the default workspace is the personal workspace, right?

nkdengineer avatar Nov 13 '24 03:11 nkdengineer

Yep. To be clear, I think it's a hole in the design when you have multiple workspaces and an activePolicyID set to the personal workspace, but I've had pushback on the workspace picker bullet. So to start for now, we're going to have to treat that one like having "no workspace" instead and promote creating one in that case. Overall then:

  • If your default workspace is of a โ€œgroupโ€ type (collect or control), show the categories list for that workspace.
  • If your default workspace is the personal workspace:
    • If you have no group workspaces, promote creating one.
    • If you have one group workspace, show the categories list for that workspace.
    • If you have multiple group workspaces, promote creating one.

trjExpensify avatar Nov 13 '24 20:11 trjExpensify

@Ollyws, @trjExpensify Huh... This is 4 days overdue. Who can take care of this?

melvin-bot[bot] avatar Nov 18 '24 09:11 melvin-bot[bot]

@nkdengineer's proposal LGTM. ๐ŸŽ€๐Ÿ‘€๐ŸŽ€ C+ reviewed

Ollyws avatar Nov 18 '24 09:11 Ollyws

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

melvin-bot[bot] avatar Nov 18 '24 09:11 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 Nov 18 '24 10:11 melvin-bot[bot]

โš ๏ธ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

melvin-bot[bot] avatar Nov 28 '24 14:11 melvin-bot[bot]

โš ๏ธ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

melvin-bot[bot] avatar Nov 28 '24 20:11 melvin-bot[bot]

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

melvin-bot[bot] avatar Nov 30 '24 13:11 melvin-bot[bot]

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

  • https://github.com/Expensify/App/pull/52737

If no regressions arise, payment will be issued on 2024-12-07. :confetti_ball:

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

  • @Ollyws requires payment through NewDot Manual Requests
  • @nkdengineer requires payment automatic offer (Contributor)

melvin-bot[bot] avatar Nov 30 '24 13:11 melvin-bot[bot]

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

  • [ ] [@Ollyws] Please propose regression test steps to ensure the new feature will work correctly on production in further releases.
  • [ ] [@trjExpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon.

melvin-bot[bot] avatar Nov 30 '24 13:11 melvin-bot[bot]

Alrighty, @Ollyws.. can we get regression tests for this so we can move on to looking at payments?

trjExpensify avatar Dec 09 '24 15:12 trjExpensify

These steps will cover https://github.com/Expensify/App/issues/53247 and https://github.com/Expensify/App/issues/53309 too.

1. Sign-up for a new account
2. Choose "Track my personal spend" > complete onboarding
3. Go to the selfDM > + icon > Track expense
4. Create a manual expense
5. Click Categorize it

Case: your default workspace is of a โ€œgroupโ€ type,

    6. Verify that: show the categories list for that workspace.

Case: your default workspace is the personal workspace

    7. Verify that: If you have no group workspaces, promote creating one.
    8. On the upgrade page, click on Learn more link
    9. Verify that a help page is opened in a new tag
    10. Verify that: If you have one group workspace, show the categories list for that workspace.
    11. Verify that: If you have multiple group workspaces, promote creating one.

1. Sign with a new user
2. Create a workspace and disable the category feature
3. Create a track expense
4. Categorize it and Click on Edit Categories after the empty page is opened
5. Verify that the category feature is enabled and the categories page appears

Ollyws avatar Dec 11 '24 07:12 Ollyws

Thanks, going to suggest a little re-write to make these flow better. What do you think of those?

Case: your default workspace is the personal workspace

  1. Sign-up for a new account
  2. Choose "Track my personal spend" > complete onboarding
  3. Go to the selfDM > + icon > Track expense
  4. Create a manual expense
  5. Click Categorize it
  6. Verify that a category upgrade page appears.
  7. On the upgrade page, click on Learn more link
  8. Verify that a help page is opened in a new tab
  9. Click Upgrade > Confirm
  10. Verify that we show a list of categories to select from.

Case: your default workspace is of a โ€œgroupโ€ type ("Collect" or "Control")

  1. Go to the selfDM > track a new expense
  2. Click Categorize it
  3. Verify that we show the categories list for that workspace.
  4. Close the RHP

Case: Disabled categories on the workspace

  1. Go to the workspace settings of the workspace
  2. Go to More features > Categories
  3. Disable the Categories feature
  4. Go back to the selfDM
  5. Click Categorize it again
  6. Verify an empty page appears as all categories are disabled
  7. Click Edit categories
  8. Verify that the category feature is enabled and the categories page appears

Case: personal workspace default, multiple group workspaces exist

  1. Create another workspace, so the account is now a member of two group workspaces.
  2. Go to Settings > Domains (to switch over to expensify.com easily).
  3. On OldDot, click your avatar.
  4. Change your default workspace to the personal workspace
  5. Switch back to new.expensify.com
  6. Go to the selfDM > track another expense
  7. Click Categorize it
  8. Verify the categories upgrade modal appears.

trjExpensify avatar Dec 11 '24 11:12 trjExpensify

@Ollyws thoughts on the above?

trjExpensify avatar Dec 16 '24 12:12 trjExpensify

@trjExpensify All looks great.

Ollyws avatar Dec 16 '24 15:12 Ollyws

Okay cool, regression test issue created!

Payment summary as follows:

  • $250 to @Ollyws for the C+ review
  • $250 to @nkdengineer for the PR

@Ollyws go ahead and request, @nkdengineer I've settled up in Upwork. Closing!

trjExpensify avatar Dec 16 '24 16:12 trjExpensify