-
Notifications
You must be signed in to change notification settings - Fork 4.6k
DataForms regular layout: Use BaseControl visual label for readonly fields when in top labelPosition #71597
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
Conversation
…ields when in top labelPosition
|
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. |
|
Flaky tests detected in ae9d80d. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/17634659783
|
|
As for the side label's style (both in regular and panel layouts), I'll leave @jameskoster comment: continue as it is (no style applied, render the |
…ields when in top labelPosition (WordPress#71597) Co-authored-by: andrewserong <andrewserong@git.wordpress.org> Co-authored-by: oandregal <oandregal@git.wordpress.org>
Thanks for confirming! 🙇 |
What?
Follows #71574
This PR proposes to remove the wrapping
divs on the DataForm regular layout for readonly fields, and use aBaseControl.VisualLabelfor wrapping just the label field.Why?
All other DataForms controls in the top position regular layout now defer to the Edit component to handle the display of the label. In most cases this will be (or will be consistent with) the base control visual label.
In short: this PR provides better default visual consistency between fields. It's a little clearer when we look at the storybook examples / screenshots below.
How?
divs that used classnames that were more applicable to thesidelabelPositionTesting Instructions
npm run storybook:dev) and navigate to the regular layout story: http://localhost:50240/?path=/story/dataviews-dataform--layout-regular&args=labelPosition:topBefore (look at the file size and dimensions fields)
After (look at the file size and dimensions fields)
Side label position (should be unaffected by this PR)