Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
336c848
DataForm - Card Layout: implement summary field
gigitux Sep 10, 2025
2a68e6e
add documentation
gigitux Sep 10, 2025
ecd4d51
Merge branch 'trunk' of github.com:WordPress/gutenberg into nex-383-d…
gigitux Sep 24, 2025
d1d1569
replace summaryField specific for the Card Layout with the summary field
gigitux Sep 25, 2025
d7f822a
update documentation
gigitux Sep 25, 2025
7988f20
add summary prop to the SimpleFormField
gigitux Sep 25, 2025
caee7ea
add summary documentation
gigitux Sep 25, 2025
50f0f42
update changelog
gigitux Sep 25, 2025
8c7f710
Merge branch 'trunk' of github.com:WordPress/gutenberg into nex-383-d…
gigitux Sep 25, 2025
7c82254
clean up code
gigitux Sep 25, 2025
48b5a5b
fix unit test
gigitux Sep 25, 2025
e594c9a
update logic
gigitux Sep 30, 2025
8e2483e
Merge branch 'trunk' of github.com:WordPress/gutenberg into nex-383-d…
gigitux Sep 30, 2025
fd6b826
update documentation
gigitux Sep 30, 2025
9212350
remove export
gigitux Sep 30, 2025
621e9ad
fix unit test
gigitux Sep 30, 2025
1e973c8
fix logic
gigitux Sep 30, 2025
094d7a0
refine Card Summary Field type
gigitux Oct 1, 2025
84ffc13
improve logic
gigitux Oct 1, 2025
0524341
fix e2e test
gigitux Oct 1, 2025
f9cf0a5
use summary inside the layout property
gigitux Oct 1, 2025
0454fa0
update story
gigitux Oct 2, 2025
98c6be0
improve visibility logic
gigitux Oct 2, 2025
bb2e019
normalize summary layout
gigitux Oct 2, 2025
a00dbcc
fix unit test
gigitux Oct 2, 2025
ff1fef6
fix logic regarding summary field in the panel layout
gigitux Oct 3, 2025
0ed5ad9
update default value
gigitux Oct 3, 2025
755047d
update story
gigitux Oct 3, 2025
00033ed
refactor normalization of card summary field for improved clarity and…
gigitux Oct 3, 2025
bd85ec7
improve changelog
gigitux Oct 3, 2025
dce85e6
fix unit test
gigitux Oct 3, 2025
5b3694f
add breaking changes section
gigitux Oct 3, 2025
e19e7b0
Merge branch 'trunk' of github.com:WordPress/gutenberg into nex-383-d…
gigitux Oct 3, 2025
3e418c7
Update README
oandregal Oct 3, 2025
a3d9c7e
Remove layout info so highlight summary coming from field ID
oandregal Oct 3, 2025
df89d60
Better summaries
oandregal Oct 3, 2025
9df0b31
Update changelog
oandregal Oct 3, 2025
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
Prev Previous commit
Next Next commit
update documentation
  • Loading branch information
gigitux committed Sep 25, 2025
commit d7f822a93381a6f067bfe973eafb84c8701dc339
40 changes: 17 additions & 23 deletions packages/dataviews/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ Example:
const form = {
layout: {
type: 'panel',
labelPosition: 'side'
labelPosition: 'side',
},
fields: [
'title',
Expand Down Expand Up @@ -1234,9 +1234,9 @@ Example:

Object that contains the validation rules for the field. If a rule is not met, the control will be marked as invalid and a message will be displayed.

- `required`: boolean indicating whether the field is required or not.
- `elements`: boolean restricting selection to the provided list of elements only. Used with the `array` field type.
- `custom`: a function that validates a field's value. If the value is invalid, the function should return a string explaining why the value is invalid. Otherwise, the function must return null.
- `required`: boolean indicating whether the field is required or not.
- `elements`: boolean restricting selection to the provided list of elements only. Used with the `array` field type.
- `custom`: a function that validates a field's value. If the value is invalid, the function should return a string explaining why the value is invalid. Otherwise, the function must return null.

Example:

Expand Down Expand Up @@ -1279,9 +1279,9 @@ Fields that define their own Edit component have access to the validation rules

```js
{
Edit: ( { field }) => {
return <input required={ !! field.isValid.required } />
}
Edit: ( { field } ) => {
return <input required={ !! field.isValid.required } />;
};
}
```

Expand Down Expand Up @@ -1408,8 +1408,8 @@ Operators:
| `contains` | Text | `CONTAINS`. The item's field contains the given substring. | Title contains: Mars |
| `notContains` | Text | `NOT CONTAINS`. The item's field does not contain the given substring. | Description doesn't contain: photo |
| `startsWith` | Text | `STARTS WITH`. The item's field starts with the given substring. | Title starts with: Mar |
| `on` | Date | `ON`. The item's field is on a given date (date equality using proper date parsing). | Date is on: 2024-01-01 |
| `notOn` | Date | `NOT ON`. The item's field is not on a given date (date inequality using proper date parsing). | Date is not on: 2024-01-01 |
| `on` | Date | `ON`. The item's field is on a given date (date equality using proper date parsing). | Date is on: 2024-01-01 |
| `notOn` | Date | `NOT ON`. The item's field is not on a given date (date inequality using proper date parsing). | Date is not on: 2024-01-01 |
| `before` | Date | `BEFORE`. The item's field is before a given date. | Date is before 2024-01-01 |
| `after` | Date | `AFTER`. The item's field is after a given date. | Date is after 2024-01-01 |
| `beforeInc` | Date | `BEFORE (Inc)`. The item's field is before a given date, including the date. | Date is before 2024-01-01, including 2024-01-01 |
Expand Down Expand Up @@ -1479,8 +1479,8 @@ Represents the type of layout used to render the field. It'll be one of Regular,

#### Regular

- `type`: `regular`. Required.
- `labelPosition`: one of `side`, `top`, or `none`. Optional. `top` by default.
- `type`: `regular`. Required.
- `labelPosition`: one of `side`, `top`, or `none`. Optional. `top` by default.

For example:

Expand All @@ -1496,8 +1496,8 @@ For example:

#### Panel

- `type`: `panel`. Required.
- `labelPosition`: one of `side`, `top`, or `none`. Optional. `top` by default.
- `type`: `panel`. Required.
- `labelPosition`: one of `side`, `top`, or `none`. Optional. `top` by default.

For example:

Expand All @@ -1516,7 +1516,7 @@ For example:
- `type`: `card`. Required.
- `isOpened`: boolean. Optional. `true` by default.
- `withHeader`: boolean. Optional. `true` by default.
- `summaryField`: SimpleFormField | string. Optional. A field to display in the card header as a summary.
- `summaryVisibility`: one of `'always'` or `'on-close'`. Optional. `'always'` by default. Controls when to show summary fields in the card header.

For example:

Expand All @@ -1527,21 +1527,15 @@ For example:
type: 'card',
isOpened: false,
withHeader: true,
summaryField: {
id: 'summary',
layout: {
type: 'regular',
labelPosition: 'none'
}
}
summaryVisibility: 'on-close',
},
}
```

#### Row

- `type`: `row`. Required.
- `alignment`: one of `start`, `center`, or `end`. Optional. `center` by default.
- `type`: `row`. Required.
- `alignment`: one of `start`, `center`, or `end`. Optional. `center` by default.

The Row layout displays fields horizontally in a single row. It's particularly useful for grouping related fields that should be displayed side by side. This layout can be used both as a top-level form layout and for individual field groups.

Expand Down