Skip to content

Commit

Permalink
address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
madhusudhand committed Nov 25, 2024
1 parent bdd8a95 commit 6c57e7f
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 13 deletions.
26 changes: 16 additions & 10 deletions client/sites/components/site-preview-pane/dotcom-preview-pane.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { SiteExcerptData } from '@automattic/sites';
import { useI18n } from '@wordpress/react-i18n';
import React, { useMemo, useEffect } from 'react';
import ItemPreviewPane from 'calypso/a8c-for-agencies/components/items-dashboard/item-preview-pane';
import HostingFeaturesIcon from 'calypso/sites/tools/hosting-features/components/hosting-features-icon';
import { areHostingFeaturesSupported } from 'calypso/sites/hosting-features/features';
import HostingFeaturesIcon from 'calypso/sites/tools/hosting-features/components/hosting-features-icon';
import { useStagingSite } from 'calypso/sites/tools/staging-site/hooks/use-staging-site';
import { getMigrationStatus } from 'calypso/sites-dashboard/utils';
import { useSelector } from 'calypso/state';
Expand Down Expand Up @@ -98,7 +98,8 @@ const DotcomPreviewPane = ( {
<HostingFeaturesIcon />
</span>
),
enabled: areHostingFeaturesSupported( site ),
enabled:
( isSimpleSite || isPlanExpired ) && ! config.isEnabled( 'untangling/hosting-menu' ),
featureIds: [ DOTCOM_HOSTING_FEATURES ],
},
{
Expand Down Expand Up @@ -137,16 +138,10 @@ const DotcomPreviewPane = ( {
],
},
{
label: (
<span>
{ __( 'Advanced Tools' ) }
<HostingFeaturesIcon />
</span>
),
label: __( 'Advanced Tools' ),
enabled:
! areHostingFeaturesSupported( site ) && config.isEnabled( 'untangling/hosting-menu' ),
areHostingFeaturesSupported( site ) && config.isEnabled( 'untangling/hosting-menu' ),
featureIds: [
TOOLS,
TOOLS_STAGING_SITE,
TOOLS_DEPLOYMENTS,
TOOLS_MONITORING,
Expand All @@ -156,6 +151,17 @@ const DotcomPreviewPane = ( {
TOOLS_DATABASE,
],
},
{
label: (
<span>
{ __( 'Advanced Tools' ) }
<HostingFeaturesIcon />
</span>
),
enabled:
! areHostingFeaturesSupported( site ) && config.isEnabled( 'untangling/hosting-menu' ),
featureIds: [ TOOLS ],
},
{
label: __( 'Settings' ),
enabled: config.isEnabled( 'untangling/hosting-menu' ),
Expand Down
2 changes: 1 addition & 1 deletion client/sites/tools/controller.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export function ToolsSidebar() {
);
}

export function advancedTools( context: PageJSContext, next: () => void ) {
export function tools( context: PageJSContext, next: () => void ) {
context.primary = <HostingFeatures showAsTools />;
next();
}
Expand Down
4 changes: 2 additions & 2 deletions client/sites/tools/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import {
deploymentCreation,
deploymentManagement,
deploymentRunLogs,
advancedTools,
tools,
} from './controller';

export default function () {
Expand All @@ -32,7 +32,7 @@ export default function () {
'/sites/tools/:site',
siteSelection,
navigation,
advancedTools,
tools,
siteDashboard( TOOLS ),
makeLayout,
clientRender
Expand Down

0 comments on commit 6c57e7f

Please sign in to comment.