-
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.
Replace overview when site is with a pending migration (#95497)
* Fix bottom spacing in the content Since the parent has an overflow hidden and a padding bottom it wasn't being respected. * Extract hero components * Move type to follow the same standard of the others * Add key to the loop * Extract grid component * Add functions to get migration status and migration type * Tweak styles for when it does not have a link * Add migration overview variation * Temporarily add check for pending When we implement the started status, we can also use the MigrationOverview, and remove this conditional. * Redirect users to the proper step * Redirect users to the proper step when the user didn't buy a plan yet * Add query string to trigger the calypso_signup_start event * Add tests for the links * Join imports * Extract canInstallPlugins logic * Improve check to match what is checked in the flows * Fix tests * Fix type to get from relative path * Fix DYI URL * Remove not used conditional * Update tests to also mock the canInstallPlugins Similar to the other mocks in these tests. * Remove missed import after rebase
- Loading branch information
Showing
15 changed files
with
420 additions
and
87 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { Button } from '@wordpress/components'; | ||
import type { ReactNode, ComponentProps } from 'react'; | ||
|
||
import './style.scss'; | ||
|
||
interface HostingHeroProps { | ||
children: ReactNode; | ||
} | ||
|
||
export function HostingHero( { children }: HostingHeroProps ) { | ||
return <div className="hosting-hero">{ children }</div>; | ||
} | ||
|
||
export function HostingHeroButton( props: ComponentProps< typeof Button > ) { | ||
return <Button variant="primary" className="hosting-hero-button" { ...props } />; | ||
} |
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,27 @@ | ||
@import "@automattic/components/src/styles/typography"; | ||
|
||
.hosting-hero { | ||
grid-column: 1 / -1; | ||
text-align: center; | ||
margin-bottom: 70px; | ||
|
||
> h1 { | ||
margin-top: 30px; | ||
font-style: normal; | ||
font-weight: 500; | ||
font-size: rem(36px); | ||
font-family: Recoleta, sans-serif; | ||
} | ||
> p { | ||
font-style: normal; | ||
font-weight: 400; | ||
font-size: rem(18px); | ||
} | ||
} | ||
|
||
.hosting-hero-button { | ||
margin: 0 5px; | ||
padding: 10px 14px; | ||
font-size: rem(14px); | ||
height: 40px; | ||
} |
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
Oops, something went wrong.