Only show unactioned notes in the Inbox panel.
And hide notes once an action has been taken.
This commit is contained in:
parent
5a49991cb1
commit
82edc1c8c8
|
@ -219,6 +219,11 @@
|
||||||
// Needs the double-class for specificity
|
// Needs the double-class for specificity
|
||||||
.woocommerce-activity-card.woocommerce-inbox-activity-card {
|
.woocommerce-activity-card.woocommerce-inbox-activity-card {
|
||||||
grid-template-columns: 72px 1fr;
|
grid-template-columns: 72px 1fr;
|
||||||
|
height: 100%;
|
||||||
|
opacity: 1;
|
||||||
|
padding: $fallback-gutter;
|
||||||
|
padding: $gutter;
|
||||||
|
transition: opacity 1s, height 0s, padding 0s;
|
||||||
|
|
||||||
@include breakpoint( '<782px' ) {
|
@include breakpoint( '<782px' ) {
|
||||||
grid-template-columns: 64px 1fr;
|
grid-template-columns: 64px 1fr;
|
||||||
|
@ -227,6 +232,13 @@
|
||||||
.woocommerce-activity-card__header {
|
.woocommerce-activity-card__header {
|
||||||
margin-bottom: $gap-small;
|
margin-bottom: $gap-small;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.actioned {
|
||||||
|
height: 0;
|
||||||
|
opacity: 0;
|
||||||
|
padding: 0;
|
||||||
|
transition: opacity 1s, height 0s 1s, padding 0s 1s;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.woocommerce-review-activity-card {
|
.woocommerce-review-activity-card {
|
||||||
|
|
|
@ -18,6 +18,7 @@ import { EmptyContent, Section } from '@woocommerce/components';
|
||||||
import sanitizeHTML from 'lib/sanitize-html';
|
import sanitizeHTML from 'lib/sanitize-html';
|
||||||
import { QUERY_DEFAULTS } from 'wc-api/constants';
|
import { QUERY_DEFAULTS } from 'wc-api/constants';
|
||||||
import withSelect from 'wc-api/with-select';
|
import withSelect from 'wc-api/with-select';
|
||||||
|
import classnames from 'classnames';
|
||||||
|
|
||||||
class InboxPanel extends Component {
|
class InboxPanel extends Component {
|
||||||
constructor( props ) {
|
constructor( props ) {
|
||||||
|
@ -76,7 +77,9 @@ class InboxPanel extends Component {
|
||||||
return notesArray.map( note => (
|
return notesArray.map( note => (
|
||||||
<ActivityCard
|
<ActivityCard
|
||||||
key={ note.id }
|
key={ note.id }
|
||||||
className="woocommerce-inbox-activity-card"
|
className={ classnames( 'woocommerce-inbox-activity-card', {
|
||||||
|
actioned: 'unactioned' !== note.status,
|
||||||
|
} ) }
|
||||||
title={ note.title }
|
title={ note.title }
|
||||||
date={ note.date_created_gmt }
|
date={ note.date_created_gmt }
|
||||||
icon={ <Gridicon icon={ note.icon } size={ 48 } /> }
|
icon={ <Gridicon icon={ note.icon } size={ 48 } /> }
|
||||||
|
@ -150,6 +153,7 @@ export default compose(
|
||||||
type: 'info,warning',
|
type: 'info,warning',
|
||||||
orderby: 'date',
|
orderby: 'date',
|
||||||
order: 'desc',
|
order: 'desc',
|
||||||
|
status: 'unactioned',
|
||||||
};
|
};
|
||||||
|
|
||||||
const notes = getNotes( inboxQuery );
|
const notes = getNotes( inboxQuery );
|
||||||
|
|
Loading…
Reference in New Issue