Repository navigation
DataViews & DataForm iteration for WordPress 6.9 #70936
Copy link
Copy link
Closed
Labels
[Feature] DataViewsWork surrounding upgrading and evolving views in the site editor and beyondWork surrounding upgrading and evolving views in the site editor and beyond[Type] IterationScoped iteration of an effort from a tracking issue or overview issue ideally for a major release.Scoped iteration of an effort from a tracking issue or overview issue ideally for a major release.has dev notewhen dev note is done (for upcoming WordPress release)when dev note is done (for upcoming WordPress release)
Description
Next iteration: WordPress 7.0.
The work completed for WordPress 6.9 has been summarized below as comments: Field API, DataViewsPicker, DataForm, DataViews.
This is an iteration issue that tracks improvements to the DataViews and DataForm components planned for WordPress 6.9. See related overview issues for DataViews #55083 and DataForm #59745 and the tracking issues linked below.
DataViews
Layouts:
- Updates to table:
- add align prop #70567
- pin the actions' column when width is insufficient #70567
- DataView: support different alignment for text and numbers #66623
- DataViews: Group by field #57967
- DataViews: add support for infinite scroll in table, grid, and list layouts #70955
Filters:
- Enable user-input filters for all field types #70567
- DataViews: introduce locked filters #71075
- More filter operators #70567
| Type | New operators |
|---|---|
array |
isAny, isNone, isAll, isNotAll |
boolean |
is, isNot |
date |
on, notOn, before, after, beforeInc, afterInc, inThePast, over, between |
datetime |
on, notOn, before, after, beforeInc, afterInc, inThePast, over |
email |
is, isNot, contains, notContains, startsWith, isAny, isNone, isAll, isNotAll |
integer |
is, isNot, lessThan, greaterThan, lessThanOrEqual, greaterThanOrEqual, between |
text |
is, isNot, contains, notContains, startsWith, isAny, isNone, isAll, isNotAll |
Misc:
- DataViews: Split the components into composable components. #63646
- Make DataViews work better with the Card component #70638
- DataViews: Introduce
perPageSizesto control the available sizes of the items per page #70604 -
filterSortAndPaginate: DataViews: Allow searching over array fieldtypes #70785
Field API
Field types:
- array #70567
- boolean #70567
- email #70567
- media #70567
- date #70836
- datetime: update to new calendar #71509
- telephone #71498
- password #71545/
- url #71518/
- color #71522
Validation:
-
isValid.requiredandisValid.customsupport in all controls. See status at #71500 -
isValid.elements#71194 - Support async validation. #71161 and #71412
Misc:
- Introduce
setValueto support nested data. See issue with DataViews' user-input filters and issue with modals in DataForm's panel layout. #71604 - DataViews Field API: async elements #70834
- Allow consumers to configure the bundled Edit control #71560
DataForm
Layouts:
- Panel: open as a modal #71212
- Panel: when combining fields, allow controlling the rendered field (now it uses the 1st field) @jorgefilipecosta #71614/
- Card #71100
- Row #71124
Controls:
- checkbox #70567
- boolean #70567
- email #70567
- toggleGroup #70567
- array #71136
- telephone #71498
- password #71545/
- url #71518/
- textarea #71495
- color #71522
DataPicker
- New component based on DataViews optimized for a picking flow. DataViews: Add data picker functionality #70971
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
[Feature] DataViewsWork surrounding upgrading and evolving views in the site editor and beyondWork surrounding upgrading and evolving views in the site editor and beyond[Type] IterationScoped iteration of an effort from a tracking issue or overview issue ideally for a major release.Scoped iteration of an effort from a tracking issue or overview issue ideally for a major release.has dev notewhen dev note is done (for upcoming WordPress release)when dev note is done (for upcoming WordPress release)
Type
Projects
- StatusShow more project fields✅ Done
Activity
oandregal commentedon Oct 23, 2025
Field API
What follows are the major changes to the Field API that have been developed during the WordPress 6.9 cycle.
For more information, consult the two reference documents:
typeDeveloper docs
The field
typehas been expanded to describe the default field's behaviors for sorting, validation, filtering, editing, and rendering. The field author can still override those defaults, but they don't need to, they can have a working field by just providing the type.We've also expanded the initial 3 types into 13:
Legend:
isValidDeveloper docs
Validation has been completely overhauled to leverage a rule-base system. All field types support the
requiredandelementsrule, as well as defining custom validation via thecustomfunction — that supports both sync and async modes. We plan to expand the available rules in future versions, follow-up #71500 for updates.setValueDeveloper docs
The introduction of
setValue, alongside the existinggetValue, has added a few capabilities to the framework. See the related story: live, code.Working with nested data
By using the dot notation in the
field.id(e.g.,user.profile.name), thegetValueandsetValuemethods will automatically read and write the data from the corresponding object property — though field authors can still overridegetValueandsetValuemethods.Derived data
setValuecan be leveraged to decide which parts of the data should be updated, including modifying multiples parts of it.Bridge data and UI.
In certain situations, the data and the UI control representing the data need to be adapted. Field authors can use
getValueandsetValuefor this.EditDeveloper docs
Field authors can define how a field behaves when it's edited. They can provide a custom edit control, but also select one of bundled ones — which have been expanded from 5 to 16:
datetimeintegerradioselecttextarraycheckboxcolordateemailpasswordtelephonetextareatoggletoggleGroupurlAdditionally, some bundled edit controls now support a configuration option to control its behavior or look-and-feel.
filterByDeveloper docs
Filters have gained more operators (from 6 to 22) and they are now bound to the field type.
The initial 6 operators available (
is,isNot,isAny,isNone,isAll,isNotAll) have been expanded into 22 total:lessThan,greaterThan,lessThanOrEqual,greaterThanOrEqual,betweenbefore,after,beforeInc,afterInc,on,notOn,inThePast,over,betweencontains,notContains,startsWithThe addition of new field types and edit controls has also expanded the filters available, that are now dependant on the field type, and they include support for user input as well:
getElementsDeveloper docs
We've introduced a
getElementsasync function that fetches elements on demand, only when they are needed. This is a new API that will continue to evolve, follow-up changes at #70834This API can be seen in use in the Pages screen of the Site Editor. The author filter and edit control won't fetch the authors until the user interacts with those controls.
readOnlyWe've added a
readOnlyproperty (boolean) to mark fields that cannot be edited. In edit contexts, they'll be displayed using therenderproperty. For example, this can be useful when displaying non-editable metadata (file size, etc.).andrewserong commentedon Oct 23, 2025
@oandregal I see you're doing updates for 6.9. Here's a quick draft of things we might include for DataViewsPicker, if it helps? FYI: @talldan and @tellthemachines — feel free to edit if I got any of this wrong!
DataViewsPicker Overview
DataViewsPicker is a selection-focused variant of DataViews designed for building item picker interfaces. It extends the familiar DataViews API with selection management and action buttons, making it ideal for workflows where users need to browse and pick items from a dataset. While this component isn't used directly in Gutenberg as yet, possible use cases could include a media picker for selecting images (#71944), or a generalised post picker for selecting posts or page parents (#71128). It currently only supports a grid layout view.
Key Features
Basic Usage
Sub-Components
For custom UI layouts, DataViewsPicker exposes sub-components like Search, Filters, Layout, Pagination, and BulkActionToolbar that can be composed together.
oandregal commentedon Oct 24, 2025
DataViews
What follows are the major changes to the DataViews component that have been developed during the WordPress 6.9 cycle. See related Field API changes.
For more information, consult the two reference documents:
viewDeveloper docs
Group by
All the bundled layouts –table, grid, and list– support now grouping the items by a given field by declaring a
groupByFieldin the view. Follow issue for updates, and take a look at the storybook.Locked filters
Locked filters are filters that cannot be edited or removed by the user. They appear in the filters UI but are marked as read-only, ensuring certain filtering conditions are always applied.
Table layout: align and lock movers
There are two new options that apply to the
tablelayout:alignis a new property to control the horizontal alignment of content within the cells. It's specificied per field in the layout.enableMoving: boolean to control whether the fields can be moved around. True by default. If false, it removes the moving controls in the table header and disables moving the fields via the view config as well.actionsDeveloper docs
The modal actions have now more options to control its behavior:
modalHeader:string|( ( items: Item[] ) => string );. Can now take a function to dynamically set the header based on the selected items.modalSize:small|medium|large|fill. Controls the size of the modal.modalFocusOnMount:true|false|firstElement|firstContentElement. Controls the focus behavior when the modal opens.paginationInfo (infinite scroll)
Developer docs
All bundled layouts -table, list, and grid- now support infinite scroll. It's enabled per view type, and DataViews takes a
infiniteScrollHandlerfunction that listens to scroll events and handles the data retrieval. See storybook live and implementation for details.2510-dataviews-wp-6.8-vs-6.9-dataviews-infinite-scroll.mov
renderItemLinkDeveloper docs
The
renderItemLinkprop lets you provide a custom component that wraps clickable fields. It can render regular links, but also allows integration with routing libraries (like TanStack Router or React Router).The component receives the following props:
item: The data item that was clickedconfigDeveloper docs
Prop to configure the list of
perPageSizesavailable in the view config. Defaults to[10, 20, 50, 100]).emptyDeveloper docs
An element to display when the
dataprop is empty. Defaults to<p>No results</p>.childrenDeveloper docs, Storybook
We've exported many of the subcomponents DataViews is made up of, for them to be reused to build UIs.
When DataViews receives no children, it renders its complete built-in UI (search bar, filter controls, view config, layout, etc.):
When children are provided, you can build custom layouts while leveraging DataViews' internal state management and data handling logic:
DataViews exposes 9 subcomponents for free composition:
oandregal commentedon Oct 24, 2025
DataForm
What follows are the major changes to the DataForm component that have been developed during the WordPress 6.9 cycle. See related Field API changes.
For more information, consult the two reference documents:
formDeveloper docs
The
formAPI has been updated to accommodate the changes to existing layouts and the introduction of two new ones:cardandrow.panelDeveloper docs, Storybook
There are two new properties,
openAsandsummary, to configure the behavior of the layout.openAs: determines how the panel opens, either as adropdown(default) or amodal.summary: controls what fields summarize the panel, while before the first children was used.cardDeveloper docs, Storybook
The new
cardlayout is a container layout: it wraps other layouts (regular,panel, etc.) within a card component.withHeader: controls whether the card has a headerisOpened: controls how the card loads (opened or closed)summary: a mechanism to render fields in the header, and control when they are displayed, either when the card is collapsed (the default) or alwaysrowDeveloper docs, Storybook.
The new
rowlayout is a container layout: it enables positioning other layouts horizontally.alignment: control vertical alignment of fields within the rowstyles: provides flex styles, for the width to be adjusted per fieldvalidityValidation has been revamped in 6.9: it's now controlled (DataForm has a
validityprop), and supports asynchronous validation. All the DataForm controls gained support for all validation rules (required, elements, and custom). See related Field API updates and the Field API validation issue.There's a new
useFormValidityhook to compute thevalidityprop, and theisItemValidutility has been removed.2510-dataviews-wp-6.8-vs-6.9-dataform-validation.mov
oandregal commentedon Oct 24, 2025
This issue is now complete, so I'm closing it. We may continue to share updates for WordPress 6.9 Field Guide (added them to issue description). I'll share here the follow-up iteration for 7.0 when it's ready.
oandregal commentedon Oct 24, 2025
FWIW, in the WordPress 6.9 cycle, there's been 154 commits done by ~37 different authors to the
@wordpress/dataviewspackage. 🥳Commit count:
git log --oneline wp/6.8..wp/6.9 -- packages/dataviews |wc -lUnique authors count. It counts unique emails, there may be duplicates if some person used different emails:
oandregal commentedon Nov 7, 2025
I've bootstrapped the next iteration issue for WordPress 7.0 at #73076 It's a live issue: plans and ongoing work will be consolidated as we progress. Subscribe there for updates. Added previous/next links in the issue description, for discoverability.
oandregal commentedon Nov 11, 2025
For reference, I've published the devnote at https://make.wordpress.org/core/2025/11/11/dataviews-dataform-et-al-in-wordpress-6-9/