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

[Simplified Collect][Distance rates] Subcategory is displayed as indented instead of Parent: Child format #38662

Closed
6 tasks done
izarutskaya opened this issue Mar 20, 2024 · 14 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering Reviewing Has a PR in review

Comments

@izarutskaya
Copy link

izarutskaya commented Mar 20, 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!


Found when validating PR : #38060

Version Number: 1.4.55-0
Reproducible in staging?: Y
Reproducible in production?: N
Logs: https://stackoverflow.com/c/expensify/questions/4856
Issue reported by: Applause-Internal team

Action Performed:

Precondition:

  • User is admin of Collect workspace.
  • The Collect workspace has subcategories.
  1. Go to staging.new.expensify.com.
  2. Go to Profile > Workspaces > Collect workspace.
  3. Go to Distance rates.
  4. Click Settings.
  5. Select a subcategory.

Expected Result:

The selected subcategory in Default category row will be displayed in Parent: Child format.

Actual Result:

The selected subcategory in Default category row is displayed as indented subcategory.

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

Bug6420279_1710929188630.subcat.mp4

View all open jobs on GitHub

@izarutskaya izarutskaya added DeployBlockerCash This issue or pull request should block deployment Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Mar 20, 2024
Copy link

melvin-bot bot commented Mar 20, 2024

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

@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Mar 20, 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 Mar 20, 2024

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

@izarutskaya
Copy link
Author

@garrettmknight I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors.

We think this issue might be related to the #wave-control.

@parasharrajat
Copy link
Member

@izarutskaya How do we create subcategories?

@Krishna2323
Copy link
Contributor

@parasharrajat, just by adding a colon, eg: category: subcategory

@tienifr
Copy link
Contributor

tienifr commented Mar 20, 2024

@parasharrajat I think we should use category.searchText here instead of category.text:

Policy.setPolicyDistanceRatesDefaultCategory(policyID, customUnit, {...customUnit, defaultCategory: category.text});

That's consistent with how we select sub-categories in IOU request:

const updateCategory = (category) => {
const isSelectedCategory = category.searchText === transactionCategory;
const updatedCategory = isSelectedCategory ? '' : category.searchText;

text is for displaying indented space prefix for sub-categories.

I can raise PR immediately if assigned.

@parasharrajat
Copy link
Member

This is not a deploy blocker. There will be a follow-up PR #38060 so it can be handled there.

@tienifr
Copy link
Contributor

tienifr commented Mar 20, 2024

cc @MrMuzyk on my investigation above 😄

@lakchote lakchote added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 labels Mar 20, 2024
@trjExpensify trjExpensify changed the title Distance rates - Subcategory is displayed as indented instead of Parent: Child format [Distance rates] Subcategory is displayed as indented instead of Parent: Child format Mar 20, 2024
@MrMuzyk
Copy link
Contributor

MrMuzyk commented Mar 20, 2024

I will fix this in the next PR that adds another screen to distance rates feature. Currently its in draft state #38237

@trjExpensify
Copy link
Contributor

trjExpensify commented Mar 20, 2024

Discussed in the thread. The issue is that we aren't showing the parent category in the push row preview, only the indented child category. Here's the comparison with a category on an expense:

image image

@luacmartins luacmartins changed the title [Distance rates] Subcategory is displayed as indented instead of Parent: Child format [Simplified Collect][Distance rates] Subcategory is displayed as indented instead of Parent: Child format Mar 20, 2024
@luacmartins luacmartins added the Reviewing Has a PR in review label Mar 21, 2024
@garrettmknight garrettmknight added Awaiting Payment Auto-added when associated PR is deployed to production and removed Awaiting Payment Auto-added when associated PR is deployed to production labels Mar 27, 2024
@garrettmknight
Copy link
Contributor

Made it to prod today, will test tomo.

Copy link

melvin-bot bot commented Apr 8, 2024

@garrettmknight, @lakchote, @MrMuzyk 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

@garrettmknight
Copy link
Contributor

This is fixed, closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering Reviewing Has a PR in review
Projects
No open projects
Archived in project
Development

No branches or pull requests

9 participants