-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RadioGroup: Mark as deprecated #45389
Conversation
Open in CodeSandbox Web Editor | VS Code | VS Code Insiders |
Size Change: 0 B Total Size: 1.28 MB ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
Thank you for the cleanup 🧹
I'm not sure if we will migrate this instance and actually remove the component, but in any case it would be good to add a deprecation notice for now.
I think we should migrate that instance. I would also love to remove the component, which should be possible since it's experimental?
What?
Mark
RadioGroup
(andRadio
) as deprecated, so we can encourage people to use the alternatives.And some related cleanup:
Radio
(wasn't really useful anyway)radio/
andradio-context/
to subfolders ofradio-group/
(just to decrease clutter)Why?
ToggleGroupControl is visually similar and is widely used. In contrast, RadioGroup is only used in one place in the Gutenberg app, and even that is heavily modified visually. It doesn't make sense to keep this around.
I'm not sure if we will migrate this instance and actually remove the component, but in any case it would be good to add a deprecation notice for now.
Testing Instructions
npm run storybook:dev
and see the RadioGroup story. It should've moved to the Deprecated section.npm run dev
, go towp-admin/site-editor.php?postType=wp_template_part
, and click the "Add New" button. The RadioGroup in the modal should not have changed.✅ Type checks (
npx tsc --build
) still pass