Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Created initial structure to My Home Launchpad using the entire home #98372

Open
wants to merge 2 commits into
base: trunk
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 25 additions & 16 deletions client/my-sites/customer-home/main.jsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -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';
Expand Down Expand Up @@ -88,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,
Expand Down Expand Up @@ -293,27 +298,31 @@ const Home = ( {
return (
<Main wideLayout className="customer-home__main">
<PageViewTracker path="/home/:site" title={ translate( 'My Home' ) } />
<DocumentHead title={ translate( 'My Home' ) } />
{ siteId && isJetpack && isPossibleJetpackConnectionProblem && (
<JetpackConnectionHealthBanner siteId={ siteId } />
{ ! config.isEnabled( 'home-launchpad' ) && (
<>
<DocumentHead title={ translate( 'My Home' ) } />
{ siteId && isJetpack && isPossibleJetpackConnectionProblem && (
<JetpackConnectionHealthBanner siteId={ siteId } />
) }
{ header }
{ ! isLoading && ! layout && homeLayoutError && (
<TrackComponentView
eventName="calypso_customer_home_my_site_view_layout_error"
eventProperties={ {
site_id: siteId,
error: homeLayoutError?.message ?? 'Layout is not available.',
} }
/>
) }
</>
) }
{ header }
{ ! isLoading && ! layout && homeLayoutError ? (
<TrackComponentView
eventName="calypso_customer_home_my_site_view_layout_error"
eventProperties={ {
site_id: siteId,
error: homeLayoutError?.message ?? 'Layout is not available.',
} }
/>
) : null }

{ renderStudioSyncNotice() }
{ renderUnverifiedEmailNotice() }
{ renderDnsSettingsDiagnosticNotice() }

{ isLoading && <div className="customer-home__loading-placeholder"></div> }
{ ! isLoading && layout && ! homeLayoutError ? (
{ homeLaunchpad && <LaunchpadPreLaunch></LaunchpadPreLaunch> }
{ ! isLoading && layout && ! homeLayoutError && ! homeLaunchpad && (
<>
<Primary cards={ layout?.primary } />
<div className="customer-home__layout">
Expand All @@ -329,7 +338,7 @@ const Home = ( {
</div>
</div>
</>
) : null }
) }
{ celebrateLaunchModalIsOpen && (
<CelebrateLaunchModal
setModalIsOpen={ setCelebrateLaunchModalIsOpen }
Expand Down
1 change: 1 addition & 0 deletions config/development.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
"help": true,
"help/gpt-response": true,
"home/layout-dev": true,
"home-launchpad": false,
"hosting-server-settings-enhancements": true,
"hosting/datacenter-picker": true,
"i18n/community-translator": false,
Expand Down
1 change: 1 addition & 0 deletions config/horizon.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"global-styles/on-personal-plan": false,
"help": true,
"home/layout-dev": true,
"home-launchpad": false,
"hosting-server-settings-enhancements": true,
"i18n/empathy-mode": false,
"i18n/translation-scanner": true,
Expand Down
1 change: 1 addition & 0 deletions config/production.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
"global-styles/on-personal-plan": false,
"help": true,
"help/gpt-response": true,
"home-launchpad": false,
"hosting-server-settings-enhancements": true,
"i18n/empathy-mode": false,
"i18n/translation-scanner": true,
Expand Down
1 change: 1 addition & 0 deletions config/stage.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
"global-styles/on-personal-plan": false,
"help": true,
"help/gpt-response": true,
"home-launchpad": false,
"hosting-server-settings-enhancements": true,
"i18n/empathy-mode": true,
"importer/site-backups": true,
Expand Down
1 change: 1 addition & 0 deletions config/wpcalypso.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
"help": true,
"help/gpt-response": true,
"home/layout-dev": true,
"home-launchpad": false,
"hosting/datacenter-picker": true,
"hosting-server-settings-enhancements": true,
"i18n/translation-scanner": true,
Expand Down
Loading