DataViews: vendor ValidatedCheckboxControl - #81435
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If 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. |
7be115c to
c1627c7
Compare
There was a problem hiding this comment.
Pull request overview
Moves ValidatedCheckboxControl into DataViews, eliminating its private Components API dependency.
Changes:
- Vendors the validated checkbox wrapper and tests in DataViews.
- Updates DataForm to use the internal component.
- Removes the former Components implementation, story, and private export.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
packages/dataviews/src/components/validated-form-controls/test/checkbox-control.tsx |
Relocates checkbox validation tests. |
packages/dataviews/src/components/validated-form-controls/index.ts |
Exports the internal wrapper. |
packages/dataviews/src/components/validated-form-controls/checkbox-control.tsx |
Vendors the checkbox validation wrapper. |
packages/dataviews/src/components/dataform-controls/checkbox.tsx |
Uses the internal wrapper directly. |
packages/dataviews/CHANGELOG.md |
Records the internalization. |
packages/components/src/validated-form-controls/components/stories/checkbox-control.story.tsx |
Removes the obsolete story. |
packages/components/src/validated-form-controls/components/index.ts |
Removes the former component export. |
packages/components/src/private-apis.ts |
Removes the private API entry. |
packages/components/CHANGELOG.md |
Records the private API removal. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
c1627c7 to
e468037
Compare
|
Size Change: +229 B (0%) Total Size: 7.71 MB 📦 View Changed
|
| @@ -1,49 +0,0 @@ | |||
| import { useState } from '@wordpress/element'; | |||
There was a problem hiding this comment.
Should we keep the story somewhere, or do we think there is already enought coverage in Dataforms stories and this story is not worth it?
e468037 to
cd3bc66
Compare
|
Flaky tests detected in cd3bc66. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/31510386197 can remove menu items in
|
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
cd3bc66 to
a17169c
Compare
Co-authored-by: oandregal <oandregal@git.wordpress.org> Co-authored-by: jorgefilipecosta <jorgefilipecosta@git.wordpress.org> Co-authored-by: ntsekouras <ntsekouras@git.wordpress.org>
Part of #81230
Follow-up to #81391
What?
Moves
ValidatedCheckboxControlout of the@wordpress/componentsprivate APIs and into@wordpress/dataviews, its only consumer.Why?
See #81230.
How?
The
ValidatedCheckboxControlwrapper now lives in thevalidated-form-controlsfolder of the DataViews package, where it reuses the already-vendoredControlWithErrorfoundation and builds on the publicCheckboxControlexport instead of private APIs. The component, its story, its test, and its private API export are removed from the components package. Its unit test moves along with it.Testing Instructions
npm run test:unit -- packages/dataviews/src/components/validated-form-controls/test/checkbox-control.tsxnpm run storybook:devand verify that validation on a DataForm checkbox field (e.g. a required checkbox) still shows the error message as before.Use of AI Tools
This PR was authored with Claude Code (Claude Fable 5) and reviewed by the author.