Part of
Backported at WordPress/wordpress-develop#11272
What
We want to introduce the ability to configure the view/form config received by DataViews/DataForm for any given entity. For example, 3rd parties should be able to change what fields are visible in DataViews, or the default layouts.
How
- Retrieve the view/form config for a given entity from a new REST endpoint.
- API for registration & filtering
- Custom layouts
- Explore custom layouts (needs to bundle TSX/CSS). It's related to supporting custom layouts in DataViews/DataForm and the mechanism to load bundles for fields as well.
- Data
- View list: icons and counts are not part of the endpoint
- Sidebars for all pages have icons as part of the view list (e.g., icon for "Published pages" is different than icon for "Draft pages"). Check if we need icons for the view list provided by any entity when this project progresses a bit more. Related.
- The Patterns&Parts screen displays the number of items per category — it's the only one. Related.
- There's an ongoing experiment that redesigns the site editor which doesn't use icons or counts for the view lists, so we've decided against adding them to the endpoint for now. We can revisit later, when we have more information.
- default_layouts: can each of the view list have different default layouts? Right now, it's for all the entity.
Part of
Backported at WordPress/wordpress-develop#11272
What
We want to introduce the ability to configure the view/form config received by DataViews/DataForm for any given entity. For example, 3rd parties should be able to change what fields are visible in DataViews, or the default layouts.
How