Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: demo ui-ux improvements (#3634)
https://linear.app/unleash/issue/2-914/improve-demo-guide-uiux Includes a big batch of UI/UX improvements, including but not limited to: - Updating steps text; - Improve behavior of intro step dialogs (use normal dialogs); - Improve overall design; - Improve escape key and backdrop click behaviors; - Add plans dialog; - Add sticky demo banner; - Assume `demo-app` project and `dev` environment to better fit our demo instance; - Misc fixes and refactors; Relates to [roadmap](https://github.com/orgs/Unleash/projects/10) item: #3537 ![image](https://user-images.githubusercontent.com/14320932/234637210-1936fd48-ce40-4980-81ae-f1fe64e65545.png)
- Loading branch information
Showing
17 changed files
with
575 additions
and
201 deletions.
There are no files selected for viewing
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,51 @@ | ||
import { Button, styled } from '@mui/material'; | ||
|
||
const StyledBanner = styled('div')(({ theme }) => ({ | ||
position: 'sticky', | ||
top: 0, | ||
zIndex: theme.zIndex.appBar, | ||
display: 'flex', | ||
gap: theme.spacing(1), | ||
justifyContent: 'center', | ||
alignItems: 'center', | ||
backgroundColor: theme.palette.web.main, | ||
color: theme.palette.web.contrastText, | ||
padding: theme.spacing(1), | ||
})); | ||
|
||
const StyledButton = styled(Button)(({ theme }) => ({ | ||
whiteSpace: 'nowrap', | ||
flexShrink: 0, | ||
'&&&': { | ||
fontSize: theme.fontSizes.smallBody, | ||
}, | ||
})); | ||
|
||
const StyledQuestionsButton = styled(StyledButton)(({ theme }) => ({ | ||
color: theme.palette.web.contrastText, | ||
border: `1px solid rgba(255, 255, 255, 0.5)`, | ||
})) as typeof Button; | ||
|
||
interface IDemoBannerProps { | ||
onPlans: () => void; | ||
} | ||
|
||
export const DemoBanner = ({ onPlans }: IDemoBannerProps) => ( | ||
<StyledBanner> | ||
<span> | ||
This is a <strong>demo of Unleash</strong>. Play around as much as | ||
you want. Reach out when you're ready. | ||
</span> | ||
<StyledQuestionsButton | ||
variant="outlined" | ||
sx={{ ml: 1 }} | ||
href="https://slack.unleash.run/" | ||
target="_blank" | ||
> | ||
Ask questions | ||
</StyledQuestionsButton> | ||
<StyledButton variant="contained" color="primary" onClick={onPlans}> | ||
Get Unleash | ||
</StyledButton> | ||
</StyledBanner> | ||
); |
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
130 changes: 130 additions & 0 deletions
130
frontend/src/component/demo/DemoDialog/DemoDialogPlans/DemoDialogPlans.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,130 @@ | ||
import { Button, Typography, styled } from '@mui/material'; | ||
import { DemoDialog } from '../DemoDialog'; | ||
import { GitHub } from '@mui/icons-material'; | ||
import { Launch } from '@mui/icons-material'; | ||
|
||
const StyledDemoDialog = styled(DemoDialog)(({ theme }) => ({ | ||
'& .MuiDialog-paper': { | ||
maxWidth: theme.spacing(120), | ||
}, | ||
})); | ||
|
||
const StyledPlans = styled('div')(({ theme }) => ({ | ||
display: 'grid', | ||
gridTemplateColumns: 'auto auto auto', | ||
gap: theme.spacing(1), | ||
marginTop: theme.spacing(6), | ||
})); | ||
|
||
const StyledPlan = styled('div')(({ theme }) => ({ | ||
display: 'flex', | ||
flexDirection: 'column', | ||
justifyContent: 'space-between', | ||
backgroundColor: theme.palette.background.elevation1, | ||
borderRadius: theme.shape.borderRadiusLarge, | ||
padding: theme.spacing(4, 3), | ||
'& > a': { | ||
whiteSpace: 'nowrap', | ||
}, | ||
height: theme.spacing(34), | ||
width: theme.spacing(34), | ||
})); | ||
|
||
const StyledCompareLink = styled('a')(({ theme }) => ({ | ||
fontSize: theme.fontSizes.mainHeader, | ||
textDecoration: 'none', | ||
'&:hover': { | ||
textDecoration: 'underline', | ||
}, | ||
margin: 'auto', | ||
marginTop: theme.spacing(4), | ||
display: 'inline-flex', | ||
alignItems: 'center', | ||
gap: theme.spacing(1), | ||
'& > svg': { | ||
fontSize: theme.fontSizes.mainHeader, | ||
}, | ||
})); | ||
|
||
interface IDemoDialogPlansProps { | ||
open: boolean; | ||
onClose: () => void; | ||
} | ||
|
||
export const DemoDialogPlans = ({ open, onClose }: IDemoDialogPlansProps) => ( | ||
<StyledDemoDialog open={open} onClose={onClose}> | ||
<DemoDialog.Header>Want to keep going with Unleash?</DemoDialog.Header> | ||
<StyledPlans> | ||
<StyledPlan> | ||
<Typography variant="h5" fontWeight="bold"> | ||
Open Source | ||
</Typography> | ||
<Typography variant="body2" color="textSecondary"> | ||
Self-hosted basic feature management solution | ||
</Typography> | ||
<Typography variant="h6" fontWeight="normal"> | ||
Free | ||
</Typography> | ||
<Button | ||
variant="outlined" | ||
color="primary" | ||
startIcon={<GitHub />} | ||
href="https://github.com/unleash/unleash" | ||
target="_blank" | ||
> | ||
View project on GitHub | ||
</Button> | ||
</StyledPlan> | ||
<StyledPlan> | ||
<Typography variant="h5" fontWeight="bold"> | ||
Pro | ||
</Typography> | ||
<Typography variant="body2" color="textSecondary"> | ||
Free your team to collaborate. We'll do the heavy lifting. | ||
</Typography> | ||
<div> | ||
<Typography variant="h6" fontWeight="normal"> | ||
$80/month | ||
</Typography> | ||
<Typography variant="body2">includes 5 seats</Typography> | ||
</div> | ||
<Button | ||
variant="contained" | ||
color="primary" | ||
href="https://www.getunleash.io/plans/pro" | ||
target="_blank" | ||
> | ||
Start 14-day free trial | ||
</Button> | ||
</StyledPlan> | ||
<StyledPlan> | ||
<Typography variant="h5" fontWeight="bold"> | ||
Enterprise | ||
</Typography> | ||
<Typography variant="body2" color="textSecondary"> | ||
Security, compliance, and development controls for scale. | ||
</Typography> | ||
<div> | ||
<Typography variant="h6" fontWeight="normal"> | ||
Custom | ||
</Typography> | ||
<Typography variant="body2">unlimited seats</Typography> | ||
</div> | ||
<Button | ||
variant="contained" | ||
color="web" | ||
href="https://www.getunleash.io/plans/enterprise" | ||
target="_blank" | ||
> | ||
Contact sales | ||
</Button> | ||
</StyledPlan> | ||
</StyledPlans> | ||
<StyledCompareLink | ||
href="https://www.getunleash.io/plans" | ||
target="_blank" | ||
> | ||
Compare plans <Launch /> | ||
</StyledCompareLink> | ||
</StyledDemoDialog> | ||
); |
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.