-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create new launchpad only home structure (#98476)
* Create new launchpad only home structure * Rename feature flag * Allow dismissing the full-screen Launchpad in My Home --------- Co-authored-by: Luis Felipe Zaguini <[email protected]>
- Loading branch information
1 parent
d7fb6bd
commit 02eb91b
Showing
20 changed files
with
70 additions
and
43 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
client/my-sites/customer-home/cards/tasks/site-setup-list/style.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
client/my-sites/customer-home/components/full-screen-launchpad.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { Button } from '@wordpress/components'; | ||
import { useI18n } from '@wordpress/react-i18n'; | ||
import LaunchpadPreLaunch from '../cards/launchpad/pre-launch'; | ||
|
||
export const FullScreenLaunchpad = ( { onClose }: { onClose: () => void } ) => { | ||
const { __ } = useI18n(); | ||
|
||
return ( | ||
<div css={ { display: 'flex', flexDirection: 'column', alignItems: 'center', gap: '24px' } }> | ||
<div css={ { width: '100%' } }> | ||
<LaunchpadPreLaunch /> | ||
</div> | ||
<Button onClick={ onClose }>{ __( 'Hide onboarding setup' ) }</Button> | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
client/my-sites/customer-home/style.scss → ...r-home/components/home-content/style.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
@import "./grid-mixins"; | ||
@import "@wordpress/base-styles/breakpoints"; | ||
@import "@wordpress/base-styles/mixins"; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,18 @@ | ||
import page from '@automattic/calypso-router'; | ||
import { makeLayout, render as clientRender } from 'calypso/controller'; | ||
import { navigation, siteSelection, sites } from 'calypso/my-sites/controller'; | ||
import home, { maybeRedirect } from './controller'; | ||
import renderHome, { maybeRedirect } from './controller'; | ||
|
||
export default function () { | ||
page( '/home', siteSelection, sites, makeLayout, clientRender ); | ||
|
||
page( '/home/:siteId', siteSelection, maybeRedirect, navigation, home, makeLayout, clientRender ); | ||
page( | ||
'/home/:siteId', | ||
siteSelection, | ||
maybeRedirect, | ||
navigation, | ||
renderHome, | ||
makeLayout, | ||
clientRender | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import config from '@automattic/calypso-config'; | ||
import { useTranslate } from 'i18n-calypso'; | ||
import { useState } from 'react'; | ||
import DocumentHead from 'calypso/components/data/document-head'; | ||
import Main from 'calypso/components/main'; | ||
import PageViewTracker from 'calypso/lib/analytics/page-view-tracker'; | ||
import { FullScreenLaunchpad } from './components/full-screen-launchpad'; | ||
import HomeContent from './components/home-content'; | ||
|
||
export default function CustomerHome() { | ||
const [ isShowingLaunchpad, setIsShowingLaunchpad ] = useState( | ||
config.isEnabled( 'home/launchpad-first' ) | ||
); | ||
|
||
const translate = useTranslate(); | ||
|
||
return ( | ||
<Main wideLayout> | ||
<PageViewTracker path="/home/:site" title={ translate( 'My Home' ) } /> | ||
<DocumentHead title={ translate( 'My Home' ) } /> | ||
{ isShowingLaunchpad ? ( | ||
<FullScreenLaunchpad onClose={ () => setIsShowingLaunchpad( false ) } /> | ||
) : ( | ||
<HomeContent /> | ||
) } | ||
</Main> | ||
); | ||
} |
1 change: 0 additions & 1 deletion
1
client/my-sites/domains/domain-management/dns/add-dns-record.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
client/my-sites/domains/domain-management/transfer/transfer-to-any-user/style.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
client/my-sites/domains/domain-management/transfer/transfer-to-other-user/style.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters