Skip to content

[Due for payment 2025-12-25] Long suggested categories overflow the view #76437

Closed

Description

@thienlnam

Problem:

When auto-categorization runs and it suggest a long category, the options run off the page so it's difficult to see what the full option is

Image

Reproduction:

  1. Create a policy in NewDot
  2. Add two similar but lengthy categories (like the ones in the example above)
  3. Create a manual expense and submit it to the policy with a merchant name that will trigger the recommendations
  4. Verify the message from Concierge shows up

Solution:

Have it break onto a new line so the full text is viewable

Issue OwnerCurrent Issue Owner: @
Issue OwnerCurrent Issue Owner: @brianlee-expensify

Activity

  1. self-assigned this
    on Dec 1, 2025
  2. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Dec 1, 2025
  3. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Dec 1, 2025
  4. melvin-bot commented on Dec 1, 2025

    @melvin-bot

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

  5. changed the title [-]Long suggested categories overflow[/-] [+]Long suggested categories overflow the view[/+] on Dec 1, 2025
  6. zainAwan9175 commented on Dec 1, 2025

    @zainAwan9175
    Contributor

    Would like to work on this.

  7. daledah commented on Dec 1, 2025

    @daledah
    Contributor

    🚨 Edited by proposal-police: This proposal was edited at 2025-12-01 17:56:05 UTC.

    Proposal

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

    Long suggested categories overflow the view

    What is the root cause of that problem?

    Improvement

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

    1. We should create a new prop for the Button component like numberOfLines and make it default to 1 then pass it here

    <Text
    numberOfLines={1}
    style={[

    1. Then pass it as numberOfLines={isConciergeCategoryOptions(action) || isConciergeDescriptionOptions(action) ? 2 : 1} (We can adjust the value here) for the ActionableItemButtons -> Button

    {actionableItemButtons.length > 0 && (
    <ActionableItemButtons
    items={actionableItemButtons}
    layout={
    isActionableTrackExpense(action) ||
    isConciergeCategoryOptions(action) ||
    isConciergeDescriptionOptions(action) ||
    isActionableMentionWhisper(action)
    ? 'vertical'
    : 'horizontal'
    }
    shouldUseLocalization={!isConciergeCategoryOptions(action) && !isConciergeDescriptionOptions(action)}
    />
    )}

    <Button
    key={item.key}
    onPress={item.onPress}
    text={props.shouldUseLocalization ? translate(item.text as TranslationPaths) : item.text}
    medium
    success={item.isPrimary}
    />

    What alternative solutions did you explore? (Optional)

    To cover this expected, we should create a new prop to Button component ellipsizeMode then pass it to the primaryText

    const primaryText = (
    <Text
    numberOfLines={1}
    style={[

    From PureReportActionItem component pass ellipsizeMode as middle -> ActionableItemButtons -> Button

        ellipsizeMode={isConciergeCategoryOptions(action) || isConciergeDescriptionOptions(action) ? 'middle' : undefined}
    
    Image

    note: ellipsizeMode is a prop of React Native Text component, it doesn't work on web so we can use TextWithMiddleEllipsis component instead

    Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

  8. github-actions commented on Dec 1, 2025

    @github-actions
    Contributor

    ⚠️ @daledah Thanks for your proposal. Please update it to follow the proposal template, as proposals are only reviewed if they follow that format (note the mandatory sections).

  9. melvin-bot commented on Dec 1, 2025

    @melvin-bot

    Triggered auto assignment to @dannymcclain (Design), see these Stack Overflow questions for more details.

  10. nkdengineer commented on Dec 1, 2025

    @nkdengineer
    Contributor

    🚨 Edited by proposal-police: This proposal was edited at 2025-12-01 18:04:51 UTC.

    Proposal

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

    Long suggested categories overflow the view

    What is the root cause of that problem?

    Improvement

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

    1. Define primaryTextNumberOfLines prop for Button component with the default value is 1 and use it here

    <Text
    numberOfLines={1}
    style={[

    1. Pass down the primaryTextNumberOfLines={isConciergeCategoryOptions(action) || isConciergeDescriptionOptions(action) ? 0 : 1} prop to Button from here. We shouldn't pass the undefined value because it will be fallback to th default value. We should use 0 instead.

    {actionableItemButtons.length > 0 && (
    <ActionableItemButtons
    items={actionableItemButtons}
    layout={
    isActionableTrackExpense(action) ||
    isConciergeCategoryOptions(action) ||
    isConciergeDescriptionOptions(action) ||
    isActionableMentionWhisper(action)
    ? 'vertical'
    : 'horizontal'
    }
    shouldUseLocalization={!isConciergeCategoryOptions(action) && !isConciergeDescriptionOptions(action)}
    />
    )}

    1. Optional: We can add the style here to prevent the word is overflow when the category name doesn't have any space.
    primaryTextNumberOfLines !== 1 && styles.breakAll,
    

    <Text
    numberOfLines={1}
    style={[

    What alternative solutions did you explore? (Optional)

    Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

  11. github-actions commented on Dec 1, 2025

    @github-actions
    Contributor

    ⚠️ @nkdengineer Thanks for your proposal. Please update it to follow the proposal template, as proposals are only reviewed if they follow that format (note the mandatory sections).

  12. 31 remaining items

  13. melvin-bot commented on Dec 25, 2025

    @melvin-bot

    Issue is ready for payment but no BZ is assigned. @brianlee-expensify you are the lucky winner! Please verify the payment summary looks correct and complete the checklist. Thanks!

  14. mananjadhav commented on Dec 30, 2025

    @mananjadhav
    Collaborator

    @brianlee-expensify quick bump on the payout here.

  15. melvin-bot commented on Jan 2, 2026

    @melvin-bot

    @mananjadhav, @dannymcclain, @thienlnam, @nkdengineer, @brianlee-expensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  16. mananjadhav commented on Jan 5, 2026

    @mananjadhav
    Collaborator

    Been waiting for the payout here and regression test creation. Then we can close it.

  17. brianlee-expensify commented on Jan 5, 2026

    @brianlee-expensify
    Contributor

    Payment Summary

    Contributor: @nkdengineer due $250 via NewDot
    Contributor+: @mananjadhav due $250 via NewDot

  18. trjExpensify commented on Jan 5, 2026

    @trjExpensify
    Contributor

    approved $250 for @mananjadhav.

  19. twisterdotcom commented on Jan 12, 2026

    @twisterdotcom
    Contributor

    @nkdengineer has submitted payment for this report on ND here.

    SO: https://stackoverflowteams.com/c/expensify/questions/7582

    Zapier Logs Run ID: 00040eee-9f26-a016-b041-0ec15242b114
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionDailyKSv2DesignExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions