Repository navigation
Conversation
The `image` argType kept its options inside `control`, but `options` is an argType property, so `OptionsControl` never saw them and the select rendered as "-". Move `options` next to `control` in all tabs, matching the other snippet on the same page.
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Important Review skippedReview was skipped as selected files did not have any reviewable changes. ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. WalkthroughThe documentation updates the image argType in 16 Button story examples. Each example now declares the select control separately from its two options. The label and image mutual-exclusion conditions remain unchanged. ChangesConditional controls
Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to The examples now show select choices alongside the control as expected. No actionable merge risk remains. Architecture SummaryArchitecture risk: 🔵 Low · up to The change affects 1 system. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
kylegach
left a comment
There was a problem hiding this comment.
Thank you for catching this, @TheSeydiCharyyev!
What I did
docs/essentials/controls.mdxembedscomponent-story-conditional-controls-mutual-exclusion.mdin the conditional controls section. In all 16 tabs theimageargType keeps its options insidecontrol:optionsis an argType property, not a control property — that is how the API reference documents it (docs/api/arg-types.mdx, "options"), andOptionsControlreadsargType.optionsonly (code/addons/docs/src/blocks/controls/options/Options.tsx). A nestedoptionsnever reaches the control, soSelectControltakes its empty branch and renders-(code/addons/docs/src/blocks/controls/options/Select.tsx). Anyone who copies this example gets a select with no options, and the page is about conditional controls, so the example is likely to be copied.I moved
optionsnext tocontrol, which is what the other snippet on the same page already does (arg-types-if.md:parent: { control: 'select', options: ['one', 'two', 'three'] }).Same defect as #36438, which is about the same shape in the core template stories.
Checklist for Contributors
Testing
The changes in this PR are covered in the following automated tests:
Documentation snippets only, so there is nothing to assert in a test.
Manual testing
The snippet itself is not executable, so the check is on the shape it teaches:
image: { control: { type: 'select', options: ['foo.jpg', 'bar.jpg'] } }imagerow renders-and the console getsSelect with no options: image.control: 'select'plus a siblingoptions) the select renders with both options.I ran the same code path at runtime for the radio variant in #36440: with the options nested in
control, three radio rows rendered as-; after movingoptionsup, the groups render.SelectControlhas the same empty branch asRadioControl.Documentation
MIGRATION.MD