Repository navigation
Block Editor: Forward UnitControl props in TextIndentControl with the slider - #86832
manzoorwanijk merged 2 commits into
Conversation
🤖 PR meta 🤖🎉 PropsIf you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
Updated as activity occurs, without notifying anyone named here. Add the |
|
No actionable comments were generated in the recent review. Summary
Merge Risk:
|
What?
Follow-up to #84848 (comment). Tracks #67691.
TextIndentControlnow forwards its extraUnitControlprops whenwithSlideris set, as it already does without the slider.Why?
Without the slider, the extra props (
otherProps) are spread onto theUnitControl. WithwithSlider, a differentUnitControlis rendered and they're dropped, even though the type accepts them.How?
Spread
otherPropsonto the slider'sUnitControl, before the component's own props, matching the non-slider branch. Adds a test that a forwarded prop (disabled) reaches the input in both modes. The slider case fails without the fix.Testing Instructions
npm run test:unit -- packages/block-editor/src/components/text-indent-controlUse of AI Tools
Used Claude Code with Opus 5.5 to draft the code and PR, and verified the fix with the unit test and in the browser.
@coderabbitai review as per the rules given in #67691