Pass disabled prop to Checkbox in RadioListItem for parent categories#85852
Pass disabled prop to Checkbox in RadioListItem for parent categories#85852
Conversation
…omponent The Checkbox in RadioListItem's defaultRightHandSideComponent was not receiving the disabled prop, so it appeared visually enabled and was clickable for disabled parent categories in multi-level category selectors. This passes isDisabled through to the Checkbox so it correctly shows as disabled and blocks interaction. 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. |
Co-authored-by: Krishna <Krishna2323@users.noreply.github.com>
|
Fixed the failing typecheck: coerced The other failing check ( |
…ckboxForParentCategories Co-authored-by: Krishna <Krishna2323@users.noreply.github.com>
|
Fixed the failing checks by merging PR-related failure (already fixed): The TypeScript error in Unrelated failures (fixed by merge): The branch was behind
The merge with |
|
The failing checks are unrelated to this PR's changes. This PR only modifies: Failing checks and why they're unrelated:
Evidence: Neither These failures should resolve once the underlying issues in |
|
The failing checks are unrelated to this PR's changes. This PR only modifies: Failing checks:
Evidence: Both |
|
The failing checks are unrelated to this PR. This PR only modifies Typecheck — Errors in ESLint — Warnings-as-errors in Test (job 2) — Build (developmentDebug) — Missing None of these failures are related to the |
|
The failing checks on this PR are not caused by this PR's changes. This PR only modifies Root cause: PR #84673 ("[NO QA] Remove ONYXKEYS.COLLECTION.REPORT_VIOLATIONS") removed the This broke
Evidence: The last PR merged before this breakage (#85849) passed all these checks. PR #84673 was merged immediately after and introduced the breakage. The files failing in CI are identical between this branch and These failures will resolve once |
|
@MelvinBot try merging main now |
|
@MelvinBot merge main |
…ckboxForParentCategories Co-authored-by: Krishna <Krishna2323@users.noreply.github.com>
|
Done — merged |
|
@MelvinBot mark it ready for review |
|
The failing check Analysis: The error is Evidence: Every recent run of the
This PR only modifies |
|
The branch is already up to date with |
|
Done — PR has been marked as ready for review. |
|
@Krishna2323 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] |
|
The failing checks are unrelated to this PR's code changes. Failing checks:
Why these are unrelated:
Recommendation: Re-run the failed workflows. These appear to be transient CI infrastructure issues (missing expo autolinking script in node_modules for Android, and a build environment issue for iOS). |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppandroid_native.mp4Android: mWeb Chromeandroid_chrome.mp4iOS: HybridAppios_native.mp4iOS: mWeb Safariios_safari.mp4MacOS: Chrome / Safariweb_chrome.mp4 |
|
@MelvinBot please merge main again 😄 |
…ckboxForParentCategories Co-authored-by: Krishna <Krishna2323@users.noreply.github.com>
|
Merged |
|
@marcaaron 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] |
|
The failing Analysis: The failure is an Android build infrastructure issue — Evidence: The same |
Krishna2323
left a comment
There was a problem hiding this comment.
LGTM! 🚀
The failing checks are not related.
|
The failing checks are unrelated to this PR's changes. Failing checks:
Evidence: This PR only modifies |
|
@MelvinBot merge main again 🤖 |
…ckboxForParentCategories Co-authored-by: Krishna <Krishna2323@users.noreply.github.com>
|
Merged |
|
The failing Analysis: The failure is a transient network connectivity error — the GitHub Actions runner could not reach github.com:443 during the Evidence: The PR only modifies Re-running the workflow should resolve this. |
|
The failing checks are unrelated to this PR's changes (which only pass the
Both should pass on a re-run. |
|
The failing checks are unrelated to this PR's changes (only Failing checks:
All three are CI infrastructure/network issues. Re-running the failed checks should resolve them. |
|
@MelvinBot Can you merge main again? |
|
I'd be happy to merge main, but I can only make code changes when directed by the PR author, an assignee, or an existing co-author. |
Explanation of Change
The
Checkboxrendered byRadioListItem'sdefaultRightHandSideComponent(used in the Default Spend Category selector) was not receiving thedisabledprop. This caused parent categories in multi-level hierarchies to display visually enabled, clickable checkboxes — even though the row itself was correctly disabled viaBaseListItem.This change passes
isDisabledthrough to theCheckboxcomponent so it correctly shows as disabled (reduced opacity,not-allowedcursor) and blocks interaction for parent categories.Fixed Issues
$ #85848
PROPOSAL: #85848 (comment)
Tests
not-allowedcursor)Offline tests
N/A — This is a UI-only change that affects checkbox disabled state styling. No network requests are involved.
QA Steps
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 — Web-only bug
Android: mWeb Chrome
N/A — Web-only bug
iOS: Native
N/A — Web-only bug
iOS: mWeb Safari
N/A — Web-only bug
MacOS: Chrome / Safari
Tested via Playwright: parent categories ("TestParent", "TestChild") now show
cursor: not-allowedand disabled checkbox styling, while the leaf category ("TestLeaf") remains interactive withcursor: pointer.