[HOLD for payment 2024-12-07] [$250] Clean-up in the `Categorize it` flow
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
- Sign-up for a new account
- Choose "Track my personal spend" > complete onboarding
- Go to the selfDM >
+icon > Track expense - Create a manual expense
- Click
Categorize it
Case: Is a member of collect or control workspaces
- Sign-up for a new account
- Choose "Manage my team's expenses" > complete onboarding
- Go to the selfDM >
+icon > Track expense - Create a manual expense
- Click
Categorize it
Expected Result:
This is considered a feature request as it's improvements to the flow.
- When you click
Categorize it, if your "default workspace" (activePolicyID) is typecollectorcontrol, skip the selector and show the categories list of the default workspace.
- If you have no workspaces (or your default workspace is a personal policy), show an upgrade interstitial. When
Upgradeis clicked, create acollectworkspace. WhenGot it, thanksis clicked, move on to show the list of categories on the workspace created.
Actual Result:
- 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.
- 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"
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
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 Owner
Current Issue Owner: @trjExpensify
Current assignee @trjExpensify is eligible for the NewFeature assigner, not assigning anyone new.
@jamesdeanexpensify can you just sense check the copy, and then I'll send it external. Figgy here if you want it.
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.
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.
Cool - only a couple comments in Figma!
Alright, moving this on.
Job added to Upwork: https://www.upwork.com/jobs/~021856320183270003796
Triggered auto assignment to Contributor-plus team member for initial proposal review - @Ollyws (External)
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?
- For the upgrade page, we can create a new page like
IOURequestStepUpgradePage. We can re-useUpgradeConfirmation,UpgradeIntroas we do inWorkspaceUpgradePage.
-
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
UpgradeIntroandUpgradeConfirmationto 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
- When we click on
Categorize it,
-
if the default workspace is
controlorcollect, set the participant of the transaction as this workspace like we do here and navigate to the category step. -
If
filteredPoliciesis an empty object, navigate to theIOURequestStepUpgradePagethat 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
The test branch here.
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 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.
@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.
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?
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 (
collectorcontrol), 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.
@Ollyws, @trjExpensify Huh... This is 4 days overdue. Who can take care of this?
@nkdengineer's proposal LGTM. ๐๐๐ C+ reviewed
Triggered auto assignment to @Julesssss, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
๐ฃ @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 ๐
โ ๏ธ 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.
โ ๏ธ 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.
Reviewing label has been removed, please complete the "BugZero Checklist".
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)
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.
Alrighty, @Ollyws.. can we get regression tests for this so we can move on to looking at payments?
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
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
- Sign-up for a new account
- Choose "Track my personal spend" > complete onboarding
- Go to the selfDM > + icon > Track expense
- Create a manual expense
- Click Categorize it
- Verify that a category upgrade page appears.
- On the upgrade page, click on Learn more link
- Verify that a help page is opened in a new tab
- Click Upgrade > Confirm
- Verify that we show a list of categories to select from.
Case: your default workspace is of a โgroupโ type ("Collect" or "Control")
- Go to the selfDM > track a new expense
- Click Categorize it
- Verify that we show the categories list for that workspace.
- Close the RHP
Case: Disabled categories on the workspace
- Go to the workspace settings of the workspace
- Go to More features > Categories
- Disable the Categories feature
- Go back to the selfDM
- Click Categorize it again
- Verify an empty page appears as all categories are disabled
- Click Edit categories
- Verify that the category feature is enabled and the categories page appears
Case: personal workspace default, multiple group workspaces exist
- Create another workspace, so the account is now a member of two group workspaces.
- Go to Settings > Domains (to switch over to expensify.com easily).
- On OldDot, click your avatar.
- Change your default workspace to the personal workspace
- Switch back to new.expensify.com
- Go to the selfDM > track another expense
- Click Categorize it
- Verify the categories upgrade modal appears.
@Ollyws thoughts on the above?
@trjExpensify All looks great.
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!