From 310746008f83e39abaf17d0b5d328a8f4e019eb3 Mon Sep 17 00:00:00 2001 From: Paulo Trentin Date: Tue, 14 Jan 2025 14:14:51 -0300 Subject: [PATCH 1/2] Created initial structure to My Home Launchpad using the entire home --- client/my-sites/customer-home/main.jsx | 38 +++++++++++++++----------- config/development.json | 1 + config/horizon.json | 1 + config/production.json | 1 + config/stage.json | 1 + config/wpcalypso.json | 1 + 6 files changed, 27 insertions(+), 16 deletions(-) diff --git a/client/my-sites/customer-home/main.jsx b/client/my-sites/customer-home/main.jsx index 6d8e5e16658de..27e3ac4054e9b 100644 --- a/client/my-sites/customer-home/main.jsx +++ b/client/my-sites/customer-home/main.jsx @@ -1,3 +1,4 @@ +import config from '@automattic/calypso-config'; import { Button } from '@automattic/components'; import { localizeUrl } from '@automattic/i18n-utils'; import { SET_UP_EMAIL_AUTHENTICATION_FOR_YOUR_DOMAIN } from '@automattic/urls'; @@ -50,6 +51,7 @@ import { } from 'calypso/state/sites/selectors'; import isJetpackSite from 'calypso/state/sites/selectors/is-jetpack-site'; import { getSelectedSite, getSelectedSiteId } from 'calypso/state/ui/selectors'; +import LaunchpadPreLaunch from './cards/launchpad/pre-launch'; import CelebrateLaunchModal from './components/celebrate-launch-modal'; import './style.scss'; @@ -293,27 +295,31 @@ const Home = ( { return (
- - { siteId && isJetpack && isPossibleJetpackConnectionProblem && ( - + { ! config.isEnabled( 'home-launchpad' ) && ( + <> + + { siteId && isJetpack && isPossibleJetpackConnectionProblem && ( + + ) } + { header } + { ! isLoading && ! layout && homeLayoutError && ( + + ) } + ) } - { header } - { ! isLoading && ! layout && homeLayoutError ? ( - - ) : null } - { renderStudioSyncNotice() } { renderUnverifiedEmailNotice() } { renderDnsSettingsDiagnosticNotice() } { isLoading &&
} - { ! isLoading && layout && ! homeLayoutError ? ( + { config.isEnabled( 'home-launchpad' ) && } + { ! isLoading && layout && ! homeLayoutError && ! config.isEnabled( 'home-launchpad' ) && ( <>
@@ -329,7 +335,7 @@ const Home = ( {
- ) : null } + ) } { celebrateLaunchModalIsOpen && ( Date: Tue, 14 Jan 2025 14:31:58 -0300 Subject: [PATCH 2/2] lauchpadOnly URL parameter used to gate the home changes --- client/my-sites/customer-home/main.jsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/client/my-sites/customer-home/main.jsx b/client/my-sites/customer-home/main.jsx index 27e3ac4054e9b..506b9d158ba05 100644 --- a/client/my-sites/customer-home/main.jsx +++ b/client/my-sites/customer-home/main.jsx @@ -90,6 +90,9 @@ const Home = ( { const customDomain = customDomains?.length ? customDomains[ 0 ] : undefined; const primaryDomain = customDomains?.find( ( domain ) => domain.isPrimary ); + const homeLaunchpad = + config.isEnabled( 'home-launchpad' ) && getQueryArgs().launchpadOnly === 'true'; + const { data: domainDiagnosticData, isFetching: isFetchingDomainDiagnostics, @@ -318,8 +321,8 @@ const Home = ( { { renderDnsSettingsDiagnosticNotice() } { isLoading &&
} - { config.isEnabled( 'home-launchpad' ) && } - { ! isLoading && layout && ! homeLayoutError && ! config.isEnabled( 'home-launchpad' ) && ( + { homeLaunchpad && } + { ! isLoading && layout && ! homeLayoutError && ! homeLaunchpad && ( <>