Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/dataviews/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

- DataViews grid layout: make sure media previews have rounded corners. [#71543](https://github.com/WordPress/gutenberg/pull/71543)
- DataForm regular layout: Remove label style overrides as they cause inconsistent results. ([#71574](https://github.com/WordPress/gutenberg/pull/71574))
- DataForm regular layout: Use BaseControl visual label for readonly fields when in top labelPosition. ([#71597](https://github.com/WordPress/gutenberg/pull/71597))

## 8.0.0 (2025-09-03)

Expand Down
15 changes: 8 additions & 7 deletions packages/dataviews/src/dataforms-layouts/regular/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
__experimentalVStack as VStack,
__experimentalHeading as Heading,
__experimentalSpacer as Spacer,
BaseControl,
} from '@wordpress/components';

/**
Expand Down Expand Up @@ -120,17 +121,17 @@ export default function FormRegularField< Item >( {
<div className="dataforms-layouts-regular__field">
{ fieldDefinition.readOnly === true ? (
<>
{ ! hideLabelFromVision && labelPosition !== 'none' && (
<div className="dataforms-layouts-regular__field-label">
{ fieldDefinition.label }
</div>
) }
<div className="dataforms-layouts-regular__field-control">
<>
{ ! hideLabelFromVision && labelPosition !== 'none' && (
<BaseControl.VisualLabel>
{ fieldDefinition.label }
</BaseControl.VisualLabel>
) }
<fieldDefinition.render
item={ data }
field={ fieldDefinition }
/>
</div>
</>
</>
) : (
<fieldDefinition.Edit
Expand Down
Loading