From bfba456a464eeae24f05a4bd2afa8aa8e35731e0 Mon Sep 17 00:00:00 2001 From: Jeff Stieler Date: Thu, 10 Oct 2019 15:31:28 -0700 Subject: [PATCH] Render a "manage" link on review inbox items. (https://github.com/woocommerce/woocommerce-admin/pull/3011) * Render a "manage" link on review inbox items. Instead of the SplitButton with multiple actions. * Remove review ID from tracks event data. --- .../header/activity-panel/panels/reviews.js | 45 +++++++------------ 1 file changed, 16 insertions(+), 29 deletions(-) diff --git a/plugins/woocommerce-admin/client/header/activity-panel/panels/reviews.js b/plugins/woocommerce-admin/client/header/activity-panel/panels/reviews.js index 52784878e9f..f3ffdd386e9 100644 --- a/plugins/woocommerce-admin/client/header/activity-panel/panels/reviews.js +++ b/plugins/woocommerce-admin/client/header/activity-panel/panels/reviews.js @@ -8,7 +8,7 @@ import { Component, Fragment } from '@wordpress/element'; import { Button } from '@wordpress/components'; import Gridicon from 'gridicons'; import interpolateComponents from 'interpolate-components'; -import { get, noop, isNull } from 'lodash'; +import { get, isNull } from 'lodash'; import PropTypes from 'prop-types'; /** @@ -21,7 +21,6 @@ import { ProductImage, ReviewRating, Section, - SplitButton, } from '@woocommerce/components'; import { getAdminLink } from '@woocommerce/navigation'; @@ -33,6 +32,7 @@ import ActivityHeader from '../activity-header'; import { QUERY_DEFAULTS } from 'wc-api/constants'; import sanitizeHTML from 'lib/sanitize-html'; import withSelect from 'wc-api/with-select'; +import { recordEvent } from 'lib/tracks'; class ReviewsPanel extends Component { constructor() { @@ -93,34 +93,21 @@ class ReviewsPanel extends Component { ); - const cardActions = () => { - const mainLabel = - 'approved' === review.status - ? __( 'Unapprove', 'woocommerce-admin' ) - : __( 'Approve', 'woocommerce-admin' ); - return ( - - ); + const manageReviewEvent = { + date: review.date_created_gmt, + status: review.status, }; + const cardActions = ( + + ); + return (