Skip to content

Resolved issue_Category - Parent category is disabled when selected#85448

Open
ijmalik wants to merge 11 commits intoExpensify:mainfrom
ijmalik:85359-PR
Open

Resolved issue_Category - Parent category is disabled when selected#85448
ijmalik wants to merge 11 commits intoExpensify:mainfrom
ijmalik:85359-PR

Conversation

@ijmalik
Copy link
Copy Markdown
Contributor

@ijmalik ijmalik commented Mar 16, 2026

Explanation of Change

Fixed Issues

$#85359, #85364,#85357,#82068
PROPOSAL:

Tests

Test Case 1: Category - Parent category is disabled when selected#85359
Precondition:Create both categories - Car and Car: Tesla
1.Go to workspace chat.
2.Create an expense with Tesla subcategory.
3.Open the expense.
4.Click Category.
5.On the search field, type Car.
6.Car will be enabled because Car is a valid category (there are Car and Car: Tesla categories).

Test Case 2: Search keeps parent and subcategories together#85364

Precondition:
Create both categories - D and D:E:F

1.Go to staging.new.expensify.com
2.Go to workspace chat.
3.Click + > Create expense > Manual.
4.Enter amount > Next.
5.Click Category.
6.Select D.
7.Click Category.
On the search field, type D.

Verify that Parent category (D) and subcategories (E and F) will be arranged together.

Test Case 3: Category - Category appears as disabled when the category is A: B: #85357

Precondition:

Create this category - A: B:

1.Go to staging.new.expensify.com
2.Go to workspace chat.
3.Click + > Create expense > Manual.
4.Enter amount > Next.
5.Click Category.
6.Expected Result:

Verify that B: will be enabled.

Test Case 4: Category starting with a colon #85361

Precondition: Create a category named :D in the workspace.

1.Go to staging.new.expensify.com
2.Go to workspace chat.
3.Click + → Create expense → Manual.
4.Enter amount → Next.
5.Click Category.
6.Expected Result:
The category :D appears as a top‑level item with no indentation (i.e., not shown as a subcategory).

Test Case 5: Selected field shows only leaf category

Precondition: Workspace has a category Parent:Child.

1.Go to workspace chat.
2.Create an expense and select the category Parent:Child.
3.After selection, observe the field that displays the chosen category (e.g., in the expense form).
4.Expected Result:
Only the leaf name Child is displayed, not the full path Parent:Child.

  • Verify that no errors appear in the JS console

Offline tests

Same as Tests

QA Steps

Same as Tests

  • Verify that no errors appear in the JS console

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I followed proper code patterns (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
      • If any non-english text was added/modified, I used JaimeGPT to get English > Spanish translation. I then posted it in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.ts or at the top of the file that uses the constant) are defined as such
  • I verified that if a function's arguments changed that all usages have also been updated correctly
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))
  • If new assets were added or existing ones were modified, I verified that:
    • The assets are optimized and compressed (for SVG files, run npm run compress-svg)
    • The assets load correctly across all supported platforms.
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

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

@ijmalik ijmalik requested review from a team as code owners March 16, 2026 18:05
@melvin-bot melvin-bot bot requested review from heyjennahay and youssef-lr and removed request for a team March 16, 2026 18:05
@melvin-bot
Copy link
Copy Markdown

melvin-bot bot commented Mar 16, 2026

@youssef-lr Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

