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

[Due for payment 2025-02-19] [$250] mweb - Onboarding - Accounting software selection has blue border when redirected from OD #55145

Open
3 of 8 tasks
mitarachim opened this issue Jan 13, 2025 · 47 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Weekly KSv2

Comments

@mitarachim
Copy link

mitarachim commented Jan 13, 2025

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: 9.0.84-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A
If this was caught during regression testing, add the test name, ID and link from TestRail: Exp
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team
Device used: iPhone 15 Pro Max / iOS 18.2
App Component: Other

Action Performed:

  1. Go to staging.expensify.com
  2. Select "Manage expenses for a small team".
  3. Enter email.
  4. Tap Get started.
  5. Tap Join.
  6. On ND, select any accounting software.

Expected Result:

The accounting software selection will not have blue border.

Actual Result:

The accounting software selection has blue border when redirected from OD.

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6712636_1736716164990.ScreenRecording_01-13-2025_05-04-33_1.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021878829529063238484
  • Upwork Job ID: 1878829529063238484
  • Last Price Increase: 2025-02-03
  • Automatic offers:
    • allgandalf | Reviewer | 105980400
    • nkdengineer | Contributor | 105980401
Issue OwnerCurrent Issue Owner: @trjExpensify
@mitarachim mitarachim added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jan 13, 2025
Copy link

melvin-bot bot commented Jan 13, 2025

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

@mitarachim
Copy link
Author

issue also reproducible in Web
Screenshot 2025-01-13 at 8 36 33 AM

@nkdengineer
Copy link
Contributor

nkdengineer commented Jan 13, 2025

Proposal

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

The accounting software selection has blue border when redirected from OD.

What is the root cause of that problem?

When a row is selected, it's focused here

Then because CONST.INNER_BOX_SHADOW_ELEMENT label is true

dataSet={{[CONST.SELECTION_SCRAPER_HIDDEN_ELEMENT]: true, [CONST.INNER_BOX_SHADOW_ELEMENT]: true}}

The blue border is displayed based on this style.

App/web/index.html

Lines 68 to 80 in c30c298

:focus-visible[data-inner-box-shadow-element]{
overflow: hidden;
}
:focus-visible[data-inner-box-shadow-element]::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
box-shadow: inset 0px 0px 0px 1px #5AB0FF;
pointer-events: none;
z-index: 1000;

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

This bug also happens on other pages that use the selection list, which we don't navigate after selecting a row.

dataSet={{[CONST.SELECTION_SCRAPER_HIDDEN_ELEMENT]: true, [CONST.INNER_BOX_SHADOW_ELEMENT]: true}}

  1. This style is added here to fix the blue border style in ReportListItem so we can define a prop like shouldShowBlueBorderOnFoucs prop in BaseSelectionList with the default value is false

App/web/index.html

Lines 68 to 80 in c30c298

:focus-visible[data-inner-box-shadow-element]{
overflow: hidden;
}
:focus-visible[data-inner-box-shadow-element]::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
box-shadow: inset 0px 0px 0px 1px #5AB0FF;
pointer-events: none;
z-index: 1000;

  1. Then we set the CONST.INNER_BOX_SHADOW_ELEMENT label to shouldShowBlueBorderOnFoucs.
dataSet={{[CONST.SELECTION_SCRAPER_HIDDEN_ELEMENT]: true, [CONST.INNER_BOX_SHADOW_ELEMENT]: shouldShowBlueBorderOnFoucs}} 

dataSet={{[CONST.SELECTION_SCRAPER_HIDDEN_ELEMENT]: true, [CONST.INNER_BOX_SHADOW_ELEMENT]: true}}

  1. Pass shouldShowBlueBorderOnFoucs as true here

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

What alternative solutions did you explore? (Optional)

We can remove the sync focus here. and remove shouldSyncFocus prop.

useSyncFocus(pressableRef, !!isFocused, shouldSyncFocus);

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.

