Uh oh!
There was an error while loading. Please reload this page.
feat(fields): CheckboxesField visibleWhen cascading + dependsOn gating (completes option-widget parity) - #2735
Merged
Merged
Conversation
…g (completes option-widget parity) `checkboxes` was the last static-option widget still rendering `config.options` raw. It now matches `MultiSelectField` (its multi-value sibling), completing ADR-0058 parity across select / multiselect / radio / checkboxes. - @object-ui/fields: CheckboxesField routes through the shared `useCascadingOptions` hook — offered boxes narrow against the live record + `current_user`, gates behind a "select the parent first" hint while a `dependsOn` field is empty, and prunes offered-out selections per-element. Adds `checkboxes-empty-*` / `checkboxes-option-*` testids. - @object-ui/components: adds `checkboxes` to the form renderer's option field sets (CASCADE_OPTION_FIELD_TYPES, the cross-field cascade-clear effect, and the option pre-filter) so it's threaded `dependentValues` and gated like the rest. - Tests: CheckboxesField.cascade.test.tsx mirrors MultiSelectField.cascade.test.tsx. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Completes the ADR-0058 cascading / role-gated option parity across all four static-option widgets.
checkboxeswas the last one still renderingconfig.optionsraw — after #2717 (multiselect) and #2728 (radio + single-source resolver), this closes the set:select/multiselect/radio/checkboxesnow behave identically.Why
CheckboxesFieldis the multi-value sibling ofMultiSelectField(storesstring[], fixed option set) but had none of the per-optionvisibleWhenfiltering,dependsOngating, or cascade clear — so acheckboxesfield with dependent / role-gated options showed the unfiltered set.Changes
@object-ui/fields—CheckboxesFieldroutes through the shareduseCascadingOptionshook: offered boxes narrow against the live record +current_user; gates behind a "select the parent first" hint while adependsOnfield is empty; prunes offered-out selections per-element (the multi-value cascade clear). Addscheckboxes-empty-*/checkboxes-option-*testids.@object-ui/components— addscheckboxesto the form renderer's option-field sets:CASCADE_OPTION_FIELD_TYPES(sodependentValuesis threaded), the cross-field cascade-clear effect, and the option pre-filter (gateddisabled+ hint). Without this the widget never sees its controlling field.Tests
CheckboxesField.cascade.test.tsxmirrorsMultiSelectField.cascade.test.tsx(gating, per-element cascade clear, role/context gating).CheckboxesField.cascade+ the refactored form path (form-cascading-select,form-dependent-values) + siblingMultiSelectField.cascade/RadioField.cascade.tsc --noEmitclean for@object-ui/components+@object-ui/fields;eslint0 errors.Refs
resolveCascadingOptions) · ADR-0058 · server-side enforcement tracked in [P3][icebox] Enforce role-gated / dependent select option values on the server (visibleWhen is UX-only) #2729🤖 Generated with Claude Code