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 5c0e1c8b3f5a..7413d1fcab5a 100644
--- a/projects/plugins/jetpack/_inc/client/components/dash-item/index.jsx
+++ b/projects/plugins/jetpack/_inc/client/components/dash-item/index.jsx
@@ -1,5 +1,4 @@
-import { getRedirectUrl } from '@automattic/jetpack-components';
-import { __, _x } from '@wordpress/i18n';
+import { _x } from '@wordpress/i18n';
import clsx from 'clsx';
import PropTypes from 'prop-types';
import { Component } from 'react';
@@ -8,13 +7,12 @@ import Button from 'components/button';
import Card from 'components/card';
import { withModuleSettingsFormHelpers } from 'components/module-settings/with-module-settings-form-helpers';
import { ModuleToggle } from 'components/module-toggle';
-import SimpleNotice from 'components/notice';
import SectionHeader from 'components/section-header';
import SupportInfo from 'components/support-info';
import analytics from 'lib/analytics';
import ProStatus from 'pro-status';
import { isOfflineMode } from 'state/connection';
-import { getSiteRawUrl, getSiteAdminUrl, userCanManageModules } from 'state/initial-state';
+import { getSiteAdminUrl, userCanManageModules } from 'state/initial-state';
import { getModule as _getModule } from 'state/modules';
export class DashItem extends Component {
@@ -79,9 +77,7 @@ export class DashItem extends Component {
'videopress',
].includes( this.props.module ) &&
this.props.isOfflineMode ) ||
- this.props.noToggle ||
- // Avoid toggle for manage as it's no longer a module
- 'manage' === this.props.module ? (
+ this.props.noToggle ? (
''
) : (
);
- if ( 'manage' === this.props.module ) {
- if ( 'is-warning' === this.props.status ) {
- toggle = (
-
-
- { _x( 'Updates needed', 'Short warning message', 'jetpack' ) }
-
-
- );
- }
- if ( 'is-working' === this.props.status ) {
- toggle = (
- { __( 'Active', 'jetpack' ) }
- );
- }
- }
-
if ( 'rewind' === this.props.module ) {
toggle = null;
}
@@ -170,7 +143,6 @@ export default connect( state => {
getModule: module_name => _getModule( state, module_name ),
isOfflineMode: isOfflineMode( state ),
userCanToggle: userCanManageModules( state ),
- siteRawUrl: getSiteRawUrl( state ),
siteAdminUrl: getSiteAdminUrl( state ),
};
} )( withModuleSettingsFormHelpers( DashItem ) );
diff --git a/projects/plugins/jetpack/_inc/client/components/dash-item/style.scss b/projects/plugins/jetpack/_inc/client/components/dash-item/style.scss
index c17af43b4e4b..26db1a08b4c5 100644
--- a/projects/plugins/jetpack/_inc/client/components/dash-item/style.scss
+++ b/projects/plugins/jetpack/_inc/client/components/dash-item/style.scss
@@ -1,4 +1,3 @@
-@use "sass:color";
@use "../../scss/functions/rem";
@use "../../scss/calypso-colors";
@use "../../scss/mixins/ui";
@@ -136,15 +135,6 @@
}
}
-.jp-dash-item__active-label {
- display: inline-block;
- color: color.adjust(colors.$gray, $lightness: -10%);
- color: colors.$gray;
- font-size: rem.convert(12px);
- font-weight: 400;
- text-transform: uppercase;
-}
-
// conditional styles for content when items are inactive
.jp-dash-item__is-inactive {
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 e024e7787d2f..b2cbfb841a86 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
@@ -49,7 +49,6 @@ describe( 'DashItem', () => {
href: getRedirectUrl( 'jetpack' ),
userCanToggle: true,
siteAdminUrl: 'https://example.org/wp-admin/',
- siteRawUrl: 'example.org',
getOptionValue: () => true,
isUpdating: () => false,
};
@@ -171,50 +170,6 @@ describe( 'DashItem', () => {
} );
} );
- describe( 'if this is the DashItem for Manage module', () => {
- const manageProps = {
- label: 'Manage',
- module: 'manage',
- status: 'is-warning',
- pro: false,
- isOfflineMode: false,
- userCanToggle: true,
- siteAdminUrl: 'https://example.org/wp-admin/',
- siteRawUrl: 'example.org',
- getOptionValue: () => true,
- isUpdating: () => false,
- };
-
- it( "shows a warning badge when status is 'is-warning'", () => {
- const { container } = render( , {
- initialState: buildInitialState(),
- } );
- // eslint-disable-next-line testing-library/no-container
- expect( container.querySelector( '.dops-notice.is-warning' ) ).toBeInTheDocument();
- } );
-
- it( 'when it is activated, the warning badge is linked to Plugins screen in WordPress.com', () => {
- const { container } = render( , {
- initialState: buildInitialState(),
- } );
- // eslint-disable-next-line testing-library/no-container
- const node = container.querySelector( '.dops-notice.is-warning' ).closest( 'a' );
- expect( node ).toBeInTheDocument();
- expect( node ).toHaveAttribute(
- 'href',
- getRedirectUrl( 'calypso-plugins-manage', { site: manageProps.siteRawUrl } )
- );
- } );
-
- it( "when status is 'is-working', the warning badge has an 'active' label", () => {
- const { container } = render( , {
- initialState: buildInitialState(),
- } );
- // eslint-disable-next-line testing-library/no-container
- expect( container.querySelector( '.jp-dash-item__active-label' ) ).toBeInTheDocument();
- } );
- } );
-
describe( 'if this is the DashItem for Monitor module', () => {
const monitorProps = {
module: 'monitor',
@@ -224,7 +179,6 @@ describe( 'DashItem', () => {
isOfflineMode: false,
userCanToggle: true,
siteAdminUrl: 'https://example.org/wp-admin/',
- siteRawUrl: 'example.org',
getOptionValue: () => true,
isUpdating: () => false,
};
diff --git a/projects/plugins/jetpack/changelog/remove-dash-item-manage-branch b/projects/plugins/jetpack/changelog/remove-dash-item-manage-branch
new file mode 100644
index 000000000000..fa6b05964adc
--- /dev/null
+++ b/projects/plugins/jetpack/changelog/remove-dash-item-manage-branch
@@ -0,0 +1,5 @@
+Significance: patch
+Type: other
+Comment: Removes unreachable code; no user-facing change.
+
+