mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	chore: add release management to new in unleash (#9257)
https://linear.app/unleash/issue/2-3244/add-release-management-to-new-in-unleash Adds release management to "New in Unleash". 
This commit is contained in:
		
							parent
							
								
									13ac0567c5
								
							
						
					
					
						commit
						c07fb589a7
					
				
							
								
								
									
										22
									
								
								frontend/src/assets/img/releaseManagementPreview.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								frontend/src/assets/img/releaseManagementPreview.svg
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| After Width: | Height: | Size: 60 KiB | 
| @ -1,4 +1,4 @@ | |||||||
| import { useState, useEffect, useRef } from 'react'; | import { useState, useEffect, useRef, type CSSProperties } from 'react'; | ||||||
| import { | import { | ||||||
|     Box, |     Box, | ||||||
|     type BoxProps, |     type BoxProps, | ||||||
| @ -8,8 +8,9 @@ import { | |||||||
| } from '@mui/material'; | } from '@mui/material'; | ||||||
| 
 | 
 | ||||||
| const StyledTruncatorContainer = styled(Box, { | const StyledTruncatorContainer = styled(Box, { | ||||||
|     shouldForwardProp: (prop) => prop !== 'lines', |     shouldForwardProp: (prop) => prop !== 'lines' && prop !== 'wordBreak', | ||||||
| })<{ lines: number }>(({ lines }) => ({ | })<{ lines: number; wordBreak?: CSSProperties['wordBreak'] }>( | ||||||
|  |     ({ lines, wordBreak = 'break-all' }) => ({ | ||||||
|         lineClamp: `${lines}`, |         lineClamp: `${lines}`, | ||||||
|         WebkitLineClamp: lines, |         WebkitLineClamp: lines, | ||||||
|         display: '-webkit-box', |         display: '-webkit-box', | ||||||
| @ -18,8 +19,9 @@ const StyledTruncatorContainer = styled(Box, { | |||||||
|         overflow: 'hidden', |         overflow: 'hidden', | ||||||
|         alignItems: 'flex-start', |         alignItems: 'flex-start', | ||||||
|         WebkitBoxOrient: 'vertical', |         WebkitBoxOrient: 'vertical', | ||||||
|     wordBreak: 'break-word', |         wordBreak, | ||||||
| })); |     }), | ||||||
|  | ); | ||||||
| 
 | 
 | ||||||
| type OverridableTooltipProps = Omit<TooltipProps, 'children'>; | type OverridableTooltipProps = Omit<TooltipProps, 'children'>; | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -22,6 +22,8 @@ import LifecycleStagesImage from 'assets/img/lifecycle-stages.png'; | |||||||
| import MonitorHeartIcon from '@mui/icons-material/MonitorHeartOutlined'; | import MonitorHeartIcon from '@mui/icons-material/MonitorHeartOutlined'; | ||||||
| import { useNavigate } from 'react-router-dom'; | import { useNavigate } from 'react-router-dom'; | ||||||
| import { formatAssetPath } from 'utils/formatPath'; | import { formatAssetPath } from 'utils/formatPath'; | ||||||
|  | import FactCheckOutlinedIcon from '@mui/icons-material/FactCheckOutlined'; | ||||||
|  | import { ReactComponent as ReleaseManagementPreview } from 'assets/img/releaseManagementPreview.svg'; | ||||||
| 
 | 
 | ||||||
| const StyledNewInUnleash = styled('div')(({ theme }) => ({ | const StyledNewInUnleash = styled('div')(({ theme }) => ({ | ||||||
|     margin: theme.spacing(2, 0, 1, 0), |     margin: theme.spacing(2, 0, 1, 0), | ||||||
| @ -73,6 +75,12 @@ const StyledSignalsIcon = styled(Signals)(({ theme }) => ({ | |||||||
|     color: theme.palette.primary.main, |     color: theme.palette.primary.main, | ||||||
| })); | })); | ||||||
| 
 | 
 | ||||||
|  | const StyledReleaseManagementIcon = styled(FactCheckOutlinedIcon)( | ||||||
|  |     ({ theme }) => ({ | ||||||
|  |         color: theme.palette.primary.main, | ||||||
|  |     }), | ||||||
|  | ); | ||||||
|  | 
 | ||||||
| const StyledImg = styled('img')(() => ({ | const StyledImg = styled('img')(() => ({ | ||||||
|     maxWidth: '100%', |     maxWidth: '100%', | ||||||
| })); | })); | ||||||
| @ -94,6 +102,7 @@ export const NewInUnleash = ({ | |||||||
|     ); |     ); | ||||||
|     const { isEnterprise } = useUiConfig(); |     const { isEnterprise } = useUiConfig(); | ||||||
|     const signalsEnabled = useUiFlag('signals'); |     const signalsEnabled = useUiFlag('signals'); | ||||||
|  |     const releasePlansEnabled = useUiFlag('releasePlans'); | ||||||
| 
 | 
 | ||||||
|     const items: NewInUnleashItemDetails[] = [ |     const items: NewInUnleashItemDetails[] = [ | ||||||
|         { |         { | ||||||
| @ -154,6 +163,27 @@ export const NewInUnleash = ({ | |||||||
|                 </> |                 </> | ||||||
|             ), |             ), | ||||||
|         }, |         }, | ||||||
|  |         { | ||||||
|  |             label: 'Release management', | ||||||
|  |             summary: 'Save time with release plans', | ||||||
|  |             icon: <StyledReleaseManagementIcon />, | ||||||
|  |             preview: <ReleaseManagementPreview />, | ||||||
|  |             onCheckItOut: () => navigate('/release-management'), | ||||||
|  |             show: isEnterprise() && releasePlansEnabled, | ||||||
|  |             longDescription: ( | ||||||
|  |                 <> | ||||||
|  |                     <p> | ||||||
|  |                         Instead of having to set up the same strategies again | ||||||
|  |                         and again, you can now create templates with milestones | ||||||
|  |                         of how you want to rollout features to your users. | ||||||
|  |                     </p> | ||||||
|  |                     <p> | ||||||
|  |                         Once you have set it up, just apply your release plan to | ||||||
|  |                         a flag, and you are ready to rollout! | ||||||
|  |                     </p> | ||||||
|  |                 </> | ||||||
|  |             ), | ||||||
|  |         }, | ||||||
|     ]; |     ]; | ||||||
| 
 | 
 | ||||||
|     const visibleItems = items.filter( |     const visibleItems = items.filter( | ||||||
|  | |||||||
| @ -12,6 +12,7 @@ import Close from '@mui/icons-material/Close'; | |||||||
| import { NewInUnleashTooltip } from './NewInUnleashTooltip'; | import { NewInUnleashTooltip } from './NewInUnleashTooltip'; | ||||||
| import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender'; | import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender'; | ||||||
| import { Badge } from 'component/common/Badge/Badge'; | import { Badge } from 'component/common/Badge/Badge'; | ||||||
|  | import { Truncator } from 'component/common/Truncator/Truncator'; | ||||||
| 
 | 
 | ||||||
| export type NewInUnleashItemDetails = { | export type NewInUnleashItemDetails = { | ||||||
|     label: string; |     label: string; | ||||||
| @ -34,6 +35,10 @@ const StyledItemButton = styled(ListItemButton)(({ theme }) => ({ | |||||||
|     alignItems: 'start', |     alignItems: 'start', | ||||||
|     gap: theme.spacing(1), |     gap: theme.spacing(1), | ||||||
|     fontSize: theme.fontSizes.smallBody, |     fontSize: theme.fontSizes.smallBody, | ||||||
|  |     '& > svg': { | ||||||
|  |         width: theme.spacing(3), | ||||||
|  |         height: theme.spacing(3), | ||||||
|  |     }, | ||||||
| })); | })); | ||||||
| 
 | 
 | ||||||
| const LabelWithSummary = styled('div')(({ theme }) => ({ | const LabelWithSummary = styled('div')(({ theme }) => ({ | ||||||
| @ -114,7 +119,9 @@ export const NewInUnleashItem = ({ | |||||||
|                     <LabelWithSummary> |                     <LabelWithSummary> | ||||||
|                         <StyledItemTitle> |                         <StyledItemTitle> | ||||||
|                             <Typography fontWeight='bold' fontSize='small'> |                             <Typography fontWeight='bold' fontSize='small'> | ||||||
|  |                                 <Truncator title={label} arrow> | ||||||
|                                     {label} |                                     {label} | ||||||
|  |                                 </Truncator> | ||||||
|                             </Typography> |                             </Typography> | ||||||
|                             <ConditionallyRender |                             <ConditionallyRender | ||||||
|                                 condition={beta} |                                 condition={beta} | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user