-
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.
Co-authored-by: Eduardo Villuendas <eduardo.villuendas@automattic.com> Co-authored-by: Panos Kountanis <panosktn@gmail.com> Co-authored-by: John Caruso <johncaruso@gmail.com> Co-authored-by: thedebian <thedebian@users.noreply.github.com> Co-authored-by: Mikey Arce <mikeyarce@gmail.com> Co-authored-by: Omar Alshaker <omar@omaralshaker.com> Co-authored-by: Pierre <thedebian@users.noreply.github.com> Co-authored-by: Dan Roundhill <dan@automattic.com> Co-authored-by: gkaragia <53191348+gkaragia@users.noreply.github.com> Co-authored-by: Peter Kiss <peter@yscik.com> Co-authored-by: Giannis Karagiannis <giannis.karagiannis@automattic.com>
- Loading branch information
1 parent
1d42de2
commit ea2fc39
Showing
59 changed files
with
1,940 additions
and
3 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.75 KB
client/assets/images/sensei-onboarding/sensei-theme-style-1-small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.69 KB
client/assets/images/sensei-onboarding/sensei-theme-style-2-small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.65 KB
client/assets/images/sensei-onboarding/sensei-theme-style-3-small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.71 KB
client/assets/images/sensei-onboarding/sensei-theme-style-4-small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions
6
client/landing/stepper/declarative-flow/internals/sensei.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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
$sensei-mobile-layout-width: 1200px; | ||
$sensei-color: #43af99; | ||
|
||
.sensei .progress-bar__progress { | ||
background-color: $sensei-color; | ||
} |
49 changes: 49 additions & 0 deletions
49
...eclarative-flow/internals/steps-repository/components/sensei-step-container/components.ts
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,49 @@ | ||
import styled from '@emotion/styled'; | ||
|
||
export const Container = styled.div` | ||
position: relative; | ||
height: 100vh; | ||
width: 100%; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: flex-start; | ||
align-items: center; | ||
padding-top: 10px; | ||
overflow-y: auto; | ||
box-sizing: border-box; | ||
* { | ||
box-sizing: border-box; | ||
} | ||
`; | ||
|
||
export const TitleContainer = styled.div` | ||
display: flex; | ||
flex-direction: row; | ||
justify-content: flex-start; | ||
align-items: flex-start; | ||
margin: 32px auto 0 24px; | ||
z-index: 1000; | ||
`; | ||
|
||
export const Title = styled.h1` | ||
margin-left: 8px; | ||
font-size: 18px; | ||
line-height: 24px; | ||
font-family: Recoleta, sans-serif; | ||
`; | ||
|
||
export const Footer = styled.div` | ||
margin-top: auto; | ||
padding: 56px 0; | ||
`; | ||
|
||
export const FooterText = styled.p` | ||
font-size: 13px; | ||
line-height: 20px; | ||
color: #3c434a; | ||
text-align: center; | ||
&:not( :last-of-type ) { | ||
margin-bottom: 6px; | ||
} | ||
`; |
47 changes: 47 additions & 0 deletions
47
...er/declarative-flow/internals/steps-repository/components/sensei-step-container/index.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,47 @@ | ||
import { SENSEI_FLOW, StepContainer } from '@automattic/onboarding'; | ||
import { ExternalLink } from '@wordpress/components'; | ||
import { createInterpolateElement } from '@wordpress/element'; | ||
import { Icon, wordpress } from '@wordpress/icons'; | ||
import { useI18n } from '@wordpress/react-i18n'; | ||
import React from 'react'; | ||
import { Container, TitleContainer, Title, Footer, FooterText } from './components'; | ||
import './styles.scss'; | ||
|
||
interface SenseiStepContainerProps { | ||
stepName: string; | ||
recordTracksEvent: ( eventName: string, eventProperties: object ) => void; | ||
children: React.ReactNode; | ||
} | ||
|
||
export const SenseiStepContainer: React.FC< SenseiStepContainerProps > = ( { | ||
children, | ||
...props | ||
} ) => { | ||
const { __ } = useI18n(); | ||
return ( | ||
<StepContainer | ||
flowName={ SENSEI_FLOW } | ||
isWideLayout | ||
hideFormattedHeader | ||
shouldHideNavButtons | ||
{ ...props } | ||
stepContent={ | ||
<Container> | ||
<TitleContainer> | ||
<Icon icon={ wordpress } /> | ||
<Title>{ __( 'Course Creator' ) }</Title> | ||
</TitleContainer> | ||
{ children } | ||
<Footer> | ||
<FooterText> | ||
{ createInterpolateElement( __( 'Hosted by <a>WordPress.com</a>' ), { | ||
a: <ExternalLink href="https://wordpress.com" />, | ||
} ) } | ||
</FooterText> | ||
<FooterText>{ __( 'Course creation and LMS tools powered by SenseiLMS' ) }</FooterText> | ||
</Footer> | ||
</Container> | ||
} | ||
/> | ||
); | ||
}; |
23 changes: 23 additions & 0 deletions
23
.../declarative-flow/internals/steps-repository/components/sensei-step-container/styles.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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
.sensei { | ||
.signup-header { | ||
display: none; | ||
} | ||
|
||
.step-container { | ||
max-width: 100%; | ||
} | ||
|
||
.progress-bar { | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
width: 100%; | ||
height: 10px; | ||
z-index: 10; | ||
border-radius: 0; | ||
|
||
&__progress { | ||
border-radius: 0; | ||
} | ||
} | ||
} |
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
88 changes: 88 additions & 0 deletions
88
client/landing/stepper/declarative-flow/internals/steps-repository/sensei-domain/index.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,88 @@ | ||
/* eslint-disable wpcalypso/jsx-classname-namespace */ | ||
import { useSelect, useDispatch } from '@wordpress/data'; | ||
import { useI18n } from '@wordpress/react-i18n'; | ||
import RegisterDomainStep from 'calypso/components/domains/register-domain-step'; | ||
import ReskinSideExplainer from 'calypso/components/domains/reskin-side-explainer'; | ||
import FormattedHeader from 'calypso/components/formatted-header'; | ||
import { ONBOARD_STORE, PRODUCTS_LIST_STORE } from 'calypso/landing/stepper/stores'; | ||
import { recordTracksEvent } from 'calypso/lib/analytics/tracks'; | ||
import CalypsoShoppingCartProvider from 'calypso/my-sites/checkout/calypso-shopping-cart-provider'; | ||
import { SenseiStepContainer } from '../components/sensei-step-container'; | ||
import type { Step } from '../../types'; | ||
|
||
import './style.scss'; | ||
|
||
const SenseiDomain: Step = ( { navigation } ) => { | ||
const { submit } = navigation; | ||
const { __ } = useI18n(); | ||
const [ siteTitle, domain, productsList ] = useSelect( ( select ) => { | ||
return [ | ||
select( ONBOARD_STORE ).getSelectedSiteTitle(), | ||
select( ONBOARD_STORE ).getSelectedDomain(), | ||
select( PRODUCTS_LIST_STORE ).getProductsList(), | ||
]; | ||
} ); | ||
const { setDomain } = useDispatch( ONBOARD_STORE ); | ||
|
||
const onSkip = () => { | ||
setDomain( domain ); | ||
submit?.( { domain: domain } ); | ||
}; | ||
|
||
const onAddDomain = ( selectedDomain: typeof domain ) => { | ||
setDomain( selectedDomain ); | ||
submit?.( { domain: selectedDomain } ); | ||
}; | ||
|
||
const domainSuggestion = domain?.domain_name ?? siteTitle; | ||
|
||
return ( | ||
<SenseiStepContainer stepName="senseiDomain" recordTracksEvent={ recordTracksEvent }> | ||
<CalypsoShoppingCartProvider> | ||
<FormattedHeader | ||
id="choose-a-domain-header" | ||
headerText="Choose a domain" | ||
subHeaderText={ | ||
<> | ||
{ __( 'Make your course site shine with a custom domain. Not sure yet ?' ) } | ||
<button | ||
className="button navigation-link step-container__navigation-link has-underline is-borderless" | ||
onClick={ onSkip } | ||
> | ||
{ __( 'Decide later.' ) } | ||
</button> | ||
</> | ||
} | ||
align="center" | ||
/> | ||
<div className="container domains__step-content domains__step-content-domain-step"> | ||
<RegisterDomainStep | ||
vendor="sensei" | ||
key="domainForm" | ||
suggestion={ domainSuggestion } | ||
domainsWithPlansOnly={ true } | ||
isSignupStep={ true } | ||
includeWordPressDotCom | ||
onAddDomain={ onAddDomain } | ||
onSkip={ onSkip } | ||
products={ productsList } | ||
useProvidedProductsList | ||
align="left" | ||
isWideLayout={ true } | ||
basePath="" | ||
/> | ||
<div className="domains__domain-side-content-container"> | ||
<div className="domains__domain-side-content domains__free-domain"> | ||
<ReskinSideExplainer onClick={ onSkip } type="free-domain-explainer" /> | ||
</div> | ||
<div className="domains__domain-side-content"> | ||
<ReskinSideExplainer onClick={ onSkip } type="use-your-domain" /> | ||
</div> | ||
</div> | ||
</div> | ||
</CalypsoShoppingCartProvider> | ||
</SenseiStepContainer> | ||
); | ||
}; | ||
|
||
export default SenseiDomain; |
Oops, something went wrong.