From c97c26fe371e3d40efe197d8f398326a16cdbf46 Mon Sep 17 00:00:00 2001 From: James Koster Date: Thu, 21 Mar 2024 13:23:24 +0000 Subject: [PATCH] Pages data view: Update quick-actions (#59551) Co-authored-by: jameskoster Co-authored-by: ntsekouras Co-authored-by: jasmussen Co-authored-by: youknowriad Co-authored-by: oandregal --- packages/edit-site/src/components/actions/index.js | 8 +++----- packages/edit-site/src/components/page-pages/index.js | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/packages/edit-site/src/components/actions/index.js b/packages/edit-site/src/components/actions/index.js index 910f5c22724a37..8a2764c05de12c 100644 --- a/packages/edit-site/src/components/actions/index.js +++ b/packages/edit-site/src/components/actions/index.js @@ -1,7 +1,7 @@ /** * WordPress dependencies */ -import { external, trash, backup } from '@wordpress/icons'; +import { external, edit, backup } from '@wordpress/icons'; import { addQueryArgs } from '@wordpress/url'; import { useDispatch } from '@wordpress/data'; import { decodeEntities } from '@wordpress/html-entities'; @@ -27,8 +27,6 @@ const { useHistory } = unlock( routerPrivateApis ); export const trashPostAction = { id: 'move-to-trash', label: __( 'Move to Trash' ), - isPrimary: true, - icon: trash, isEligible( { status } ) { return status !== 'trash'; }, @@ -172,8 +170,6 @@ export function usePermanentlyDeletePostAction() { () => ( { id: 'permanently-delete', label: __( 'Permanently delete' ), - isPrimary: true, - icon: trash, supportsBulk: true, isEligible( { status } ) { return status === 'trash'; @@ -372,6 +368,8 @@ export function useEditPostAction() { () => ( { id: 'edit-post', label: __( 'Edit' ), + isPrimary: true, + icon: edit, isEligible( { status } ) { return status !== 'trash'; }, diff --git a/packages/edit-site/src/components/page-pages/index.js b/packages/edit-site/src/components/page-pages/index.js index f7b1254f5ae2bc..a01d27f07cc863 100644 --- a/packages/edit-site/src/components/page-pages/index.js +++ b/packages/edit-site/src/components/page-pages/index.js @@ -351,10 +351,10 @@ export default function PagePages() { const editPostAction = useEditPostAction(); const actions = useMemo( () => [ + editPostAction, viewPostAction, restorePostAction, permanentlyDeletePostAction, - editPostAction, postRevisionsAction, trashPostAction, ],