Skip to content

[Due for payment 2025-08-15] [$250] Workspace - Usd currency changed displays blue border. #66693

Closed

Description

@jponikarchuk

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: V9.1.83-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from TestRail: #66275
Email or phone of affected tester (no customers): Slottwo1 82@gmail.com
Issue reported by: Applause Internal Team
Device used: Redminote 10s android 13
App Component: Workspace Settings

Action Performed:

  1. Go to https://staging.new.expensify.com/home
  2. Go to workspace
  3. Tap new workspace - currency - change to usd

Expected Result:

Usd currency changed must not display blue border .

Actual Result:

Usd currency changed displays blue border .

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

1.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021947440784440270101
  • Upwork Job ID: 1947440784440270101
  • Last Price Increase: 2025-07-21
  • Automatic offers:
    • thelullabyy | Contributor | 108209826
Issue OwnerCurrent Issue Owner: @lydiabarclay

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jul 18, 2025
  2. melvin-bot commented on Jul 18, 2025

    @melvin-bot

    Triggered auto assignment to @lydiabarclay (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.

  3. Eskalifer1 commented on Jul 18, 2025

    @Eskalifer1
    Contributor

    Proposal

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

    Workspace - Usd currency changed displays blue border

    What is the root cause of that problem?

    The reason for this behavior is that we now use a Reanimated Modal for the currency selection component

    shouldUseReanimatedModal

    This modal is based on the Modal from react-native:

    import {BackHandler, Dimensions, InteractionManager, Modal, View} from 'react-native';

    The modal window from react-native has a default behavior of returning focus to the active element state when the modal window is closed, which is why, after we have something entered in the init and we select an element, the modal window closes and the focus returns to the previous active element, which is why we give box-shadow for elements that have :focus or :focus-visible state

    And react-native, in turn, supports the wcag 2.1 recommendations (https://www.w3.org/TR/WCAG21/#focus-order), as a result of which, when the window is closed, the focus returns to the last active element, which in our case is the Currency picker button that was clicked before(https://www.w3.org/TR/WCAG21/#focus-visible means that when you click a button, the focus moves to it and this focus should be visible. Restoring focus to the button after a modifier helps to meet this requirement).

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

    In this case, we do not need this behavior, so for this component, you can add a call to the blurActiveElement function when selecting the active element:

        const updateInput = (item: CurrencyListItem) => {
            onInputChange?.(item.currencyCode);
            blurActiveElement();
            hidePickerModal();
        };

    const updateInput = (item: CurrencyListItem) => {
    onInputChange?.(item.currencyCode);
    hidePickerModal();
    };

    Here is a video that shows that this is the default behavior of this modal window, if you remove focus from the inlet before selecting an element, then the previous element will not be focused

    2025-07-18.11.52.38.mov

    We can also make this props dynamically and by default it will be false, and in this case pass it as true(Or we can add this prop to modal if needed)

    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)

    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.

  4. dmkt9 commented on Jul 18, 2025

    @dmkt9
    Contributor

    Proposal

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

    Usd currency changed displays blue border .

    What is the root cause of that problem?

    • When we open the modal and focus on the input, it becomes document.activeElement. When we type in the input, the browser will turn on the "hadKeyboardEvent" flag.
    • When closing the modal (removing from the DOM), the input loses focus. The browser immediately looks for the next element in the DOM tree that can receive focus and assigns focus to it. Because MenuItemWithTopDescription is next to it and can receive focus due to PressableWithFeedback. Together with the above flag and having focus, the outline will appear

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

    We need to make sure that when the SelectionList is unmounted (like by closing the modal) the input of the SelectionList is no longer an activeElement:

    return () => {
    document.removeEventListener('keydown', checkShouldDebounceScrolling);
    document.removeEventListener('keyup', checkShouldDebounceScrolling);
    };

    return () => {
        blurActiveElement();
        document.removeEventListener('keydown', checkShouldDebounceScrolling);
        document.removeEventListener('keyup', checkShouldDebounceScrolling);
    };

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

    NA

    What alternative solutions did you explore? (Optional)

    Or do only for CurrencyPicker

    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.

  5. melvin-bot commented on Jul 21, 2025

    @melvin-bot

    @lydiabarclay Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  6. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Jul 21, 2025
  7. melvin-bot commented on Jul 21, 2025

    @melvin-bot
  8. changed the title [-]Workspace - Usd currency changed displays blue border.[/-] [+][$250] Workspace - Usd currency changed displays blue border.[/+] on Jul 21, 2025
  9. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Jul 21, 2025
  10. melvin-bot commented on Jul 21, 2025

    @melvin-bot

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

  11. 20 remaining items

  12. changed the title [-][$250] Workspace - Usd currency changed displays blue border.[/-] [+][Due for payment 2025-08-15] [$250] Workspace - Usd currency changed displays blue border.[/+] on Aug 8, 2025
  13. melvin-bot commented on Aug 8, 2025

    @melvin-bot

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

  14. melvin-bot commented on Aug 8, 2025

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.90-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-08-15. 🎊

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

  15. melvin-bot commented on Aug 8, 2025

    @melvin-bot

    @ZhenjaHorbach @lydiabarclay 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]

  16. lydiabarclay commented on Aug 13, 2025

    @lydiabarclay
    Contributor

    @ZhenjaHorbach can you please fill out the BZ checklist? Thanks!

  17. ZhenjaHorbach commented on Aug 14, 2025

    @ZhenjaHorbach
    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.

      Unfortunately, I did not find a suitable PR

    • [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: NA

    • [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.

    • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

      Link to issue: https://github.com/Expensify/Expensify/issues/536787

    Regression Test Proposal

    Test:

    1. Go to ND
    2. Go to workspace
    3. Tap new workspace - currency - change to new currency
    4. Verify that "No blue border in currency box"

    Do we agree 👍 or 👎

  18. lydiabarclay commented on Aug 15, 2025

    @lydiabarclay
    Contributor

    Payment Summary

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

    ✅ Regression test filed

  19. ZhenjaHorbach commented on Aug 15, 2025

    @ZhenjaHorbach
    Contributor

    Requested in ND !

  20. quinthar commented on Aug 28, 2025

    @quinthar
    Contributor

    $250 approved for @ZhenjaHorbach

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.DailyKSv2ExternalAdded 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