mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	fix: interactive demo guide adjustments (#3747)
https://linear.app/unleash/issue/2-1027/adjustments https://linear.app/unleash/issue/2-989/add-imagegif-to-some-of-the-steps Includes small adjustments from the tasks above: - Adjust zIndex values for the demo guide; - Add a screenshot to better guide the users to their `userId` in the demo website; Relates to [roadmap](https://github.com/orgs/Unleash/projects/10) item: #3537
This commit is contained in:
		
							parent
							
								
									534e1f1378
								
							
						
					
					
						commit
						b8171cf909
					
				
							
								
								
									
										
											BIN
										
									
								
								frontend/src/assets/img/userId-image.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								frontend/src/assets/img/userId-image.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 6.2 KiB | 
| @ -75,12 +75,19 @@ export const Demo = ({ children }: IDemoProps): JSX.Element => { | |||||||
|         }); |         }); | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|  |     const closeGuide = () => { | ||||||
|  |         setTopic(-1); | ||||||
|  |         setStep(0); | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|     if (!uiConfig.flags.demo) return children; |     if (!uiConfig.flags.demo) return children; | ||||||
| 
 | 
 | ||||||
|     return ( |     return ( | ||||||
|         <> |         <> | ||||||
|             <DemoBanner |             <DemoBanner | ||||||
|                 onPlans={() => { |                 onPlans={() => { | ||||||
|  |                     closeGuide(); | ||||||
|  | 
 | ||||||
|                     setPlansOpen(true); |                     setPlansOpen(true); | ||||||
| 
 | 
 | ||||||
|                     trackEvent('demo', { |                     trackEvent('demo', { | ||||||
| @ -154,6 +161,8 @@ export const Demo = ({ children }: IDemoProps): JSX.Element => { | |||||||
|                 }} |                 }} | ||||||
|                 topics={TOPICS} |                 topics={TOPICS} | ||||||
|                 onWelcome={() => { |                 onWelcome={() => { | ||||||
|  |                     closeGuide(); | ||||||
|  | 
 | ||||||
|                     setWelcomeOpen(true); |                     setWelcomeOpen(true); | ||||||
| 
 | 
 | ||||||
|                     trackEvent('demo', { |                     trackEvent('demo', { | ||||||
|  | |||||||
| @ -4,7 +4,7 @@ import { usePlausibleTracker } from 'hooks/usePlausibleTracker'; | |||||||
| const StyledBanner = styled('div')(({ theme }) => ({ | const StyledBanner = styled('div')(({ theme }) => ({ | ||||||
|     position: 'sticky', |     position: 'sticky', | ||||||
|     top: 0, |     top: 0, | ||||||
|     zIndex: theme.zIndex.appBar, |     zIndex: theme.zIndex.sticky, | ||||||
|     display: 'flex', |     display: 'flex', | ||||||
|     gap: theme.spacing(1), |     gap: theme.spacing(1), | ||||||
|     justifyContent: 'center', |     justifyContent: 'center', | ||||||
|  | |||||||
| @ -255,7 +255,7 @@ export const DemoSteps = ({ | |||||||
|             styles={{ |             styles={{ | ||||||
|                 options: { |                 options: { | ||||||
|                     arrowColor: theme.palette.background.paper, |                     arrowColor: theme.palette.background.paper, | ||||||
|                     zIndex: theme.zIndex.snackbar, |                     zIndex: theme.zIndex.snackbar - 1, | ||||||
|                 }, |                 }, | ||||||
|                 spotlight: { |                 spotlight: { | ||||||
|                     borderRadius: theme.shape.borderRadiusMedium, |                     borderRadius: theme.shape.borderRadiusMedium, | ||||||
|  | |||||||
| @ -20,7 +20,7 @@ const StyledAccordion = styled(Accordion)(({ theme }) => ({ | |||||||
|     left: 0, |     left: 0, | ||||||
|     width: '100%', |     width: '100%', | ||||||
|     maxWidth: theme.spacing(30), |     maxWidth: theme.spacing(30), | ||||||
|     zIndex: theme.zIndex.fab, |     zIndex: theme.zIndex.sticky, | ||||||
|     boxShadow: theme.boxShadows.popup, |     boxShadow: theme.boxShadows.popup, | ||||||
|     '&&&': { |     '&&&': { | ||||||
|         borderRadius: 0, |         borderRadius: 0, | ||||||
|  | |||||||
| @ -1,9 +1,10 @@ | |||||||
| import { Typography, TypographyProps } from '@mui/material'; | import { Typography, TypographyProps, styled } from '@mui/material'; | ||||||
| import InfoOutlinedIcon from '@mui/icons-material/InfoOutlined'; | import InfoOutlinedIcon from '@mui/icons-material/InfoOutlined'; | ||||||
| import { Badge } from 'component/common/Badge/Badge'; | import { Badge } from 'component/common/Badge/Badge'; | ||||||
| import { Step } from 'react-joyride'; | import { Step } from 'react-joyride'; | ||||||
| import { gradualRollout, variants } from './demo-setup'; | import { gradualRollout, variants } from './demo-setup'; | ||||||
| import { basePath } from 'utils/formatPath'; | import { basePath } from 'utils/formatPath'; | ||||||
|  | import userIdImage from 'assets/img/userId-image.png'; | ||||||
| 
 | 
 | ||||||
| export interface ITutorialTopicStep extends Step { | export interface ITutorialTopicStep extends Step { | ||||||
|     href?: string; |     href?: string; | ||||||
| @ -27,6 +28,10 @@ const Description = (props: TypographyProps) => ( | |||||||
|     <Typography variant="body2" color="text.secondary" {...props} /> |     <Typography variant="body2" color="text.secondary" {...props} /> | ||||||
| ); | ); | ||||||
| 
 | 
 | ||||||
|  | const StyledImg = styled('img')(({ theme }) => ({ | ||||||
|  |     borderRadius: theme.shape.borderRadius, | ||||||
|  | })); | ||||||
|  | 
 | ||||||
| const PROJECT = 'demo-app'; | const PROJECT = 'demo-app'; | ||||||
| const ENVIRONMENT = 'dev'; | const ENVIRONMENT = 'dev'; | ||||||
| 
 | 
 | ||||||
| @ -208,15 +213,23 @@ export const TOPICS: ITutorialTopic[] = [ | |||||||
|                         <Description> |                         <Description> | ||||||
|                             Enter your <Badge as="span">userId</Badge> |                             Enter your <Badge as="span">userId</Badge> | ||||||
|                         </Description> |                         </Description> | ||||||
|                         <Badge sx={{ mt: 2 }} icon={<InfoOutlinedIcon />}> |                         <Badge | ||||||
|  |                             sx={{ mt: 2, mb: 1, width: '100%' }} | ||||||
|  |                             icon={<InfoOutlinedIcon />} | ||||||
|  |                         > | ||||||
|                             You can find your userId on the demo page. |                             You can find your userId on the demo page. | ||||||
|                         </Badge> |                         </Badge> | ||||||
|  |                         <StyledImg | ||||||
|  |                             src={userIdImage} | ||||||
|  |                             alt="You can find your userId on the demo page." | ||||||
|  |                         /> | ||||||
|                         <Description sx={{ mt: 1 }}> |                         <Description sx={{ mt: 1 }}> | ||||||
|                             When you're done, use the "Next" button in the |                             When you're done, use the "Next" button in the | ||||||
|                             dialog. |                             dialog. | ||||||
|                         </Description> |                         </Description> | ||||||
|                     </> |                     </> | ||||||
|                 ), |                 ), | ||||||
|  |                 placement: 'right', | ||||||
|                 nextButton: true, |                 nextButton: true, | ||||||
|                 focus: 'input', |                 focus: 'input', | ||||||
|             }, |             }, | ||||||
| @ -547,15 +560,23 @@ export const TOPICS: ITutorialTopic[] = [ | |||||||
|                         <Description> |                         <Description> | ||||||
|                             Enter your <Badge as="span">userId</Badge> |                             Enter your <Badge as="span">userId</Badge> | ||||||
|                         </Description> |                         </Description> | ||||||
|                         <Badge sx={{ mt: 2 }} icon={<InfoOutlinedIcon />}> |                         <Badge | ||||||
|  |                             sx={{ mt: 2, mb: 1, width: '100%' }} | ||||||
|  |                             icon={<InfoOutlinedIcon />} | ||||||
|  |                         > | ||||||
|                             You can find your userId on the demo page. |                             You can find your userId on the demo page. | ||||||
|                         </Badge> |                         </Badge> | ||||||
|  |                         <StyledImg | ||||||
|  |                             src={userIdImage} | ||||||
|  |                             alt="You can find your userId on the demo page." | ||||||
|  |                         /> | ||||||
|                         <Description sx={{ mt: 1 }}> |                         <Description sx={{ mt: 1 }}> | ||||||
|                             When you're done, use the "Next" button in the |                             When you're done, use the "Next" button in the | ||||||
|                             dialog. |                             dialog. | ||||||
|                         </Description> |                         </Description> | ||||||
|                     </> |                     </> | ||||||
|                 ), |                 ), | ||||||
|  |                 placement: 'right', | ||||||
|                 nextButton: true, |                 nextButton: true, | ||||||
|                 backCloseModal: true, |                 backCloseModal: true, | ||||||
|                 focus: 'input', |                 focus: 'input', | ||||||
|  | |||||||
| @ -72,6 +72,9 @@ const theme = { | |||||||
|         tableRowHeightCompact: 56, |         tableRowHeightCompact: 56, | ||||||
|         tableRowHeightDense: 48, |         tableRowHeightDense: 48, | ||||||
|     }, |     }, | ||||||
|  |     zIndex: { | ||||||
|  |         sticky: 2000, | ||||||
|  |     }, | ||||||
| 
 | 
 | ||||||
|     palette: { |     palette: { | ||||||
|         common: { |         common: { | ||||||
|  | |||||||
| @ -65,6 +65,9 @@ const theme = { | |||||||
|         tableRowHeightCompact: 56, |         tableRowHeightCompact: 56, | ||||||
|         tableRowHeightDense: 48, |         tableRowHeightDense: 48, | ||||||
|     }, |     }, | ||||||
|  |     zIndex: { | ||||||
|  |         sticky: 2000, | ||||||
|  |     }, | ||||||
| 
 | 
 | ||||||
|     palette: { |     palette: { | ||||||
|         common: { |         common: { | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user