Handle disabled case when computing menu item background color#51988
Handle disabled case when computing menu item background color#51988luacmartins merged 4 commits intomainfrom
Conversation
|
@nkdengineer @jjcoffee will you please review? |
|
Screenshots not working. Want a design review on this? Happy to have a look |
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid-app-2024-11-05_10.53.27.mp4Android: mWeb Chromeandroid-chrome-2024-11-05_10.55.35.mp4iOS: Nativeios-app-2024-11-05_11.14.51.mp4iOS: mWeb Safariios-safari-2024-11-05_11.16.02.mp4MacOS: Chrome / Safaridesktop-chrome-2024-11-05_10.43.40.mp4MacOS: Desktopdesktop-app-2024-11-05_10.48.05.mp4 |
jjcoffee
left a comment
There was a problem hiding this comment.
LGTM!
Would appreciate if you could take a quick look at the code @nkdengineer 🙏
|
@dubielzyk-expensify Some screenshots here if you want to take a look. |
|
Gonna merge this once since it's approved. |
|
✋ 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/luacmartins in version: 9.0.59-0 🚀
|
|
🚀 Deployed to production by https://github.com/francoisl in version: 9.0.59-3 🚀
|
| if (isSelected) { | ||
|
|
||
| if (isDisabled) { | ||
| backgroundColor = undefined; | ||
| } else if (isSelected) { |
There was a problem hiding this comment.
FYI, this caused the following issue: #52259
We need to check for isSelected before checking for isDisabled.
More details can be found in this proposal: #52259 (comment)
Explanation of Change
We should handle the disabled case when computing the menu item background color, since disabled items can't be selected nor focused. cc @nkdengineer @jjcoffee
Fixed Issues
$ #50779
$ #51984
Tests
Offline tests
N/A
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)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: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop