[CP Staging] Allow checkbox deselection for disabled-but-selected categories in RadioListItem#86263
Conversation
…stItem
When a category is deleted but still selected on an expense, the row
allows deselection (BaseListItem uses disabled={isDisabled && !item.isSelected}),
but the checkbox was unconditionally disabled. This aligns the checkbox
disabled logic with the row's existing pattern.
Co-authored-by: Krishna <Krishna2323@users.noreply.github.com>
|
I created this PR from an upstream branch since I don't have push access to your fork. To take ownership of this branch and be able to push updates, run: Then you can close this PR and open a new one from your fork. |
|
@MelvinBot mark it ready for review |
|
@Krishna2323 I'm unable to mark this PR as ready for review due to permission restrictions. You can mark it ready yourself by:
|
|
The failing check ( Failing test: This PR only modifies: Conclusion: The |
|
@MarioExpensify could you please help? I don't have the permission to mark it ready. |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / SafariMonosnap.screencast.2026-03-25.00-16-43.mp4 |
|
@hungvu193 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
Waiting for codex review. Reviewer checklist is already completed. |
|
@codex review |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
MarioExpensify
left a comment
There was a problem hiding this comment.
Moving forward with merge.
|
🚧 @MarioExpensify has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
…rSelectedCategories [CP Staging] Allow checkbox deselection for disabled-but-selected categories in RadioListItem (cherry picked from commit 5f8b8a0) (cherry-picked to staging by francoisl)
|
🚀 Cherry-picked to staging by https://github.com/francoisl in version: 9.3.43-2 🚀
Bundle Size Analysis (Sentry): |
|
🚀 Deployed to production by https://github.com/Julesssss in version: 9.3.43-3 🚀
|
|
🚀 Cherry-picked to staging by https://github.com/francoisl in version: 9.3.44-0 🚀
Bundle Size Analysis (Sentry): |
|
🚀 Cherry-picked to staging by https://github.com/francoisl in version: 9.3.47-0 🚀
Bundle Size Analysis (Sentry): |
|
🚀 Deployed to production by https://github.com/grgia in version: 9.3.48-2 🚀
|
Explanation of Change
When a category used on an expense is deleted from workspace settings, the category appears as disabled but still selected in the category picker.
BaseListItemintentionally keeps such items interactive viadisabled={isDisabled && !item.isSelected}(line 167), allowing users to deselect them by clicking the row. However, PR #85852 addeddisabled={!!isDisabled}to the Checkbox inRadioListItem, which unconditionally disables the checkbox regardless of selection state. This creates an inconsistency where the row is clickable but the checkbox is not.This PR aligns the Checkbox's
disabledprop withBaseListItem's existing pattern:disabled={!!isDisabled && !item.isSelected}. This ensures:isDisabled=true,isSelected=false): checkbox stays disabled (original fix preserved)isDisabled=true,isSelected=true): checkbox becomes enabled so users can click it to deselectFixed Issues
$ #86261
PROPOSAL: #86261 (comment)
Tests
Offline tests
N/A - This is a UI interaction fix that doesn't involve network calls.
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))npm run compress-svg)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
N/A - UI logic change, behavior is cross-platform
Android: mWeb Chrome
N/A - UI logic change, behavior is cross-platform
iOS: Native
N/A - UI logic change, behavior is cross-platform
iOS: mWeb Safari
N/A - UI logic change, behavior is cross-platform
MacOS: Chrome / Safari
Tested on Chrome web build - deleted category checkbox is now clickable to deselect.