change background color of focus element#51158
Conversation
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid-app-2024-10-21_15.00.36.mp4Android: mWeb Chromeandroid-chrome-2024-10-21_14.57.41.mp4iOS: Nativeios-app-2024-10-21_15.11.00.mp4iOS: mWeb Safariios-safari-2024-10-21_15.12.24.mp4MacOS: Chrome / Safaridesktop-chrome-2024-10-21_13.40.38.mp4MacOS: Desktopdesktop-app-2024-10-21_13.49.14.mp4 |
|
@shawnborton Here's a bit more detail on how it looks for the account switcher: desktop-chrome-account-switcher-2024-10-21_13.43.35.mp4 |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
|
Yeah, it seems like from your video that the :hover style doesn't override the .active style of the currently selected option row. So I am thinking we should reuse that same behavior here for the keyboard navigation as well. |
@jjcoffee I fixed this bug. Please help to check again. |
I don't think it's a bug. |
|
@shawnborton Do you have any thoughts on whether this is the correct behaviour here? |
This comment was marked as resolved.
This comment was marked as resolved.
|
@shawnborton correct me if I'm wrong, but haven't we talked before about not showing the hover state for active items? I know we at least made that decision for LHN items (chats, search, settings items). |
|
Yeah, that is the exact behavior I was imagining! Basically the hover style DOES NOT override the .selected/.active row style, no matter if you use the mouse or the keyboard. |
@nkdengineer Are you able to make this change? |
|
@Expensify/design Do you have any thoughts on whether this should be considered a bug? |
|
I don't think that's considered a bug. The reality is that the row that is selected via the keyboard could still be selected via the enter key right? But at the same time, technically you could use your mouse to hover over a different row and tap on it. So basically I think we'd just treat the mouse & keyboard as independent input devices and not try to do anything too tricky. Curious what the other designers think too though! |
Definitely agree with you. This seems fine as is. I don't think we need to try to get overly complicated and tricky. If a user is weirdly using both their keyboard and mouse at the same time, that's on them 🤷♂️ |
@jjcoffee Does that mean the background should change to the hover bg if we focus on the selected element? |
No, the selected/active element always has the selected/active background—never the hover background. |
|
Got it. |
|
@jjcoffee I updated. |
jjcoffee
left a comment
There was a problem hiding this comment.
LGTM, thanks for the fix!
|
✋ 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 https://github.com/mjasikowski in version: 9.0.56-0 🚀
|
|
Revert PR created |
…x/50779 [CP Staging] Revert "Merge pull request #51158 from nkdengineer/fix/50779"
|
🚀 Deployed to production by https://github.com/Julesssss in version: 9.0.56-9 🚀
|
|
🚀 Deployed to staging by https://github.com/mjasikowski in version: 9.0.57-0 🚀
|
|
🚀 Deployed to production by https://github.com/luacmartins in version: 9.0.57-10 🚀
|

Details
Fixed Issues
$ #50779
PROPOSAL: #50779 (comment)
Tests
Offline tests
same as above
QA Steps
same as above
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
android.mov
Android: mWeb Chrome
android-mweb.mov
iOS: Native
ios.mov
iOS: mWeb Safari
ios-mweb.mov
MacOS: Chrome / Safari
web-resize.mp4
MacOS: Desktop
desktop.mov