-
Notifications
You must be signed in to change notification settings - Fork 4.7k
UI: Add Fieldset primitives
#74296
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
base: trunk
Are you sure you want to change the base?
UI: Add Fieldset primitives
#74296
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. |
|
Size Change: 0 B Total Size: 2.59 MB ℹ️ View Unchanged
|
|
Regarding the included example, I wonder if the discussion at #63734 would be relevant to how we'd want to organize the subcomponents (i.e. description first)? The nice thing about the modularity is that consumers would have the choice to rearrange the content, but the documented example would be the recommended starting point. |
aduth
left a comment
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 👍
| display: flex; | ||
| flex-direction: column; | ||
| gap: var(--wpds-dimension-gap-2xs); |
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.
Should it use Stack ? I guess this is a similar discussion to #73931 (comment) as far as how much we lean on CSS and tolerance for HTML element nesting vs. flattening 🙃
| @@ -0,0 +1,67 @@ | |||
| import type { Meta, StoryObj } from '@storybook/react'; | |||
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.
With changes in #74317, does this need to be... ?
| import type { Meta, StoryObj } from '@storybook/react'; | |
| import type { Meta, StoryObj } from '@storybook/react-webpack5'; |
Part of #74178
What?
Add
Fieldsetprimitive components to@wordpress/ui.Why?
These adopt the same label/description styles used in
BaseControlin@wordpress/components(andFieldin@wordpress/ui), but providefieldsetsemantics instead. They are modular from the outset, and based on Base UI.How?
A context-based
Descriptionsubcomponent is added by us to the Base UI components. This will be necessary in things like ourRadioControlreplacement, which has a description for the entire group.Testing Instructions
See stories in Storybook.
Screenshots or screencast