Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[$500] IOU - Blue box surrounding the currency after the currency selection #31687

Closed
2 of 6 tasks
izarutskaya opened this issue Nov 22, 2023 · 19 comments
Closed
2 of 6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Engineering External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2

Comments

@izarutskaya
Copy link

izarutskaya commented Nov 22, 2023

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: v1.4.2-0
Reproducible in staging?: Y
Reproducible in production?: N
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause-Internal Team
Slack conversation: @

Action Performed:

  1. Navigate to staging.new.expensify.com.
  2. Click FAB > Request money.
  3. Click on the currency.
  4. Choose any currency and hit ENTER to select.

Expected Result:

There will be no blue box surrounding the currency after the selection.

Actual Result:

There is a blue box surrounding the currency after the selection.

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

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

Screenshots/Videos

Bug6286950_1700649734281.20231122_101722__1_.1.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01a4bb2613eb2f6256
  • Upwork Job ID: 1727292856284299264
  • Last Price Increase: 2023-11-22
@izarutskaya izarutskaya added DeployBlockerCash This issue or pull request should block deployment External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Nov 22, 2023
@melvin-bot melvin-bot bot changed the title IOU - Blue box surrounding the currency after the currency selection [$500] IOU - Blue box surrounding the currency after the currency selection Nov 22, 2023
Copy link

melvin-bot bot commented Nov 22, 2023

Job added to Upwork: https://www.upwork.com/jobs/~01a4bb2613eb2f6256

Copy link

melvin-bot bot commented Nov 22, 2023

Triggered auto assignment to @JmillsExpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Nov 22, 2023
Copy link

melvin-bot bot commented Nov 22, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

Copy link

melvin-bot bot commented Nov 22, 2023

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

@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Nov 22, 2023
Copy link
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.

Copy link

melvin-bot bot commented Nov 22, 2023

📣 @github-actions[bot]! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Make sure you've read and understood the contributing guidelines.
  2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

Copy link

melvin-bot bot commented Nov 22, 2023

Triggered auto assignment to @lakchote (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@izarutskaya
Copy link
Author

Not reproducible on production

20231122_182005.mp4

@BhuvaneshPatil
Copy link
Contributor

@ishpaul777 I saw you mentioned #31225 for introducing a regression, can you please confirm that again? cause it has been mentioned in the issue.

@ishpaul777
Copy link
Contributor

ishpaul777 commented Nov 22, 2023

I spoke too early (issue still present with reverting PR) thats why i deleted the comment Sorry for ping.

@BhuvaneshPatil
Copy link
Contributor

okay, so the PR didn't introduce the regression, am I right?

@bernhardoj
Copy link
Contributor

Proposal

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

Selecting a currency with the ENTER key highlights the currency symbol button with a blue outline.

What is the root cause of that problem?

This issue happens after the focus trap PR #27670. When we open the currency selection page, the focus trap will "save" the last focused element, the currency symbol button. When we close the currency symbol button, the focus trap will re-focus on the currency symbol button. This is the default behavior of the focus trap which is explained here.

Because we select the currency with the keyboard, the blue outline shows, and then immediately the focus is moved to the amount input by this code.

useFocusEffect(
useCallback(() => {
focusTimeoutRef.current = setTimeout(() => textInput.current && textInput.current.focus(), CONST.ANIMATED_TRANSITION);
return () => {
if (!focusTimeoutRef.current) {
return;
}
clearTimeout(focusTimeoutRef.current);
};
}, []),
);

In a normal case, I think the behavior is fine, but the unpleasant thing here is that the blue outline is shown for a brief moment and then disappears.

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

For the money request page, don't refocus back to the last focused element by passing shouldReturnFocusOnDeactivate to the ScreenWrapper > FocusTrapView.

focusTrapOptions={{
    returnFocusOnDeactivate: shouldReturnFocusOnDeactivate,

In MoneyRequestSelectorPage and EditRequestAmountPage,

<ScreenWrapper
    shouldReturnFocusOnDeactivate={false}

@lakchote lakchote removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 Help Wanted Apply this label when an issue is open to proposals by contributors labels Nov 22, 2023
@lakchote lakchote added the Daily KSv2 label Nov 22, 2023
@lakchote
Copy link
Contributor

lakchote commented Nov 22, 2023

The issue comes from this PR and is a regression. cc @roryabraham @kosmydel could you please fix it while considering @bernhardoj proposal above?

I've removed the Deploy Blocker since it's not that sensitive of an issue.

@bernhardoj
Copy link
Contributor

Another issue with the same root cause here #31725. I guess this happens in many places, perhaps we should set shouldReturnFocusOnDeactivate to false by default?

@dukenv0307
Copy link
Contributor

Proposal

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

Workspace - Blue focus is shown when changing workspace name

What is the root cause of that problem?

We added a focus trap in this PR #27670 which makes the focus after we submit a form with enter key

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

In WorkspaceInitalPage, we should add shouldDisableFocusTrap as false into ScreenWrapper. We should also add this prop to other pages which can navigate to a page that contains a form.

What alternative solutions did you explore? (Optional)

We can change shouldDisableFocusTrap to shouldEnableFocusTrap since almost all pages shouldn't enable focus trap
and update this condition to isEnabled={shouldEnableFocusTrap}

isEnabled={!shouldDisableFocusTrap}

@luacmartins
Copy link
Contributor

@kosmydel can you please add this issue to your list when you work on v3 of #27670?

@melvin-bot melvin-bot bot added the Overdue label Nov 27, 2023
@lakchote
Copy link
Contributor

Waiting for @kosmydel working on the fix. He's currently working on the ideal nav (link)

@melvin-bot melvin-bot bot removed the Overdue label Nov 27, 2023
@kosmydel
Copy link
Contributor

I think we can close this issue, as the PR was reverted. I am going to fix it when I prepare a new PR.

@lakchote
Copy link
Contributor

Closing this issue as it's no longer happening since the PR was reverted. @kosmydel will create a new PR to address this issue.

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Engineering External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2
Projects
None yet
Development

No branches or pull requests

10 participants