diff --git a/plugins/woocommerce-admin/client/header/activity-panel/README.md b/plugins/woocommerce-admin/client/header/activity-panel/README.md
index 51516a7faea..20506819ab3 100644
--- a/plugins/woocommerce-admin/client/header/activity-panel/README.md
+++ b/plugins/woocommerce-admin/client/header/activity-panel/README.md
@@ -1,8 +1,7 @@
-Activity Panel
-======
+# Activity Panel
This component contains the Activity Panel. This is shown on every page and is rendered as part of the header.
-It provides access to the notices system and actionable items like reviews and stock.
+It provides access to the notices system and actionable items like stock.
## Components
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 a0b59e4fb2a..31208815b57 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
@@ -142,6 +142,11 @@
height: 24px;
padding: 4px 10px;
@include font-size( 11 );
+ &.is-destructive {
+ &:not(:hover) {
+ box-shadow: none;
+ }
+ }
}
}
@@ -256,61 +261,6 @@
}
}
-.woocommerce-review-activity-card {
- .woocommerce-activity-card__body > span > p {
- &:first-child {
- margin-top: 0;
- }
-
- &:last-child {
- margin-bottom: 0;
- }
- }
-
- .woocommerce-review-activity-card__verified {
- margin-left: $gap-small;
- display: inline-flex;
- position: relative;
- top: $gap-smallest;
- color: $valid-green;
- @include font-size( 12 );
-
- .gridicon {
- margin-right: $gap-smallest;
- fill: $valid-green;
- }
- }
-
- .woocommerce-review-activity-card__image-overlay {
- position: relative;
-
- img.woocommerce-gravatar {
- border: 2px solid $studio-white;
- left: 0;
- position: absolute;
- top: -6px;
- z-index: 2;
- }
- }
-
- @include breakpoint( '<782px' ) {
- .woocommerce-review-activity-card__image-overlay {
- margin-top: $gap-smallest;
- }
-
- .woocommerce-review-activity-card__image-overlay__product
- .woocommerce-gravatar {
- margin-left: 0;
- width: 18px;
- height: 18px;
- left: 32px;
- top: -28px;
- z-index: 1;
- }
- }
-}
-
-.woocommerce-review-activity-card__image-overlay__product,
.woocommerce-stock-activity-card__image-overlay__product {
height: 33px;
position: relative;
diff --git a/plugins/woocommerce-admin/client/header/activity-panel/index.js b/plugins/woocommerce-admin/client/header/activity-panel/index.js
index 523f284d48e..890b8036327 100644
--- a/plugins/woocommerce-admin/client/header/activity-panel/index.js
+++ b/plugins/woocommerce-admin/client/header/activity-panel/index.js
@@ -11,7 +11,7 @@ import { uniqueId, find } from 'lodash';
import CrossIcon from 'gridicons/dist/cross-small';
import classnames from 'classnames';
import { Icon, help as helpIcon } from '@wordpress/icons';
-import { getSetting, getAdminLink } from '@woocommerce/wc-admin-settings';
+import { getAdminLink } from '@woocommerce/wc-admin-settings';
import { H, Section, Spinner } from '@woocommerce/components';
import { OPTIONS_STORE_NAME } from '@woocommerce/data';
import { getHistory, getNewPath } from '@woocommerce/navigation';
@@ -21,7 +21,7 @@ import { getHistory, getNewPath } from '@woocommerce/navigation';
*/
import './style.scss';
import ActivityPanelToggleBubble from './toggle-bubble';
-import { getUnreadNotes, getUnapprovedReviews } from './unread-indicators';
+import { getUnreadNotes } from './unread-indicators';
import { isWCAdmin } from '../../dashboard/utils';
import { Tabs } from './tabs';
import { SetupProgress } from './setup-progress';
@@ -37,11 +37,6 @@ const InboxPanel = lazy( () =>
)
);
-const ReviewsPanel = lazy( () =>
- import( /* webpackChunkName: "activity-panels-inbox" */ './panels/reviews' )
-);
-
-const reviewsEnabled = getSetting( 'reviewsEnabled', 'no' );
export class ActivityPanel extends Component {
constructor( props ) {
super( props );
@@ -132,7 +127,6 @@ export class ActivityPanel extends Component {
getTabs() {
const {
hasUnreadNotes,
- hasUnapprovedReviews,
isEmbedded,
taskListComplete,
taskListHidden,
@@ -150,9 +144,6 @@ export class ActivityPanel extends Component {
const showDisplayOptions =
! isEmbedded && this.isHomescreen() && ! isPerformingSetupTask;
- const showReviews =
- ( taskListComplete || taskListHidden ) && ! isPerformingSetupTask;
-
const showStoreSetup =
! taskListComplete && ! taskListHidden && ! isPerformingSetupTask;
@@ -173,20 +164,6 @@ export class ActivityPanel extends Component {
}
: null;
- const reviews =
- showReviews && reviewsEnabled === 'yes'
- ? {
- name: 'reviews',
- title: __( 'Reviews', 'woocommerce-admin' ),
- icon: (
-
- star_border
-
- ),
- unread: hasUnapprovedReviews,
- }
- : null;
-
const help = showHelp
? {
name: 'help',
@@ -201,24 +178,16 @@ export class ActivityPanel extends Component {
}
: null;
- return [ inbox, reviews, setup, displayOptions, help ].filter(
- Boolean
- );
+ return [ inbox, setup, displayOptions, help ].filter( Boolean );
}
getPanelContent( tab ) {
- const { query, hasUnapprovedReviews } = this.props;
+ const { query } = this.props;
const { task } = query;
switch ( tab ) {
case 'inbox':
return
- { __( - "We noticed that it's been a while since your products had any reviews.", - 'woocommerce-admin' - ) } -
-- { __( - 'Take some time to learn about best practices for collecting and using your reviews.', - 'woocommerce-admin' - ) } -
-- { __( - /* eslint-disable max-len */ - "Awesome, you've moderated all of your product reviews. How about responding to some of those negative reviews?", - 'woocommerce-admin' - /* eslint-enable */ - ) } -
- ); - eventName = 'view_reviews'; - } - } else { - buttonUrl = - 'https://woocommerce.com/posts/reviews-woocommerce-best-practices/'; - buttonTarget = '_blank'; - buttonText = __( 'Learn more', 'woocommerce-admin' ); - content = ( -- { __( - "Your customers haven't started reviewing your products.", - 'woocommerce-admin' - ) } -
-- { __( - 'Take some time to learn about best practices for collecting and using your reviews.', - 'woocommerce-admin' - ) } -
-It is an average hat
\n', + rating: 3, + verified: false, + _embedded: { + up: [ + { + id: 45, + name: 'Cap', + slug: 'cap', + permalink: 'https://one.wordpress.test/product/cap/', + description: + 'Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.', + short_description: 'This is a simple product.', + images: [ + { + id: 74, + date_created: '2020-11-20T17:28:47', + date_created_gmt: '2020-11-20T17:28:47', + date_modified: '2020-11-20T17:28:47', + date_modified_gmt: '2020-11-20T17:28:47', + src: + 'https://one.wordpress.test/wp-content/uploads/2020/11/cap-2-1.jpg', + name: 'cap-2-1.jpg', + alt: '', + }, + ], + }, + ], + }, +}; + +jest.mock( '@woocommerce/components', () => ( { + ...require.requireActual( '@woocommerce/components' ), + Link: ( { children } ) => { + return <>{ children }>; + }, +} ) ); + +describe( 'ReviewsPanel', () => { + it( 'should render an empty review card', () => { + render( +