-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Handle disabled case when computing menu item background color #51988
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 |
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
![Screenshot_1730751716](https://github.com/user-attachments/assets/e834d9e5-b30e-4c6d-a712-092b8b6da6c6)Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
![Screenshot 2024-11-04 at 1 28 47 PM](https://github.com/user-attachments/assets/ff0a339a-804c-425b-a473-f0b72fb64aaf)MacOS: Desktop