@@ -65,7 +65,10 @@ function getCategoryOptionTree(options: Record<string, Category> | Category[], i
const isChild = array.length - 1 === index;
const searchText = array.slice(0, index + 1).join(CONST.PARENT_CHILD_SEPARATOR);
const selectedParentOption = !isChild && Object.values(selectedOptions).find((op) => op.name === searchText);
const isParentOptionDisabled = !selectedParentOption || !selectedParentOption.enabled || selectedParentOption.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE;
const optionParent = !isChild && Object.values(options).find((op) => op.name === searchText);
Copy link
Copy Markdown
Contributor

@ZhenjaHorbach ZhenjaHorbach Mar 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit confused
We reverted the original PR
But where are the changes from the original PR?

Could you open a PR with the main changes from the reverted PR + with all regression fixes?

@ZhenjaHorbach
Copy link
Copy Markdown
Contributor

Did you cover all these issues?

#85364
#85359
#85352

If yes
Please link these issues in the PR description
And add test cases for these issues in the description

And in addition, here we wait for the expected behavior

#85361
#85357

@ijmalik
Copy link
Copy Markdown
Contributor Author

ijmalik commented Mar 16, 2026

@ZhenjaHorbach #85359 is resolved, working on others.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 16, 2026

Codecov Report

✅ Changes either increased or maintained existing code coverage, great job!

Files with missing lines Coverage Δ
src/CONST/index.ts 93.65% <ø> (ø)
...c/components/ReportActionItem/MoneyRequestView.tsx 66.74% <100.00%> (ø)
src/libs/CategoryOptionListUtils.ts 95.14% <96.55%> (+0.46%) ⬆️
src/libs/CategoryUtils.ts 68.47% <88.23%> (+4.47%) ⬆️
... and 7 files with indirect coverage changes

@ZhenjaHorbach
Copy link
Copy Markdown
Contributor

@ijmalik
Any updates?

@ijmalik
Copy link
Copy Markdown
Contributor Author

ijmalik commented Mar 19, 2026

Hi @ZhenjaHorbach,

Thanks for checking! Here's the status of each issue:

✅ Resolved & Pushed

⏳ Waiting on Design Decision

🚫 Not Related to This PR

WIP

I've updated the PR description with links to these issues and added test cases for the resolved ones. Let me know if you need anything else!

@ZhenjaHorbach
Copy link
Copy Markdown
Contributor

Waiting on Design Decision

#85361 (comment) – Confirmed same behavior as OldDot, awaiting final product/design decision

I think we can leave the same behaviour as in OD

@ijmalik
Copy link
Copy Markdown
Contributor Author

ijmalik commented Mar 19, 2026

@ZhenjaHorbach

Observation:
I noticed an issue that appears to be unrelated to this PR, but wanted to bring it to your attention so it can be assigned to the right person.

Precondition:

Create a multi‑level category D:E:F (where E is a middle level, not a leaf).

Expected Behavior:
In the expense category picker, only leaf categories (like F) should be selectable. Middle levels (like E) should not be selectable.

Actual Result:
1- When clicking the circular radio button at the end of the row for category E, it becomes selected – which is incorrect. This should not be possible.

Note: Only the circular radio button is selectable; clicking anywhere else on the row (including the category name) does nothing.

Could you please help direct this issue to the appropriate person or PR author? It seems to have been introduced elsewhere.

Thanks!

cat-select-able.webm

@ZhenjaHorbach
Copy link
Copy Markdown
Contributor

Oh
Good point
I will try to find somebody

@ZhenjaHorbach
Copy link
Copy Markdown
Contributor

Created a bug for this issue
Thanks for noticing!

@ijmalik
Copy link
Copy Markdown
Contributor Author

ijmalik commented Mar 20, 2026

@ZhenjaHorbach

If you see any further potential edge cases I might have missed, Please let me know and I’ll address them promptly.

The PR description has been updated with links to the issue and testing steps.

Let me know if anything else is needed.

Thanks

@ZhenjaHorbach
Copy link
Copy Markdown
Contributor

Lint and jest issues

@ijmalik
Copy link
Copy Markdown
Contributor Author

ijmalik commented Mar 21, 2026

@ZhenjaHorbach I'm working on resolving the lint and Jest issues – will push an update shortly.

@ijmalik ijmalik force-pushed the 85359-PR branch 2 times, most recently from 0254fd4 to 5b1c6e1 Compare March 22, 2026 18:15
@ijmalik
Copy link
Copy Markdown
Contributor Author

ijmalik commented Mar 22, 2026

@ZhenjaHorbach The lint and Jest issues have been resolved.

@ZhenjaHorbach
Copy link
Copy Markdown
Contributor

I will recheck today!

@youssef-lr
Copy link
Copy Markdown
Contributor

bump @ZhenjaHorbach

@ZhenjaHorbach
Copy link
Copy Markdown
Contributor

I will check today!

@ZhenjaHorbach
Copy link
Copy Markdown
Contributor

ZhenjaHorbach commented Mar 27, 2026

I'm not sure that is the right behaviour
I suppose we don't need to show parent categories for selected items

Снимок экрана 2026-03-27 в 10 43 24

And how it looks on staging

Снимок экрана 2026-03-27 в 10 31 41

@trjExpensify
Copy link
Copy Markdown
Contributor

Awesome, thanks! We can check out a fresh build once that's pushed. 👍

@ijmalik
Copy link
Copy Markdown
Contributor Author

ijmalik commented Apr 2, 2026

Now we don't need this structure, and we need to show only the current category
Insted test1: test2: test3 we need to show test3

@ZhenjaHorbach
The requirement to show only the leaf category in the selected field (e.g., test3) has been implemented using getLeafCategoryName in CategoryUtils.ts. The picker list still displays the full hierarchical indentation as shown in the example.

You can see the test steps for this case in the PR description under the “Tests” section:

Precondition: Workspace has a category Parent:Child.

  1. Create an expense and select Parent:Child.
  2. After selection, observe the field that displays the chosen category.
    Expected: Only Child is shown, not the full path.

The code change is included in the last push. Please let me know if any further adjustments are needed.

CC: @shawnborton, @trjExpensify

@ijmalik
Copy link
Copy Markdown
Contributor Author

ijmalik commented Apr 2, 2026

@ZhenjaHorbach

Regarding #85361 – categories starting with a colon (e.g., :D).
Our implementation treats them as top‑level items with no indentation because a leading colon does not represent a meaningful parent. This is a clear improvement over OldDot’s behavior, which incorrectly indents them as subcategories, causing confusion.

We believe this change enhances the user experience by displaying categories in a logical, hierarchy‑free way when there is no actual parent. If you prefer to strictly match OldDot’s indentation, we can adjust, but we recommend keeping the more intuitive approach. Let us know your preference.

CC: @shawnborton, @trjExpensify

@ijmalik
Copy link
Copy Markdown
Contributor Author

ijmalik commented Apr 2, 2026

@ZhenjaHorbach

Summary of Covered Cases

  1. Hierarchical indentation (original goal)

    Input: Categories with colons as separators (e.g., Primary:Secondary:Tertiary, Food:Meat)

    Expected: In the category picker, subcategories are indented under their parent, matching Classic/OldDot.
    Example:

    Primary
        Secondary
            Tertiary
    Food
        Meat

Result: Implemented via processCategoryNameSegments and getCategoryOptionTree – all sections (All, Recent, Selected, Search) now show hierarchical indentation.

  1. Parent category enabled when searching (Category - Parent category is disabled when selected #85359)

    Precondition: Workspace has categories Car and Car: Tesla.

    Action: Create an expense with Car: Tesla, edit → open category picker → search for Car.

    Expected: Both Car and Car: Tesla appear; Car is enabled and selectable.

    Result: Fixed – parent lookup now checks both selected options and the full options list.

  2. Search result grouping (Category - Parent category is separated from subcategories when searched #85364)

    Precondition: Workspace has categories D and D:E:F.

    Action: Select D as the current category, then open picker and search for D.

    Expected: D and its children E and F appear together, with no unrelated categories in between.

    Result: Fixed – search results are deduplicated and re‑sorted with sortCategories to restore hierarchy.

  3. Categories with trailing colon (Category - Category appears as disabled when the category is A: B: #85357)

    Precondition: Workspace has a category named A: B:.

    Action: Open the category picker.

    Expected: B: appears as a selectable leaf category (indented under A).

    Result: Fixed – processing merges the trailing colon into the last segment, yielding ["A", "B:"] → leaf B: displayed and selectable.

  4. Categories with multiple trailing colons and spaces

    Input: Main2: Sub2: Leaf2:: : (extra colons and spaces)

    Expected: Leaf Leaf2: is displayed (indented) and selecting it submits the full original name (which exists in the policy).

    Result: Handled – processCategoryNameSegments filters out empty and whitespace‑only segments, then appends a colon to the last segment if the original ends with a colon. This yields ["Main2", " Sub2", "Leaf2:"] → leaf Leaf2:.

  5. Category starting with a colon (Category - Subcategory with empty parent can be created #85361)

    Input: :D

    Expected: No indentation – treat as a top‑level category (more intuitive than OldDot’s indented display).

    Result: Our implementation filters out the leading empty segment, leaving ["D"]. The category appears as a top‑level item with no indentation.
    Note: If the team prefers to exactly match OldDot (indented), we can adjust; current behavior is cleaner.

  6. Selected field shows only leaf category

    Precondition: A category with hierarchy (e.g., Parent:Child) is selected.

    Action: After selection, look at the field that displays the chosen category.

    Expected: Only the leaf (e.g., Child) is shown, not the full path.

    Result: Implemented via getLeafCategoryName – uses the same processing logic to extract and trim the leaf segment.

  7. Categories with empty parent (multiple leading colons)

    Input: ::Name, :::Name

    Expected: All leading empty segments are filtered out; the name appears as a top‑level category (no indentation).

    Result: Processed correctly – only the last non‑empty part remains.

  8. Mixed spaces and colons

    Input: A : B : C (spaces around colons)

    Expected: Correctly split and indented as A → B → C.

    Result: Our splitting uses the constant separator ':' and trims segments, so A : B : C becomes ["A", "B", "C"].

I have tested all the above cases thoroughly, including the edge cases reported in the linked issues. However, there may be other unusual category names or scenarios not yet considered. If you notice any missing edge cases, please let me know, and I’ll handle them promptly to ensure no regressions reach staging.

CC: @shawnborton, @trjExpensify

@ijmalik
Copy link
Copy Markdown
Contributor Author

ijmalik commented Apr 2, 2026

MultiLevelCategory-2.webm

@ZhenjaHorbach
Copy link
Copy Markdown
Contributor

Reviewer Checklist

  • I have verified the author checklist is complete (all boxes are checked off).
  • I verified the correct issue is linked in the ### Fixed Issues section above
  • I verified testing steps are clear and they cover the changes made in this PR
    • I verified the steps for local testing are in the Tests section
    • I verified the steps for Staging and/or Production testing are in the QA steps section
    • I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
  • I checked that screenshots or videos are included for tests on all platforms
  • I included screenshots or videos for tests on all platforms
  • I verified that the composer does not automatically focus or open the keyboard on mobile unless explicitly intended. This includes checking that returning the app from the background does not unexpectedly open the keyboard.
  • I verified tests pass on all platforms & I tested again on:
    • Android: HybridApp
    • Android: mWeb Chrome
    • iOS: HybridApp
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
  • I verified proper code patterns were followed (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick).
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I verified that this PR follows the guidelines as stated in the Review Guidelines
  • I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.ts or at the top of the file that uses the constant) are defined as such
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately and each prop has a /** comment above it */
    • The file is named correctly
    • The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • The only data being stored in the state is data necessary for rendering and nothing else
    • For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
    • Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
    • All JSX used for rendering exists in the render method
    • The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • For any bug fix or new feature in this PR, I verified that sufficient unit tests are included to prevent regressions in this flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
  • I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

Android: HybridApp
Android: mWeb Chrome
iOS: HybridApp
iOS: mWeb Safari
MacOS: Chrome / Safari

@ZhenjaHorbach
Copy link
Copy Markdown
Contributor

ZhenjaHorbach commented Apr 14, 2026

I suppose it's always been like this 😅

Gotcha. Regardless, I think it should follow Classic and only display the value selected because it's more human readable.

image

@trjExpensify
About this
Should we use only the selected category everywhere(when this category has parent categories)?
Or are there places where we want to see a category with parent categories?

At the moment, we have updated only the expense details screen

Снимок экрана 2026-04-14 в 13 53 01

But we have a lot of places where we use a category with parent categories

Снимок экрана 2026-04-14 в 13 50 05 Снимок экрана 2026-04-14 в 13 50 12 Снимок экрана 2026-04-14 в 13 50 19 Снимок экрана 2026-04-14 в 13 57 46

@trjExpensify
Copy link
Copy Markdown
Contributor

Yeah, I think everywhere apart from a category selector would be the consistent approach.

@ZhenjaHorbach
Copy link
Copy Markdown
Contributor

ZhenjaHorbach commented Apr 15, 2026

@ijmalik
Can you fix this please?
And I suppose we use a common function for category names

@ijmalik
Copy link
Copy Markdown
Contributor Author

ijmalik commented Apr 15, 2026

@ijmalik Can you fix this please? And I suppose we use a common function for category names

@ZhenjaHorbach I've started working on it. Yes, I'll use a common function for category names to ensure consistency across all places.

@ijmalik
Copy link
Copy Markdown
Contributor Author

ijmalik commented Apr 16, 2026

@ZhenjaHorbach

Should we also apply the leaf‑only category name in the Change Log and Thread Header?

CC: @shawnborton, @trjExpensify

Change Log:
85448-CategoryThread-1

Thread Header
85448-CategoryThread-2

@ijmalik
Copy link
Copy Markdown
Contributor Author

ijmalik commented Apr 16, 2026

@ZhenjaHorbach

Should we also apply the leaf‑only category name in the Change Log and Thread Header?

@ZhenjaHorbach, I recommend not applying the leaf‑only change to the Change Log and Thread Header. Keeping the full category path (e.g., Main1:Sub1:Leaf1) in those places is safer because different parents can have identically named leaves (e.g., Main:Sub1:Leaf vs Main:Sub2:Leaf). The full path disambiguates them.

CC: @shawnborton, @trjExpensify

@ijmalik
Copy link
Copy Markdown
Contributor Author

ijmalik commented Apr 16, 2026

@ZhenjaHorbach

All cases listed in the above comment have been addressed, and the changes are available in this commit. Please review and let me know if any additional scenarios need handling.

@ijmalik
Copy link
Copy Markdown
Contributor Author

ijmalik commented Apr 17, 2026

82068-MultiLevelCategories-new.mp4

@ZhenjaHorbach
Copy link
Copy Markdown
Contributor

ZhenjaHorbach commented Apr 17, 2026

@ZhenjaHorbach

Should we also apply the leaf‑only category name in the Change Log and Thread Header?

CC: @shawnborton, @trjExpensify

Change Log: 85448-CategoryThread-1

Thread Header 85448-CategoryThread-2

@ZhenjaHorbach, I recommend not applying the leaf‑only change to the Change Log and Thread Header. Keeping the full category path (e.g., Main1:Sub1:Leaf1) in those places is safer because different parents can have identically named leaves (e.g., Main:Sub1:Leaf vs Main:Sub2:Leaf). The full path disambiguates them.

I don't mind leaving these places unchanged

CC: @trjExpensify
What do you think?

@trjExpensify
Copy link
Copy Markdown
Contributor

  • I agree system message and thread header for said system message would and should always be exactly the same.
  • I think it's fair to keep the full path in the change log, I believe Classic does.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants