Open youknowriad opened 7 months ago
Thanks for opening this issue :)
I want to reference back to this comment / thread in the original "Expanding the Table
component" issue from a year ago:
https://github.com/WordPress/gutenberg/issues/53233#issuecomment-1665263796
Related ticket about (duplicate post) actions extensibility https://github.com/WordPress/gutenberg/issues/61083 considering user capabilities, ability to filter by plugins, etc.
I've started thinking about this a little bit (focusing on actions first). So we want to be able to define actions per post type and the first question I had to answer is where should the API live? In which package?
core-data
could be a good package.editor
package so it could also be a good starting point for that.I'm thinking of starting exploring the "editor" package first and we can adapt over time. WDYT.
I updated the issue with some tasks that can be grabbed. Let's keep it up to date as we iterate and clarify what needs to be done.
Hello folks, Small update here.
I'm going to pause or slow down the work on the issue to focus on other priorities I have at the moment. But if folks are interested to continue push this forward, the todo list should help and I'm happy to provide support. cc @Mamaduka @jsnajdr @fabiankaegy
Not sure if this is the right place to mention it, but I found this old issue, which seems relevant for data views for post types - Post actions: "force delete" isn't supported
Testing today and the post editor shows ‘Move to trash’ as an action, but the post isn’t deleted when clicking it.
Over the past week, I've been moving some things around (field definitions to the fields package, usePostFields
hook to the editor package) in preparation for this PR https://github.com/WordPress/gutenberg/pull/67175 It allows register/unregister fields for the page
post type, in the same way we do with actions.
Updated the issue description with all this info. The conditions for this to work are the same as actions: it only works with the Gutenberg plugin active and it's private.
Before being able to stabilize the APIs, we need to implement apiVersion for all these configs. I created this issue to track this work #67274
Part of https://github.com/WordPress/gutenberg/issues/55083
What problem does this address?
As we grow the usage of the DataViews package in the different editors. The need for extensibility for the different configuration objects grows. The dataviews package is built in a way that allows extensibility to be implemented in multiple places and open a new wave of possibility for plugins and third-party developers:
We should be able to:
What others would you like to see being extensible in the dataviews? Let's gather some thoughts.
Note
A lot of the above features are still very much in flux and the structure of these objects will probably change (breaking changes) while we iterate there. In the meantime, it is important to get third-party feedback to shape these objects and extensibility APIs properly. And given the scale of these APIs, we should start implementing these APIs as Gutenberg plugin-only APIs, gather real usage feedback on the plugin before committing to shipping these APIs into Core. (Use the
IS_GUTENBERG_PLUGIN
as a start).Todo
Common
Actions
packages/editor/src/dataviews/actions
(there are three examples there already). This will allow third-party developers to unregister these actions if needed.editor/src/dataviews
to a dedicated package: core-entities-fields or core-entities or something like that.core-data
can also be considered a good place for that.Fields
post-edit
andpost-list
from the registry.formats
field and display different fields forpost
andpage
post types. See https://github.com/WordPress/gutenberg/pull/67175#discussion_r1852089343page-patterns
come from the registry.page-patterns
come from the registry.