diff --git a/plugins/woocommerce-admin/client/header/activity-panel/activity-card/style.scss b/plugins/woocommerce-admin/client/header/activity-panel/activity-card/style.scss index ce3a8c58b1c..126226aafbd 100644 --- a/plugins/woocommerce-admin/client/header/activity-panel/activity-card/style.scss +++ b/plugins/woocommerce-admin/client/header/activity-panel/activity-card/style.scss @@ -219,6 +219,14 @@ // Needs the double-class for specificity .woocommerce-activity-card.woocommerce-inbox-activity-card { grid-template-columns: 72px 1fr; + height: 100%; + opacity: 1; + padding: $fallback-gutter; + padding: $gutter; + + @media screen and (prefers-reduced-motion: no-preference) { + transition: opacity 0.3s, height 0s, padding 0s; + } @include breakpoint( '<782px' ) { grid-template-columns: 64px 1fr; @@ -227,6 +235,15 @@ .woocommerce-activity-card__header { margin-bottom: $gap-small; } + + &.actioned { + height: 0; + opacity: 0; + padding: 0; + @media screen and (prefers-reduced-motion: no-preference) { + transition: opacity 0.3s, height 0s 0.3s, padding 0s 0.3s; + } + } } .woocommerce-review-activity-card { diff --git a/plugins/woocommerce-admin/client/header/activity-panel/panels/inbox.js b/plugins/woocommerce-admin/client/header/activity-panel/panels/inbox.js index 311946bda9e..29483d23e93 100644 --- a/plugins/woocommerce-admin/client/header/activity-panel/panels/inbox.js +++ b/plugins/woocommerce-admin/client/header/activity-panel/panels/inbox.js @@ -18,6 +18,7 @@ import { EmptyContent, Section } from '@woocommerce/components'; import sanitizeHTML from 'lib/sanitize-html'; import { QUERY_DEFAULTS } from 'wc-api/constants'; import withSelect from 'wc-api/with-select'; +import classnames from 'classnames'; class InboxPanel extends Component { constructor( props ) { @@ -76,7 +77,9 @@ class InboxPanel extends Component { return notesArray.map( note => ( } @@ -150,6 +153,7 @@ export default compose( type: 'info,warning', orderby: 'date', order: 'desc', + status: 'unactioned', }; const notes = getNotes( inboxQuery ); diff --git a/plugins/woocommerce-admin/includes/api/class-wc-admin-rest-admin-note-action-controller.php b/plugins/woocommerce-admin/includes/api/class-wc-admin-rest-admin-note-action-controller.php index 3b4009dcafd..1c8f25dfa76 100644 --- a/plugins/woocommerce-admin/includes/api/class-wc-admin-rest-admin-note-action-controller.php +++ b/plugins/woocommerce-admin/includes/api/class-wc-admin-rest-admin-note-action-controller.php @@ -58,7 +58,7 @@ class WC_Admin_REST_Admin_Note_Action_Controller extends WC_Admin_REST_Admin_Not if ( ! $note ) { return new WP_Error( 'woocommerce_admin_notes_invalid_id', - __( 'Sorry, there is no resouce with that ID.', 'woocommerce-admin' ), + __( 'Sorry, there is no resource with that ID.', 'woocommerce-admin' ), array( 'status' => 404 ) ); } @@ -77,7 +77,7 @@ class WC_Admin_REST_Admin_Note_Action_Controller extends WC_Admin_REST_Admin_Not if ( ! $triggered_action ) { return new WP_Error( 'woocommerce_admin_note_action_invalid_id', - __( 'Sorry, there is no resouce with that ID.', 'woocommerce-admin' ), + __( 'Sorry, there is no resource with that ID.', 'woocommerce-admin' ), array( 'status' => 404 ) ); } diff --git a/plugins/woocommerce-admin/includes/api/class-wc-admin-rest-admin-notes-controller.php b/plugins/woocommerce-admin/includes/api/class-wc-admin-rest-admin-notes-controller.php index 888e769533a..46189e4aaf7 100644 --- a/plugins/woocommerce-admin/includes/api/class-wc-admin-rest-admin-notes-controller.php +++ b/plugins/woocommerce-admin/includes/api/class-wc-admin-rest-admin-notes-controller.php @@ -86,7 +86,7 @@ class WC_Admin_REST_Admin_Notes_Controller extends WC_REST_CRUD_Controller { if ( ! $note ) { return new WP_Error( 'woocommerce_admin_notes_invalid_id', - __( 'Sorry, there is no resouce with that ID.', 'woocommerce-admin' ), + __( 'Sorry, there is no resource with that ID.', 'woocommerce-admin' ), array( 'status' => 404 ) ); } @@ -199,7 +199,7 @@ class WC_Admin_REST_Admin_Notes_Controller extends WC_REST_CRUD_Controller { if ( ! $note ) { return new WP_Error( 'woocommerce_admin_notes_invalid_id', - __( 'Sorry, there is no resouce with that ID.', 'woocommerce-admin' ), + __( 'Sorry, there is no resource with that ID.', 'woocommerce-admin' ), array( 'status' => 404 ) ); }