-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DataViews Quick Edit: Add the PostActions dropdown menu #64393
Conversation
Size Change: -23 B (0%) Total Size: 1.77 MB
ℹ️ View Unchanged
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Flaky tests detected in ee5d7fb. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/10317275136
|
Yes, per post type and selected item. What do you mean by "context"? |
Context as the place where actions are displaed: quick edit, document inspector, dataviews, etc. As I mentioned, I find the rename action weird in the context of the quick edit form and the DocumentInspector, where you can edit the title directly. |
I had added this in our API for revisions action |
We have "context" support. I'm still not entirely convinced by it personally though. If an action is specific to a given context maybe it should just be defined for that specific |
I see. Perhaps we just need to make actions a prop of DataForm, like they are in DataViews. |
We could remove the const postActions = usePostActions();
const actions = postActions.filter( /* all but rename */ );
<DataForm
actions={actions}
/> but even that would be fragile. I understand there's a hook for 3rd parties to add/remove new actions to the post type? If so, hiding/removing becomes more complex. |
Allowing-third parties to remove/add contextual actions is a good point about keeping the context property. |
Co-authored-by: youknowriad <[email protected]> Co-authored-by: oandregal <[email protected]> Co-authored-by: ntsekouras <[email protected]>
Related #55101
Follow-up to #64365
What?
This PR adds the "Actions" dropdown menu to the quick edit panel.
Similar to the "Post Card", this only works for single selections for now.
Testing Instructions
1- Enable the quick edit experiment and open the pages "table" data view.
2- Select a page and notice that you can use the actions dropdown menu from the quick edit panel.