Skip to content

[Due for payment 2026-11-16] [$175] Spend - Field label overlaps with currency label #106002

Closed

Description

@applause-bot

If you haven’t already, check out our contributing guidelines for onboarding. To join our Slack channel, fill out this form.


Version Number: 9.5.32-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #105919
Email or phone of affected tester (no customers): jnosidjodsjojo@gmail.com
Issue reported by: Applause Internal Team
Bug source: Pull Request QA execution
Device used: Mac 26.5 / Chrome
App Component: Search

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to Spend > Expenses.
  3. Click Filters > Amount.
  4. Select Between.
  5. Remove focus from the amount field.
  6. Click currency on any field.
  7. Change to Any currency.
  8. Click Currency.
  9. Change to a diferent currency.

Expected Result:

Field label will not overlap with currency label.

Actual Result:

Field label overlaps with currency label.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7305213_1793826994140.3.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Julia Ponikarchuk
Bug ID: 7305213

Upwork Automation - Do Not Edit
Issue OwnerCurrent Issue Owner: @QichenZhu

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Nov 4, 2026
  2. applause-bot commented on Nov 4, 2026

    @applause-bot
    Author

    While Applause doesn't embed attachments for this bug, here are the links for quick view:
    https://platform.applause.com/services/links/v1/external/c7e22bbb365fe237839ccfbf3acf2e241b73041437792ef016a2e71effcdd960

  3. MelvinBot commented on Nov 4, 2026

    @MelvinBot
    Contributor

    🤖 Web test steps verification results: ❌ fail

    Issue reproduced on dev NewDot web: after switching Any currency to AED, the empty Greater than field label overlaps the left-side AED currency prefix. The two bounds are stacked vertically, not side-by-side.

    Stacked Between bounds showing Greater than label overlapping AED currency prefix

    Step Status
    1. Open Spend > ExpensesSnapshot confirmed Expenses heading and Expenses tab.
    ✅
    2. Open Filters > AmountAmount filter displayed comparison options and currency control.
    ✅
    3. Select BetweenSnapshot confirmed separate Greater than and Less than fields.
    ✅
    4. Blur an empty amount fieldFocused empty Greater than, then clicked Less than without entering an amount.
    ✅
    5. Open currency on either boundGreater than currency picker opened with Select a currency heading.
    ✅
    6. Select Any currencyRead-back changed Greater than currency button to Any currency; Less than remained USD.
    ✅
    7. Reopen CurrencyPicker reopened with Any currency and specific currency options.
    ✅
    8. Select another currency; verify no label overlapSelected AED. Snapshot confirmed Greater than currency AED and Less than USD. Final visual evidence shows Greater than overlapping its left-side AED prefix; the right-side AED selector remains separate. Bounds are vertically stacked.
    Stacked Between bounds showing Greater than label overlapping AED currency prefix
    ❌

    view run

  4. MelvinBot commented on Nov 4, 2026

    @MelvinBot
    Contributor

    Proposal

    What is the root cause of that problem?

    Switching an empty, unfocused field from Any currency to a specific currency restores its currency prefix without floating its label. Both occupy the same space. Reproduced on web; confidence: medium, without production verification.

    Code evidence and verification

    Currency selection changes the input prefix through AmountFilterInput.tsx:70–98 and NumberWithSymbolForm.tsx:550–586.

    The label effect at BaseTextInput/implementation/index.tsx:254–268 ignores prefix presence when choosing activation. The guard at index.tsx:205–214 prevents deactivation when a prefix exists, but cannot activate an already-inline label.

    Web verification and screenshot confirm overlap with the leading prefix, not the trailing currency button. Bounds are already stacked, ruling out insufficient side-by-side width.

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

    Activate the label when a prefix, suffix, or forced-active setting is present. Include those values in the label effect dependencies. Apply the equivalent correction to BaseTextInput/implementation/index.native.tsx:220–234.

    Add real-input regression tests for empty, blurred currency transitions in both directions. Verify both bounds and Amount/Purchase amount filters.

    What alternative solutions did you explore? (Optional)

    Additional width would not fix this stale label state.

    Related issue: Spend - Field label overlaps with currency button. Its merged fix, Prevent amount filter labels from overlapping currency buttons, stacks inputs but leaves this transition unchanged.


    Next Steps for Contributor+ team:
    To accept: @MelvinBot implement [this](https://github.com/Expensify/App/issues/106002#issuecomment-6642683859) to create a draft PR.
    To refine: @MelvinBot <your feedback>
    To reject: Explain why you are rejecting Melvin's proposal. · no recording available

  5. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Nov 4, 2026
  6. melvin-bot commented on Nov 4, 2026

    @melvin-bot

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

  7. changed the title [-]Spend - Field label overlaps with currency label[/-] [+][$175] Spend - Field label overlaps with currency label[/+] on Nov 4, 2026
  8. melvin-bot commented on Nov 4, 2026

    @melvin-bot
  9. camesenin commented on Nov 4, 2026

    @camesenin
  10. melvin-bot commented on Nov 4, 2026

    @melvin-bot

    ✅ Contributor details stored successfully. Thank you for contributing to Expensify!

  11. khizzcr7 commented on Nov 5, 2026

    @khizzcr7

    Problem: In Spend > Expenses > Filters > Amount, with an empty amount input, switching currency to "Any currency" and then back to a specific currency (e.g. AED or USD) leaves the field label (e.g. "Greater than") sitting inline, overlapping the newly rendered currency prefix.

    Root cause: In BaseTextInput (src/components/TextInput/BaseTextInput/implementation/index.tsx and index.native.tsx), initialActiveLabel and deactivateLabel both account for prefixCharacter/suffixCharacter, but the effect that re-syncs label state after mount only checks hasValue || isFocused || isInputAutoFilled(...). So when the currency changes from "Any currency" (prefix '') to a real currency (prefix 'AED'), the effect re-runs, the condition is still false for an empty unfocused input, and it calls deactivateLabel() — which returns early because prefixCharacter is truthy, without ever calling activateLabel(). The label stays inactive while a prefix is now rendered on top of it. AmountFilterInput.tsx passes the symbol through NumberWithSymbolForm as prefixCharacter, which is why this filter input hits it.

    Fix: In both the web and native BaseTextInput implementations, extend that label-sync effect's condition to also activate the label when forceActiveLabel, prefixCharacter, or suffixCharacter is truthy — matching what initialActiveLabel and deactivateLabel already consider — and add those three to the effect's dependency array.

    Verification: Reproduce the exact sequence (empty input, blur, "Any currency", then AED/USD) and confirm the label floats above the prefix instead of overlapping it; confirm the reverse (back to "Any currency") returns the label inline; confirm existing behaviour is unchanged for inputs with a value, with focus, and with no prefix/suffix. Add tests covering dynamic prefix changes on an empty unfocused input on both web and native implementations.

  12. vanshshah11 commented on Nov 5, 2026

    @vanshshah11

    Proposal

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

    In Spend > Expenses > Filters > Amount, when selecting "Between", removing focus from an empty amount field, changing its currency to "Any currency", then changing it to a different currency (e.g. AED), the floating field label overlaps the currency prefix because the label does not activate when prefixCharacter is dynamically added to an empty, unfocused input.

    What is the root cause of that problem?

    The useEffect at src/components/TextInput/BaseTextInput/implementation/index.tsx:256-268 manages label activation/deactivation based on hasValue, isFocused, and isInputAutoFilled(input.current). It does not check for prefixCharacter or suffixCharacter.

    When prefixCharacter changes from "" to "AED" on an empty, unfocused field:

    1. hasValue is false (no typed value)
    2. isFocused is false (user already removed focus)
    3. isInputAutoFilled returns false

    So the effect enters the else branch and calls deactivateLabel(). deactivateLabel (line 205-214) correctly guards against prefix/suffix and returns early — but activateLabel() is never called either. If isLabelActive.current was false (the component mounted without a prefix, so initialActiveLabel was false), the label stays stuck in the inactive (centered) position, overlapping the newly-visible currency prefix.

    The initialActiveLabel computation (line 118) correctly includes !!prefixCharacter || !!suffixCharacter, but the dynamic useEffect that should react to changes does not — it only had [activateLabel, deactivateLabel, hasValue, isFocused] in its deps.

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

    Add prefixCharacter and suffixCharacter checks to the activation condition in the useEffect, and add them to its dependency array:

    useEffect(() => {
        if (
            hasValue ||
            isFocused ||
            isInputAutoFilled(input.current) ||
            // If a prefix or suffix (e.g. currency symbol) is present, the label must stay activated
            // to avoid overlapping with the prefix/suffix text when the field is empty and unfocused.
            !!prefixCharacter ||
            !!suffixCharacter
        ) {
            activateLabel();
        } else {
            deactivateLabel();
        }
    }, [activateLabel, deactivateLabel, hasValue, isFocused, prefixCharacter, suffixCharacter]);

    This ensures that whenever prefixCharacter or suffixCharacter changes (e.g. currency switch), the label activates to the floated position, matching the initial-render behavior. Applied to both web (index.tsx) and native (index.native.tsx) implementations.

    What alternative solutions did you explore?

    1. Move the prefix/suffix check into activateLabel only — rejected because activateLabel does not receive prefix/suffix as deps (its deps are [animateLabel, value]), and adding them there would be a broader scope change.
    2. Use initialActiveLabel as a dependency — rejected because initialActiveLabel is only computed once on mount and does not update when prefix/suffix changes dynamically.

    What specific scenarios should be covered by automated tests?

    • Label activates when prefixCharacter is dynamically added to a previously empty, unfocused input
    • Label is active on initial render when prefixCharacter is present from the start
    • Same behavior for suffixCharacter

    PR: #106069

  13. 15 remaining items

  14. melvin-bot commented on Nov 7, 2026

    @melvin-bot
  15. changed the title [-][$175] Spend - Field label overlaps with currency label[/-] [+][Due for payment 2026-11-16] [$175] Spend - Field label overlaps with currency label[/+] on Nov 9, 2026
  16. melvin-bot commented on Nov 9, 2026

    @melvin-bot

    @QichenZhu

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.5.34-1 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 2026-11-16. 🎊

    The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the Contributor+ 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]. If no checklist is needed for this issue, you can click: [no checklist button]

  17. added
    Skip PaymentSkips all the payment process steps for an issue. Use it for fixed-price projects.
    on Nov 9, 2026
  18. QichenZhu commented on Nov 9, 2026

    @QichenZhu
    Contributor

    Payment will be handled elsewhere.

  19. QichenZhu commented on Nov 16, 2026

    @QichenZhu
    Contributor

    Contributor+ Checklist:

    Regression Test Proposal

    Test:

    1. Go to Spend > Expenses.
    2. Click Filters > Amount.
    3. Select Between.
    4. Remove focus from the amount fields.
    5. Click the currency on either field.
    6. Change it to Any currency.
    7. Click Currency.
    8. Change to a different currency.
    9. Verify the field label doesn't overlap with the currency label.

    Do we agree 👍 or 👎

  20. JS00001 commented on Nov 16, 2026

    @JS00001
    Contributor

    We can close this one then

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

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorSkip PaymentSkips all the payment process steps for an issue. Use it for fixed-price projects.WeeklyKSv2

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions