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

[HOLD for payment 2024-08-01] [$250] mWeb – Chat – Workspace switcher is with blue border after login #43713

Closed
2 of 6 tasks
lanitochka17 opened this issue Jun 13, 2024 · 54 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor

Comments

@lanitochka17
Copy link

lanitochka17 commented Jun 13, 2024

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: 1.4.83-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: N/A
Email or phone of affected tester (no customers): applausetester+jp_e_category_1@applause.expensifail.com
Issue reported by: Applause - Internal Team

Action Performed:

  1. Go to https://staging.new.expensify.com/
  2. Log out
  3. Log in
  4. Observe Workspace switcher in the left top part

Expected Result:

Workspace switcher is without blue border after login

Actual Result:

Workspace switcher is with blue border after login

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

Add any screenshot/video evidence

Bug6512187_1718296681964.Blue_b.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0140196526c3a485da
  • Upwork Job ID: 1803111339129290564
  • Last Price Increase: 2024-07-16
  • Automatic offers:
    • hoangzinh | Reviewer | 103161579
    • tsa321 | Contributor | 103161581
Issue OwnerCurrent Issue Owner: @hoangzinh
@lanitochka17 lanitochka17 added DeployBlockerCash This issue or pull request should block deployment DeployBlocker Indicates it should block deploying the API labels Jun 13, 2024
Copy link

melvin-bot bot commented Jun 13, 2024

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

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.

@lanitochka17
Copy link
Author

@tylerkaraszewski FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

@lanitochka17
Copy link
Author

We think that this bug might be related to #vip-vsp

@tylerkaraszewski
Copy link
Contributor

I can't reproduce this.

RPReplay_Final1718305035.mp4

@luacmartins
Copy link
Contributor

This is likely coming from #39520. It's really minor though

@luacmartins
Copy link
Contributor

@lanitochka17 can you ask for a re-test? In the meantime, I'll demote this to NAB since it doesn't break any features.

@luacmartins luacmartins added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment DeployBlocker Indicates it should block deploying the API Hourly KSv2 labels Jun 13, 2024
@tsa321
Copy link
Contributor

tsa321 commented Jun 14, 2024

Proposal

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

Workspace switcher is with blue border after login

What is the root cause of that problem?

When the route is Home:

<Tab.Screen
name={SCREENS.HOME}
component={SidebarScreen}

the SidebarScreen is displayed. The SidebarScreen is a component of Tab.Screen with the name SCREENS.HOME in bottomTabNavigator. The Tab is inside the createCustomBottomTabNavigator function:

<ScreenWrapper
testID={CustomBottomTabNavigator.displayName}
shouldShowOfflineIndicator={false}
shouldEnableKeyboardAvoidingView={false}
shouldEnablePickerAvoiding={false}
>

which includes ScreenWrapper.

So, when the route is Home, there are two screens: one from createCustomBottomTabNavigator and one from SidebarScreen, which is the component of the Tab.Screen for Home.

The focus trap is attached to ScreenWrapper, resulting in two focus traps. To disable the initial focus on the Workspace switcher, we must disable the initial focus for both of these screens.

The focus trap for Home is already disabled here:

const isActive = useMemo(() => {
// Focus trap can't be active on bottom tab screens because it would block access to the tab bar.
if (BOTTOM_TAB_SCREENS.find((screen) => screen === route.name)) {
return false;

However, the trapFocus for BottomTabNavigator is not yet disabled.

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

We can include NAVIGATORS.BOTTOM_TAB_NAVIGATOR in BOTTOM_TAB_SCREENS

Alternative solution (1):

We can add NAVIGATORS.BOTTOM_TAB_NAVIGATOR in SCREENS_WITH_AUTOFOCUS:

const SCREENS_WITH_AUTOFOCUS: string[] = [

So it won't autofocus on Workspace switcher after login

Alternative solution (2):

alternatively we can disable focusTrap on small screen:

return (
<FocusTrap
active={isActive}

Above that line, add this code to return children, the code could be:

if (isSmallScreenWidth) {return children;} Or similar cleaner and more efficient code.

@lanitochka17
Copy link
Author

Issue is still reproducible on the mWeb/Chrome

Screenrecorder-2024-06-14-17-16-41-363.mp4

@melvin-bot melvin-bot bot added the Overdue label Jun 17, 2024
Copy link

melvin-bot bot commented Jun 17, 2024

@tylerkaraszewski Whoops! This issue is 2 days overdue. Let's get this updated quick!

@tylerkaraszewski
Copy link
Contributor

I am going to mark this external and get a C+ for it.

@melvin-bot melvin-bot bot removed the Overdue label Jun 18, 2024
@tylerkaraszewski tylerkaraszewski added External Added to denote the issue can be worked on by a contributor Overdue labels Jun 18, 2024
Copy link

melvin-bot bot commented Jun 18, 2024

Job added to Upwork: https://www.upwork.com/jobs/~0140196526c3a485da

@melvin-bot melvin-bot bot changed the title mWeb – Chat – Workspace switcher is with blue border after login [$250] mWeb – Chat – Workspace switcher is with blue border after login Jun 18, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jun 18, 2024
@hoangzinh
Copy link
Contributor

hoangzinh commented Jul 16, 2024

Thanks @tsa321. I think we can go with @tsa321's proposal #43713 (comment), with the main solution

🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented Jul 16, 2024

Triggered auto assignment to @srikarparsi, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

Copy link

melvin-bot bot commented Jul 16, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@hoangzinh
Copy link
Contributor

Awaiting for @srikarparsi for 2nd review round

@srikarparsi
Copy link
Contributor

Assigning @tsa321

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Jul 17, 2024
Copy link

melvin-bot bot commented Jul 17, 2024

📣 @hoangzinh 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

Copy link

melvin-bot bot commented Jul 17, 2024

📣 @tsa321 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Jul 19, 2024
Copy link

melvin-bot bot commented Jul 24, 2024

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Jul 25, 2024
@melvin-bot melvin-bot bot changed the title [$250] mWeb – Chat – Workspace switcher is with blue border after login [HOLD for payment 2024-08-01] [$250] mWeb – Chat – Workspace switcher is with blue border after login Jul 25, 2024
Copy link

melvin-bot bot commented Jul 25, 2024

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

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jul 25, 2024
Copy link

melvin-bot bot commented Jul 25, 2024

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

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

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Jul 31, 2024
Copy link

melvin-bot bot commented Aug 1, 2024

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

@hoangzinh hoangzinh mentioned this issue Aug 2, 2024
50 tasks
@hoangzinh
Copy link
Contributor

BugZero Checklist:

  • The PR that introduced the bug has been identified. Link to the PR: Add focus trap #39520
  • 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: Add focus trap #39520 (comment)
  • A discussion in #expensify-bugs 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
  • Determine if we should create a regression test for this bug: ⛔ No it's a minor UI issue. User can still use app normally.

@twisterdotcom
Copy link
Contributor

Payment Summary:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

7 participants