diff --git a/projects/plugins/jetpack/_inc/client/at-a-glance/akismet.jsx b/projects/plugins/jetpack/_inc/client/at-a-glance/akismet.jsx index 5ea6bb446bb2..25ed81cfed4b 100644 --- a/projects/plugins/jetpack/_inc/client/at-a-glance/akismet.jsx +++ b/projects/plugins/jetpack/_inc/client/at-a-glance/akismet.jsx @@ -217,7 +217,6 @@ class DashAkismet extends Component { label={ labelName } module="akismet" support={ support } - status="is-working" pro={ true } > { getAkismetCounter( akismetData ) } diff --git a/projects/plugins/jetpack/_inc/client/at-a-glance/backups.jsx b/projects/plugins/jetpack/_inc/client/at-a-glance/backups.jsx index a2a3e0da0c83..82fb90b5873b 100644 --- a/projects/plugins/jetpack/_inc/client/at-a-glance/backups.jsx +++ b/projects/plugins/jetpack/_inc/client/at-a-glance/backups.jsx @@ -29,7 +29,6 @@ import { import { hasConnectedOwner, isOfflineMode, connectUser } from 'state/connection'; import { getPartnerCoupon, showBackups } from 'state/initial-state'; import { siteHasFeature, isFetchingSiteData } from 'state/site'; -import { isPluginInstalled } from 'state/site/plugins'; import BackupGettingStarted from './backup-getting-started'; import BackupUpgrade from './backup-upgrade'; @@ -53,7 +52,6 @@ const renderCard = props => ( link: getRedirectUrl( 'jetpack-support-backup' ), } } className={ props.className + ' dash-backups' } - status={ props.status } pro={ true } overrideContent={ props.overrideContent } > @@ -74,7 +72,6 @@ class DashBackups extends Component { hasBackups: PropTypes.bool.isRequired, hasRealTimeBackups: PropTypes.bool.isRequired, isOfflineMode: PropTypes.bool.isRequired, - isVaultPressInstalled: PropTypes.bool.isRequired, upgradeUrl: PropTypes.string.isRequired, hasConnectedOwner: PropTypes.bool.isRequired, backupUndoEvent: PropTypes.any.isRequired, @@ -85,7 +82,6 @@ class DashBackups extends Component { getOptionValue: noop, vaultPressData: '', isOfflineMode: false, - isVaultPressInstalled: false, rewindStatus: '', trackUpgradeButtonView: noop, backupUndoEvent: {}, @@ -183,19 +179,11 @@ class DashBackups extends Component { } getVPContent() { - const { - hasBackups, - isFetchingSite, - isVaultPressInstalled, - getOptionValue, - siteRawUrl, - vaultPressData, - } = this.props; + const { hasBackups, isFetchingSite, getOptionValue, siteRawUrl, vaultPressData } = this.props; if ( getOptionValue( 'vaultpress' ) && 'success' === ( vaultPressData?.code ?? '' ) ) { return renderCard( { className: 'jp-dash-item__is-active', - status: 'is-working', content: ( { vaultPressData?.message ?? '' } @@ -219,7 +207,6 @@ class DashBackups extends Component { if ( hasBackups ) { return renderCard( { className: 'jp-dash-item__is-inactive', - status: isVaultPressInstalled ? 'pro-inactive' : 'pro-uninstalled', content: createInterpolateElement( __( 'To automatically back up your entire site, please install and activate VaultPress.', @@ -243,7 +230,6 @@ class DashBackups extends Component { return renderCard( { className: 'jp-dash-item__is-inactive', - status: 'no-pro-uninstalled-or-inactive', overrideContent: this.getJetpackBackupBanner(), } ); } @@ -308,7 +294,6 @@ class DashBackups extends Component { const buildCard = message => renderCard( { className: 'jp-dash-item__is-active', - status: 'is-working', feature: 'rewind', content: message, } ); @@ -378,7 +363,6 @@ class DashBackups extends Component { renderLoading() { return renderCard( { className: '', - status: '', content: __( 'Loading…', 'jetpack' ), } ); } @@ -391,7 +375,6 @@ class DashBackups extends Component { ) { return renderCard( { className: 'jp-dash-item__is-inactive', - status: 'pro-inactive', content: __( 'Your site is new and may still be preparing backup configuration.', 'jetpack' @@ -478,7 +461,6 @@ class DashBackups extends Component { <> { renderCard( { className: 'jp-dash-item__is-active', - status: 'is-working', feature: 'rewind', overrideContent: message, } ) } @@ -505,7 +487,6 @@ class DashBackups extends Component {
{ renderCard( { className: 'jp-dash-item__is-inactive', - status: 'no-pro-uninstalled-or-inactive', content: __( 'Unavailable in Offline Mode.', 'jetpack' ), } ) }
@@ -532,7 +513,6 @@ export default connect( return { vaultPressData: getVaultPressData( state ), isOfflineMode: isOfflineMode( state ), - isVaultPressInstalled: isPluginInstalled( state, 'vaultpress/vaultpress.php' ), showBackups: showBackups( state ), upgradeUrl: getProductDescriptionUrl( state, 'backup' ), hasConnectedOwner: hasConnectedOwner( state ), diff --git a/projects/plugins/jetpack/_inc/client/at-a-glance/monitor.jsx b/projects/plugins/jetpack/_inc/client/at-a-glance/monitor.jsx index 4014e853247d..51daa07d1f9e 100644 --- a/projects/plugins/jetpack/_inc/client/at-a-glance/monitor.jsx +++ b/projects/plugins/jetpack/_inc/client/at-a-glance/monitor.jsx @@ -46,7 +46,7 @@ class DashMonitor extends Component { this.props.hasConnectedOwner ) { return ( - +

{ __( 'Jetpack is monitoring your site. If we think your site is down, you will receive an email.', diff --git a/projects/plugins/jetpack/_inc/client/at-a-glance/photon.jsx b/projects/plugins/jetpack/_inc/client/at-a-glance/photon.jsx index b29689121bbd..9c4708b5cb11 100644 --- a/projects/plugins/jetpack/_inc/client/at-a-glance/photon.jsx +++ b/projects/plugins/jetpack/_inc/client/at-a-glance/photon.jsx @@ -30,7 +30,7 @@ class DashPhoton extends Component { if ( this.props.getOptionValue( 'photon' ) ) { return ( - +

{ __( "Jetpack is optimizing your image sizes and download speed using our fast global network of servers. This improves your site's performance on desktop and mobile devices.", diff --git a/projects/plugins/jetpack/_inc/client/at-a-glance/protect.jsx b/projects/plugins/jetpack/_inc/client/at-a-glance/protect.jsx index 667a1559edbc..4934c17ff080 100644 --- a/projects/plugins/jetpack/_inc/client/at-a-glance/protect.jsx +++ b/projects/plugins/jetpack/_inc/client/at-a-glance/protect.jsx @@ -51,7 +51,6 @@ class DashProtect extends Component { label={ labelName } module="protect" support={ support } - status="is-working" className="jp-dash-item__recently-activated" >

@@ -68,7 +67,7 @@ class DashProtect extends Component { } return ( - +

{ formatNumber( protectCount ) }

{ __( 'Total malicious attacks blocked on your site.', 'jetpack' ) } diff --git a/projects/plugins/jetpack/_inc/client/at-a-glance/scan.jsx b/projects/plugins/jetpack/_inc/client/at-a-glance/scan.jsx index c53024e3ed77..e21ef3ef96d0 100644 --- a/projects/plugins/jetpack/_inc/client/at-a-glance/scan.jsx +++ b/projects/plugins/jetpack/_inc/client/at-a-glance/scan.jsx @@ -54,7 +54,6 @@ const renderCard = props => ( link: getRedirectUrl( 'jetpack-support-security' ), } } className={ props.className || '' } - status={ props.status || '' } pro={ true } overrideContent={ props.overrideContent } > @@ -69,7 +68,6 @@ const renderCard = props => ( const renderActiveCard = message => { return renderCard( { className: 'jp-dash-item__is-active', - status: 'is-working', content: message, } ); }; @@ -145,7 +143,6 @@ class DashScan extends Component { if ( vaultPressData?.code === 'not_registered' ) { return renderCard( { className: 'jp-dash-item__is-inactive', - status: 'not-registered', content: createInterpolateElement( __( 'VaultPress is having difficulties scanning. Please make sure your registration key is entered. If you require further assistance please contact support.', @@ -172,7 +169,6 @@ class DashScan extends Component { // No threats; all good if ( vaultPressData.code === 'success' ) { return renderCard( { - status: 'is-working', content: __( "No threats found, you're good to go!", 'jetpack' ), } ); } @@ -196,7 +192,6 @@ class DashScan extends Component { if ( ! hasSitePlan || ! scanningIncludedInPlan ) { return renderCard( { className: 'jp-dash-item__is-inactive', - status: 'no-pro-uninstalled-or-inactive', overrideContent: hasConnectedOwner ? this.getUpgradeBanner() : this.getConnectBanner(), } ); } @@ -205,7 +200,6 @@ class DashScan extends Component { if ( this.props.isVaultPressInstalled ) { return renderCard( { className: 'jp-dash-item__is-inactive', - status: 'pro-inactive', content: [

{ createInterpolateElement( @@ -228,7 +222,6 @@ class DashScan extends Component { // that VaultPress isn't installed at all return renderCard( { className: 'jp-dash-item__is-inactive', - status: 'pro-uninstalled', content: [

{ createInterpolateElement( diff --git a/projects/plugins/jetpack/_inc/client/at-a-glance/search.jsx b/projects/plugins/jetpack/_inc/client/at-a-glance/search.jsx index 71fcd3f3450a..33a04b750f59 100644 --- a/projects/plugins/jetpack/_inc/client/at-a-glance/search.jsx +++ b/projects/plugins/jetpack/_inc/client/at-a-glance/search.jsx @@ -42,7 +42,6 @@ const renderCard = props => ( link: getRedirectUrl( 'jetpack-support-search' ), } } className={ props.className } - status={ props.status } isModule={ props.pro_inactive } pro={ true } overrideContent={ props.overrideContent } @@ -101,7 +100,6 @@ class DashSearch extends Component { render() { if ( this.props.isFetching ) { return renderCard( { - status: '', content: __( 'Loading…', 'jetpack' ), } ); } @@ -109,7 +107,6 @@ class DashSearch extends Component { if ( this.props.isOfflineMode ) { return renderCard( { className: 'jp-dash-item__is-inactive', - status: 'no-pro-uninstalled-or-inactive', pro_inactive: true, content: __( 'Unavailable in Offline Mode', 'jetpack' ), } ); @@ -118,7 +115,6 @@ class DashSearch extends Component { if ( ! this.props.hasClassicSearch && ! this.props.hasInstantSearch ) { return renderCard( { className: 'jp-dash-item__is-inactive', - status: 'no-pro-uninstalled-or-inactive', pro_inactive: true, overrideContent: (

diff --git a/projects/plugins/jetpack/_inc/client/components/dash-item/README.md b/projects/plugins/jetpack/_inc/client/components/dash-item/README.md index 55ea8dfd3334..541c9fd66977 100644 --- a/projects/plugins/jetpack/_inc/client/components/dash-item/README.md +++ b/projects/plugins/jetpack/_inc/client/components/dash-item/README.md @@ -1,7 +1,7 @@ Dash Item ========= -This component is used to display a widget on the At A Glance view. It includes a Section Header with the ability to show the status and a Card. +This component is used to display a widget on the At A Glance view. It includes a Section Header and a Card. ## Example Usage: @@ -10,16 +10,15 @@ var DashItem = require( 'components/dashitem' ) render: function() { return ( - + Jetpack is actively blocking malicious login attempts. ); } ``` ## Dash Item -This is the base component and acts as a wrapper for an At A Glance item's title and content. The title and status are displayed within a SectionHeader and the rest of the content is displayed within a Card. +This is the base component and acts as a wrapper for an At A Glance item's title and content. The title is displayed within a SectionHeader and the rest of the content is displayed within a Card. #### Props - `label` - *optional* (string) Title of the dash item. -- `status` - *optional* (string) Sets the status colors and icons of the item. Available arguments are `is-success`, `is-warning`, `is-error`, and `is-info`. - `noToggle` - *optional* (bool) If `true`, the component will not disable the enable/disable toggle. diff --git a/projects/plugins/jetpack/_inc/client/components/dash-item/index.jsx b/projects/plugins/jetpack/_inc/client/components/dash-item/index.jsx index 7413d1fcab5a..594879e95694 100644 --- a/projects/plugins/jetpack/_inc/client/components/dash-item/index.jsx +++ b/projects/plugins/jetpack/_inc/client/components/dash-item/index.jsx @@ -18,8 +18,6 @@ import { getModule as _getModule } from 'state/modules'; export class DashItem extends Component { static propTypes = { label: PropTypes.string, - status: PropTypes.string, - statusText: PropTypes.string, disabled: PropTypes.bool, module: PropTypes.string, pro: PropTypes.bool, diff --git a/projects/plugins/jetpack/_inc/client/components/dash-item/test/component.jsx b/projects/plugins/jetpack/_inc/client/components/dash-item/test/component.jsx index b2cbfb841a86..630e8da63048 100644 --- a/projects/plugins/jetpack/_inc/client/components/dash-item/test/component.jsx +++ b/projects/plugins/jetpack/_inc/client/components/dash-item/test/component.jsx @@ -41,8 +41,6 @@ describe( 'DashItem', () => { const testProps = { label: 'Protect', module: 'protect', - status: '', - statusText: '', disabled: true, pro: true, isOfflineMode: false, @@ -174,7 +172,6 @@ describe( 'DashItem', () => { const monitorProps = { module: 'monitor', label: 'Monitor', - status: '', pro: false, isOfflineMode: false, userCanToggle: true, diff --git a/projects/plugins/jetpack/changelog/jetpack-2550-dash-item-status b/projects/plugins/jetpack/changelog/jetpack-2550-dash-item-status new file mode 100644 index 000000000000..aaf54dfe5f70 --- /dev/null +++ b/projects/plugins/jetpack/changelog/jetpack-2550-dash-item-status @@ -0,0 +1,3 @@ +Significance: patch +Type: other +Comment: Remove the inert DashItem status and statusText props.