[Data views]: Add quick actions#55488
Conversation
|
Size Change: +377 B (0%) Total Size: 1.69 MB
ℹ️ View Unchanged
|
|
Flaky tests detected in 88de12e. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/6638255768
|
| label: __( 'Move to Trash' ), | ||
| type: ACTION_TYPES.primary, | ||
| icon: trash, | ||
| isEligible( { status } ) { |
There was a problem hiding this comment.
This made me think of this interaction in wp-admin:
Gravacao.do.ecra.2023-10-19.as.17.17.05.mov
Perhaps we should add deletePermanently action and make it available for every page (just as secondary)?
deletePermanently would probably require a different interaction (modal to confirm). It could be valuable to showcase what actions can do.
There was a problem hiding this comment.
Exactly! I didn't add any of those for now, because we can start adding actions incrementally, after we land the main PR. What you mentioned though and the restore should be a quick follow up.
oandregal
left a comment
There was a problem hiding this comment.
I presume you are waiting for design feedback to land this, I'll let others do that. From a code point of view, this could be merged – though I left some comments.
If you'd rather land parts of this PR before the design conversation settles, one thing we could do is merge everything but the type feature (more actions available, isEligible, renaming things).
Good question, and I'd welcome feedback on it. That said we may not need to prioritise it here since all pages should have the 'Edit' and 'Rename' actions. Some minor notes:
|
0deb7f1 to
88de12e
Compare
|
@jameskoster I addressed the feedback, but didn't handle this one:
Let's do this in a follow up, to get the actions API in. This way we can iterate and in parallel others could add more actions.
The page opens in the same page for consistency with the current pages list. If you have an icon to suggest, we can update easily. |
What?
Resolves: #55096
This PR adds quick actions in data views items. The idea is that an item can have primary and secondary actions. The API was updated with a new
isEligibleproperty, which handles the rendering or not of an action per item. This is needed because not all of the items can have the same actions.Design notes
This PR will need some design tweaks - at least:
gridviewTesting Instructions
Screenshots or screencast