@trjExpensify
Copy link
Contributor

I can repro: Image

Where did this regression come from? I'm surprised it hasn't cropped up on the @Expensify/design radar before now.

@trjExpensify trjExpensify added the External Added to denote the issue can be worked on by a contributor label Jan 13, 2025
Copy link

melvin-bot bot commented Jan 13, 2025

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

@melvin-bot melvin-bot bot changed the title mweb - Onboarding - Accounting software selection has blue border when redirected from OD [$250] mweb - Onboarding - Accounting software selection has blue border when redirected from OD Jan 13, 2025
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jan 13, 2025
Copy link

melvin-bot bot commented Jan 13, 2025

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

@trjExpensify trjExpensify moved this to Bugs and Follow Up Issues in [#whatsnext] #expense Jan 13, 2025
@dannymcclain
Copy link
Contributor

🤔 Would love to get some more design team thoughts on this—it looks like the default style for focusing an element if you were navigating with your keyboard?

@shawnborton
Copy link
Contributor

Hmm yeah.... I mean, we kind of need those blue outlines for things like keyboard navigation and tabbing, but I guess the question is, why is this getting that kind of tab focus in the first place? Can't we just highlight the option as "selected" without needing to give it the :active/:focus style?

@dannymcclain
Copy link
Contributor

I guess the question is, why is this getting that kind of tab focus in the first place? Can't we just highlight the option as "selected" without needing to give it the :active/:focus style?

Totally. Definitely agree.

@dubielzyk-expensify
Copy link
Contributor

Agree with the designers. We generally don't wanna disable the blue outlines given it's critical for accessibility, but it feels a bit weird that the outline is already on that thing without having tabbed.

@brunovjk

This comment has been minimized.

@rdipippo
Copy link

rdipippo commented Jan 14, 2025

🚨 Edited by proposal-police: This proposal was edited at 2025-01-22 02:52:43 UTC.

Proposal

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

On the accounting software selection page, there is a blue border around the selected item, which should only happen if the user uses keyboard navigation to navigate the menu.

What is the root cause of that problem?

This only happens on selection lists that do not have a text input for searching the options at the top. The folowing code, which is part of the text input, handles updating the focus.

Sorry, github refused to paste this permalink as anything but a link

https://github.com/Expensify/App/blob/43655584257283657de7db9f2ae0778fb1cda64f/src/components/SelectionList/BaseSelectionList.tsx#L585C1-L591

Then when rendering the select list options, the value of isTextInputFocusedRef is used to calculate the shouldSyncFocus param:

shouldSyncFocus={!isTextInputFocusedRef.current}

Finally, in the useSyncFocus hook which is used by ListItem, line 23 will be executed, causing the incorrect style:

useLayoutEffect(() => {
if (!isFocused || !shouldSyncFocus || !didScreenTransitionEnd) {
return;
}
ref.current?.focus();
// eslint-disable-next-line react-compiler/react-compiler, react-hooks/exhaustive-deps
}, [didScreenTransitionEnd, isFocused, ref]);
};

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

Change this line:

shouldSyncFocus={!isTextInputFocusedRef.current}

to:

shouldSyncFocus={(shouldShowTextInput && !isTextInputFocusedRef.current) || false}

This makes it so everything works when there is no text input with the select list.

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

Create a UI test that renders a selection list without a text input. Verify that when an item is clicked the style is not added.

What alternative solutions did you explore? (Optional)

N/A
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.

@shawnborton
Copy link
Contributor

That part is something we might want to fix, but I think it's separate from what's going on in this bug report.

Why are we using a :active/:focus tab style when we make the transition from Old to New?

@rdipippo
Copy link

@shawnborton I don't think it's separate. I reproduced the issue on CountrySelectPage by removing the text input and just displaying the select options.

@shawnborton
Copy link
Contributor

Hmm I'm not following. But do you agree that we shouldn't be triggering tab/keyboard focus when we make the transition from Classic to NewDot?

