Skip to content

[Due for payment 2025-09-04] [$250] Merge expense - Tooltip is shown when hovered over category when category is not truncated #68212

Closed

Description

@nlemma

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 9.1.91-0
Reproducible in staging?: Yes
Reproducible in production?: N/A - new feature, doesn't exist in prod
If this was caught during regression testing, add the test name, ID and link from TestRail: #65596
Email or phone of affected tester (no customers): sdjniodsoijosd@gmail.com
Issue reported by: Applause Internal Team
Device used: Mac 15.5 / Chrome
App Component: Money Requests

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to workspace chat.
  3. Submit two expenses with category.
  4. Open expense report.
  5. Open any transaction thread.
  6. Click More > Merge.
  7. Hover over category on the expense row.

Expected Result:

No tooltip will be shown because category is not truncated.

Actual Result:

Tooltip is shown when hovered over category when category is not truncated.

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6911367_1754653363660.20250808_194009.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021953846363914909863
  • Upwork Job ID: 1953846363914909863
  • Last Price Increase: 2025-08-08
  • Automatic offers:
    • thelullabyy | Contributor | 108460907
Issue OwnerCurrent Issue Owner: @
Issue OwnerCurrent Issue Owner: @NicMendonca

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Aug 8, 2025
  2. melvin-bot commented on Aug 8, 2025

    @melvin-bot

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

  3. melvin-bot commented on Aug 8, 2025

    @melvin-bot

    Triggered auto assignment to @NicMendonca (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

  4. github-actions commented on Aug 8, 2025

    @github-actions
    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.
  5. melvin-bot commented on Aug 8, 2025

    @melvin-bot

    💬 A slack conversation has been started in #expensify-open-source

  6. andriferry commented on Aug 8, 2025

    @andriferry

    Proposal

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

    Merge expense - Tooltip is shown when hovered over category when category is not truncated, it causing we don't have any conditional for category

    What is the root cause of that problem?

    In Text component we need to created conditonal for that

    <Tooltip
    shouldRender={showTooltip}
    text={text}
    >
    <View style={[styles.flexRow, styles.flexShrink1, styles.gap1]}>
    <Icon
    src={icon}
    fill={theme.icon}
    height={12}
    width={12}
    />
    <Text
    numberOfLines={1}
    style={[styles.optionDisplayName, styles.label, styles.pre, styles.justifyContentCenter, styles.textMicro, styles.textSupporting, styles.flexShrink1, textStyle]}
    >
    {text}
    </Text>
    </View>
    </Tooltip>

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

    1. In this line change showTooltip to shouldShowTooltip

    export default function TextWithIconCell({icon, text, showTooltip, textStyle}: TextWithIconCellProps) {

    to

     export default function TextWithIconCell({icon, text, shouldShowTooltip, textStyle}: TextWithIconCellProps) { 
    
    1. Add useState for showTooltip
    const [showTooltip, setShowTooltip] = useState(false);
    1. Add conditional for offsetWidth in onLayout props in Text component
    <Text
        numberOfLines={1}
        style={[styles.optionDisplayName, styles.label, styles.pre, styles.justifyContentCenter, styles.textMicro, styles.textSupporting, styles.flexShrink1, textStyle]}
        onLayout={(e) => {
            const target = (e.nativeEvent as unknown as LayoutChangeEvent).target;
            if (!shouldShowTooltip) {
                return;
            }
            if (target.scrollWidth > target.offsetWidth) {
                setShowTooltip(true);
                return;
            }
            setShowTooltip(false);
        }}
    >
        {text}
    </Text>
    1. Change props showTooltip to shouldShowTooltip

    What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

    N/A

    What alternative solutions did you explore? (Optional)

    N/A

    Result

    Screen.Recording.2025-08-08.at.22.22.39.mov
  7. 32 remaining items

  8. changed the title [-][$250] Merge expense - Tooltip is shown when hovered over category when category is not truncated[/-] [+][Due for payment 2025-09-04] [$250] Merge expense - Tooltip is shown when hovered over category when category is not truncated[/+] on Aug 28, 2025
  9. melvin-bot commented on Aug 28, 2025

    @melvin-bot

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

  10. melvin-bot commented on Aug 28, 2025

    @melvin-bot

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

    If no regressions arise, payment will be issued on 2025-09-04. 🎊

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

  11. melvin-bot commented on Aug 28, 2025

    @melvin-bot

    @hungvu193 @NicMendonca The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

  12. hungvu193 commented on Sep 2, 2025

    @hungvu193
    Contributor

    BugZero Checklist:

    • [Contributor] Classify the bug:
    Bug classification

    Source of bug:

    • 1a. Result of the original design (eg. a case wasn't considered)
    • 1b. Mistake during implementation
    • 1c. Backend bug
    • 1z. Other:

    Where bug was reported:

    • 2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
    • 2b. Reported on staging (eg. found during regression or PR testing)
    • 2d. Reported on a PR
    • 2z. Other:

    Who reported the bug:

    • 3a. Expensify user
    • 3b. Expensify employee
    • 3c. Contributor
    • 3d. QA
    • 3z. Other:
    • [Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.

      Link to comment: https://github.com/Expensify/App/pull/41672/files#r2315306052

    • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.

      Link to discussion: N/A

    • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

    Regression Test Proposal

    Test:

    NOTE: Merge action is temporarily disabled on main

    function isMergeAction(parentReport: Report, reportTransactions: Transaction[], policy?: Policy): boolean {
    // Temporary hide merge action
    return false;

    1. Go to staging.new.expensify.com
    2. Go to workspace chat.
    3. Submit two expenses with category.
    4. Open expense report.
    5. Open any transaction thread.
    6. Click More > Merge.
    7. Hover over category on the expense row.
    8. Verify that tooltip only shows if the category row text is ellipsed.

    Do we agree 👍 or 👎

  13. NicMendonca commented on Sep 4, 2025

    @NicMendonca
    Contributor

    Payment Summary

    Contributor: @thelullabyy paid $250 via Upwork
    Contributor+: @hungvu193 due $250 via NewDot

  14. NicMendonca commented on Sep 4, 2025

    @NicMendonca
    Contributor

    @thelullabyy payment issued in upwork! ✅

  15. JmillsExpensify commented on Sep 11, 2025

    @JmillsExpensify
    Contributor

    $250 approved for @hungvu193

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 productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2EngineeringExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions