Skip to content

Commit

Permalink
Merge pull request Sage-Bionetworks#1232 from jay-hodgson/SWC-7087
Browse files Browse the repository at this point in the history
SWC-7087: add Synapse Plans Page
  • Loading branch information
jay-hodgson committed Sep 24, 2024
2 parents d77fc4c + 7bb42f7 commit 0754c00
Show file tree
Hide file tree
Showing 10 changed files with 272 additions and 83 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { ReactComponent as Facebook } from '../../assets/homepage/facebook.svg'
import { ReactComponent as Instagram } from '../../assets/homepage/instagram.svg'
import { ReactComponent as Youtube } from '../../assets/homepage/youtube.svg'
import ExperimentalMode from '../ExperimentalMode'
import { PLANS_LINK } from '../SynapseHomepageV2/SynapseHomepageNavBar'

export type SynapseFooterProps = {
portalVersion: string
Expand Down Expand Up @@ -112,9 +113,10 @@ export const SynapseFooter: React.FunctionComponent<SynapseFooterProps> = ({
},
},
{
text: 'Pricing',
text: 'Plans',
props: {
href: 'https://help.synapse.org/docs/Sage-Offerings.2965078125.html',
href: PLANS_LINK,
target: '_self',
},
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ import { useSynapseContext } from '../../utils'
import SageResourcesPopover from '../SageResourcesPopover'

const LOGIN_LINK = '/LoginPlace:0'
const HOMEPAGE_LINK = '/Home:x'
export const PLANS_LINK = '/Plans:0'
const DASHBOARD_LINK = '/Profile:v/projects/all'

const navTextButtonSx: SxProps = {
Expand Down Expand Up @@ -99,9 +101,11 @@ export const SynapseHomepageNavBar: React.FunctionComponent<
}}
>
{/* Logo */}
<SynapseFullLogo
textColor={(theme.palette.primary as ColorPartial)[900]!}
/>
<a onClick={() => gotoPlace(HOMEPAGE_LINK)}>
<SynapseFullLogo
textColor={(theme.palette.primary as ColorPartial)[900]!}
/>
</a>
{/* Menu Items */}
{/* Desktop nav bar, and a mobile hamburger dropdown menu nav bar that contain the same options */}
{!isSmallView && (
Expand All @@ -113,6 +117,9 @@ export const SynapseHomepageNavBar: React.FunctionComponent<
gap: '20px',
}}
>
<Button sx={navTextButtonSx} onClick={() => gotoPlace(PLANS_LINK)}>
Plans
</Button>
<Button
sx={navTextButtonSx}
onClick={event => setPortalResourcesAnchorEl(event.currentTarget)}
Expand Down Expand Up @@ -226,6 +233,14 @@ export const SynapseHomepageNavBar: React.FunctionComponent<
</IconButton>
<StyledMenuItem
sx={{ mt: '70px' }}
onClick={() => {
gotoPlace(PLANS_LINK)
handleCloseMobileMenu()
}}
>
Plans
</StyledMenuItem>
<StyledMenuItem
onClick={event => {
setPortalResourcesAnchorEl(event.currentTarget)
handleCloseMobileMenu()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const homepageBodyText: SxProps = {
color: darkTextColor,
}

const h2Sx: SxProps = {
export const h2Sx: SxProps = {
fontSize: {
xs: '36px',
md: '52px',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,14 @@ import { useOneSageURL } from '../../utils/hooks'
export const SynapsePlans: React.FunctionComponent = () => {
const registrationUrl = useOneSageURL('/register1')
return (
<Box sx={{ display: 'flex', flexWrap: 'wrap', gap: '20px' }}>
<Box
sx={{
display: 'flex',
flexWrap: 'wrap',
gap: '20px',
justifyContent: 'center',
}}
>
<SynapsePlan
title="Free"
description="Our basic plan"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { Meta, StoryObj } from '@storybook/react'
import { SynapsePlansPage } from './SynapsePlansPage'
import { fn } from '@storybook/test'

const meta = {
title: 'Synapse/HomePage',
component: SynapsePlansPage,
parameters: {
chromatic: { viewports: [600, 1200] },
},
} satisfies Meta
export default meta
type Story = StoryObj<typeof meta>

export const DemoPlansPage: Story = {
args: {
gotoPlace: (_href: string) => fn(),
},
parameters: {
stack: 'production',
design: {
type: 'figma',
url: 'https://www.figma.com/design/7VDfcWetBp5UOENeH50Lzv/Managed-Plan-Scenarios?node-id=1-5840&node-type=frame&m=dev',
},
msw: {
handlers: [],
},
},
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
import React from 'react'
import { Box, Button, Typography } from '@mui/material'
import { SynapsePlans } from './SynapsePlans'
import { SynapseHomepageNavBar } from './SynapseHomepageNavBar'
import { h2Sx, homepageBodyText } from './SynapseHomepageV2'

export type SynapsePlansPageProps = {
gotoPlace: (href: string) => void
}

export const SynapsePlansPage: React.FunctionComponent<
SynapsePlansPageProps
> = ({ gotoPlace }) => {
return (
<Box sx={{ overflow: 'hidden' }}>
<Box
sx={{
boxShadow: '0px 2px 8px 0px rgba(0, 0, 0, 0.15)',
}}
>
<SynapseHomepageNavBar gotoPlace={gotoPlace} />
</Box>

<Box
sx={{
textAlign: 'center',
p: {
xs: '30px',
lg: '64px 0px',
},
}}
>
<Box sx={{ maxWidth: '900px', m: 'auto' }}>
<Typography variant="headline1" sx={h2Sx}>
Explore Synapse plans
</Typography>
<Typography
variant="body1"
sx={{
...homepageBodyText,
pt: {
xs: '20px',
md: '48px',
},
}}
>
Sage offers multiple service plans to help you with your data
sharing needs including NIH Data Management and Sharing plans.
</Typography>
</Box>
<Box sx={{ py: { xs: '30px', md: '60px' } }}>
<SynapsePlans />
</Box>
</Box>
<Box
sx={{
textAlign: 'center',
p: {
xs: '40px',
lg: '60px 0px',
},
backgroundColor: '#172430',
}}
>
<Box sx={{ maxWidth: '780px', m: 'auto' }}>
<Typography
variant="headline1"
sx={{
fontSize: { xs: '32px', md: '40px' },
fontWeight: 600,
color: 'white',
lineHeight: { xs: '34px', md: '45px' },
}}
>
Synapse gives you the tools to make your data discoverable
</Typography>
</Box>
<Box sx={{ maxWidth: '900px', m: 'auto' }}>
<Typography
variant="body1"
sx={{
...homepageBodyText,
color: 'white',
pt: '48px',
pb: '44px',
}}
>
Working on a grant proposal? Curious about what Synapse can do for
you? Learn more about our plans and see which one is right for you.
</Typography>
<Button
size="large"
variant="contained"
color="light"
href="https://sagebionetworks.jira.com/servicedesk/customer/portal/9"
target="_blank"
sx={{
p: '5px 25px',
width: {
xs: '100%',
md: 'auto',
},
}}
>
Contact us for more information
</Button>
</Box>
</Box>
</Box>
)
}

export default SynapsePlansPage
Loading

0 comments on commit 0754c00

Please sign in to comment.