@rdipippo
Copy link

@shawnborton Yes, I agree. The reason it’s adding the blue border is because there is no text input.

Let me see if I can explain it better. The presence of the blue border is controlled by the text input on the selection list. When it gets focus it takes away the blue border. When it blurs it adds it. Both of these things happen indirectly in the use SyncFocus hook.

I think the assumption was that if the input lost focus that meant keyboard navigation was being used on the selection list list (and vice versa).

However, since there is no text input on the accounting page, it never receives the focus and the blue border is never removed.

@shawnborton
Copy link
Contributor

Thanks for the explanation! Now let's get some good proposals for how to fix that :)

@allgandalf
Copy link
Contributor

@shawnborton just to be on the same page, can you please suggest the final expected behaviour for this issue

@shawnborton
Copy link
Contributor

I think we just simply want to remove the :active/:focus styling from the selectOption shown here:

Image

By that I mean, we don't want to trigger the behavior that caused that row to have the :active/:focus styles. We want to keep our general blue outline styles intact throughout the app though. The idea is just to prevent it from being triggered in this particular case.

@allgandalf
Copy link
Contributor

makes sense , @nkdengineer @rdipippo please align your proposal with the expected results (if not already), I will review the proposals later today

@rdipippo
Copy link

@allgandalf I have a solution I want to test - how do I trigger onboarding in my local build?

Copy link

melvin-bot bot commented Jan 27, 2025

@trjExpensify @allgandalf this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

Copy link

melvin-bot bot commented Jan 27, 2025

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

Copy link

melvin-bot bot commented Jan 30, 2025

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

@melvin-bot melvin-bot bot added the Overdue label Jan 30, 2025
@trjExpensify
Copy link
Contributor

@allgandalf what's the story here?

@allgandalf
Copy link
Contributor

let's go with @nkdengineer 's proposal , RCA is correct and solution makes sense

(Note to internal engineer: I also think there alternative solution would work, but i prefer main solution here)

🎀👀🎀 C+ reviewed

@melvin-bot melvin-bot bot removed the Overdue label Feb 3, 2025
Copy link

melvin-bot bot commented Feb 3, 2025

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

@allgandalf
Copy link
Contributor

@allgandalf what's the story here?

The story was that I updated my K2 and messed up something with the access token, fixed it now, sorry for the delay 😅

@trjExpensify
Copy link
Contributor

Damn, an Amazon Bestseller.

Copy link

melvin-bot bot commented Feb 3, 2025

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

@neil-marcellini
Copy link
Contributor

let's go with @nkdengineer 's proposal , RCA is correct and solution makes sense

(Note to internal engineer: I also think there alternative solution would work, but i prefer main solution here)

🎀👀🎀 C+ reviewed

Ok, sounds like that will work. Let's make sure this doesn't create a regression for the original issue #50316

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Feb 3, 2025
Copy link

melvin-bot bot commented Feb 3, 2025

📣 @allgandalf 🎉 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 Feb 3, 2025

📣 @nkdengineer 🎉 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 Feb 5, 2025
@mvtglobally
Copy link

Issue not reproducible during KI retests. (First week)

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Feb 12, 2025
@melvin-bot melvin-bot bot changed the title [$250] mweb - Onboarding - Accounting software selection has blue border when redirected from OD [Due for payment 2025-02-19] [$250] mweb - Onboarding - Accounting software selection has blue border when redirected from OD Feb 12, 2025
Copy link

melvin-bot bot commented Feb 12, 2025

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

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Feb 12, 2025
Copy link

melvin-bot bot commented Feb 12, 2025

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.96-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 2025-02-19. 🎊

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

Copy link

melvin-bot bot commented Feb 12, 2025

@allgandalf @trjExpensify @allgandalf 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]

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 Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Weekly KSv2
Projects
Status: Bugs and Follow Up Issues
Development

No branches or pull requests