-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Unnecessary focus on the Add payment method button #9348
Conversation
@allroundexperts thanks for raising the PR so quickly! Could you please add tests for this comment #9248 (comment), and add screenshots for all platforms. Also, it'll be helpful to add this image in tests as in this is what shouldn't happen. |
Are you talking about unit tests @rushatgabhane? |
@allroundexperts sorry that I wasn't clear. I was referring to test steps in the PR description. |
@allroundexperts just waiting on this #9348 (comment) |
@rushatgabhane Updated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@thienlnam LGTM!
Also, the user can navigate through menus and buttons by clicking and then using keyboard shortcuts and vice versa. I verified it for a few other buttons too.
Screen.Recording.2022-06-13.at.4.07.40.PM.mov
PR Reviewer Checklist
|
Found a console error which is unrelated to the PR. https://expensify.slack.com/archives/C01GTK53T8Q/p1655128339662359 |
@allroundexperts can you please add some steps for this in the Tests and QA section of this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thanks for accommodating those changes
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by @thienlnam in version: 1.1.77-0 🚀
|
🚀 Deployed to production by @roryabraham in version: 1.1.77-2 🚀
|
Details
The css selector :focus-visible is responsible for showing up the outline. When the selector :focus-visible is applied to an element is largely dependent browser implementation. As always, the problematic browser is Safari. Safari restores focus on an element even if an event is a click. On Chrome and other browser, focus is restored if event type is keypress ie closing modal by keyboard.
Fixed Issues
$ #9248
Tests
Make sure that there is no focus on the Add payment method button ie

PR Review Checklist
Contributor (PR Author) Checklist
### Fixed Issues
section aboveTests
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
filesSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
displayName
propertythis
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)PR Reviewer Checklist
### Fixed Issues
section aboveTests
sectionQA steps
sectiontoggleReport
and notonIconClick
).src/languages/*
filesSTYLE.md
) were followed/** comment above it */
displayName
propertythis
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)QA Steps
Make sure that there is no focus on the Add payment method button ie

Screenshots
Web
Screen.Recording.2022-06-12.at.1.03.48.AM.mov
Mobile Web
Simulator.Screen.Recording.-.iPhone.13.-.2022-06-04.at.00.24.33.mp4
Android
Screen.Recording.2022-06-12.at.1.06.46.AM.mov
iOS
Simulator.Screen.Recording.-.iPhone.13.-.2022-06-12.at.01.20.26.mp4
Desktop
Screen.Recording.2022-06-12.at.1.23.07.AM.mov