From 864e4edc83cce0a5213d9f5583a632a2f93d6016 Mon Sep 17 00:00:00 2001 From: Joan Rho Date: Wed, 5 Dec 2018 19:38:36 -0700 Subject: [PATCH 1/2] Update Security section links on Jetpack Dashboard --- _inc/client/at-a-glance/index.jsx | 4 ++-- .../components/dash-section-header/index.jsx | 15 --------------- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/_inc/client/at-a-glance/index.jsx b/_inc/client/at-a-glance/index.jsx index 07a4f38df564e..c86fe89c74f78 100644 --- a/_inc/client/at-a-glance/index.jsx +++ b/_inc/client/at-a-glance/index.jsx @@ -63,11 +63,11 @@ class AtAGlance extends Component { settingsPath={ this.props.userCanManageModules ? '#security' : undefined } externalLink={ this.props.isDevMode || ! this.props.userCanManageModules ? '' - : __( 'Manage security on WordPress.com' ) + : __( 'Manage security settings' ) } externalLinkPath={ this.props.isDevMode ? '' - : 'https://wordpress.com/settings/security/' + this.props.siteRawUrl + : '#security' } externalLinkClick={ trackSecurityClick } />; diff --git a/_inc/client/components/dash-section-header/index.jsx b/_inc/client/components/dash-section-header/index.jsx index 24f6026bc88b6..0657c961ac637 100644 --- a/_inc/client/components/dash-section-header/index.jsx +++ b/_inc/client/components/dash-section-header/index.jsx @@ -4,8 +4,6 @@ import PropTypes from 'prop-types'; import React from 'react'; import classNames from 'classnames'; -import Gridicon from 'components/gridicon'; -import { translate as __ } from 'i18n-calypso'; import analytics from 'lib/analytics'; export class DashSectionHeader extends React.Component { @@ -35,7 +33,6 @@ export class DashSectionHeader extends React.Component { }; render() { - let settingsIcon; let externalLink; let children; @@ -44,17 +41,6 @@ export class DashSectionHeader extends React.Component { 'jp-dash-section-header' ); - if ( this.props.settingsPath ) { - settingsIcon = ( - - - { __( 'Settings', { context: 'Noun. Displayed to screen readers.' } ) } - - - - ); - } - if ( this.props.externalLink ) { externalLink = ( { this.props.label } - { settingsIcon } { externalLink } { children } From 04bfaf2dac41b330d66a1b89da17dfe5c899cfc5 Mon Sep 17 00:00:00 2001 From: Joan Rho Date: Wed, 5 Dec 2018 20:18:59 -0700 Subject: [PATCH 2/2] Remove failing tests --- .../components/dash-section-header/test/component.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/_inc/client/components/dash-section-header/test/component.js b/_inc/client/components/dash-section-header/test/component.js index 7015089bf880c..9506a66df1b99 100644 --- a/_inc/client/components/dash-section-header/test/component.js +++ b/_inc/client/components/dash-section-header/test/component.js @@ -50,15 +50,6 @@ describe( 'DashSectionHeader', () => { const wrapper = shallow( ); - it( 'displays an icon for Security', () => { - expect( wrapper.find( 'Gridicon' ) ).to.have.length( 1 ); - } ); - - it( 'the icon is linked to a section', () => { - expect( wrapper.find( 'a.jp-dash-section-header__settings' ) ).to.have.length( 1 ); - expect( wrapper.find( 'a.jp-dash-section-header__settings' ).props().href ).to.be.equal( '#security' ); - } ); - it( 'there is an external link', () => { expect( wrapper.find( 'a.jp-dash-section-header__external-link' ) ).to.have.length( 1 ); expect( wrapper.find( 'a.jp-dash-section-header__external-link' ).props().href ).to.be.equal( externalPath );