-
-
Notifications
You must be signed in to change notification settings - Fork 723
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: release plans small misc improvements (#8879)
https://linear.app/unleash/issue/2-3038/release-plans-misc-ux-improvements Includes various UX improvements focused on release plans: - **New milestone status:** Introduced a "Paused" status for milestones. A milestone is marked as "Paused" when it is active but the associated environment is disabled. - **Status display:** Paused milestones are labeled as "Paused (disabled in environment)" for clarity. - **Styling cleanup:** Removed unused disabled styling in the release plan component. - **Accordion stability:** Fixed visual shifting in milestone accordions when toggling. - **Strategy count:** Updated the "View Strategies" label to reflect the total number of strategies in the milestone. - **Edge case handling:** Improved rendering for milestones without strategies. - **Component extraction:** Refactored milestone status into a standalone component. - **Component organization:** Grouped milestone-specific components under a `ReleasePlanMilestone` parent folder. - **Template card cursor enhancement:** Set the cursor on the template card to "pointer", so we better reflect the interactivity of the element. - **Template card created by enhancement:** Added an avatar for the "Created by" field in release plan template cards, replacing the creator's ID. - **Navigation improvement:** After creating or editing a release plan template, users are now redirected back to the release management page. ![image](https://github.com/user-attachments/assets/b0717dc6-3049-4612-9b46-f37a4fa887a3) ![image](https://github.com/user-attachments/assets/a17daafa-f961-4269-9522-39769912752c)
- Loading branch information
Showing
9 changed files
with
147 additions
and
81 deletions.
There are no files selected for viewing
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
78 changes: 78 additions & 0 deletions
78
...atureView/FeatureOverview/ReleasePlan/ReleasePlanMilestone/ReleasePlanMilestoneStatus.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,78 @@ | ||
import { Link, styled } from '@mui/material'; | ||
import PlayCircleIcon from '@mui/icons-material/PlayCircle'; | ||
import PauseCircleIcon from '@mui/icons-material/PauseCircle'; | ||
import TripOriginIcon from '@mui/icons-material/TripOrigin'; | ||
|
||
export type MilestoneStatus = 'not-started' | 'active' | 'paused' | 'completed'; | ||
|
||
const StyledStatus = styled('div', { | ||
shouldForwardProp: (prop) => prop !== 'status', | ||
})<{ status: MilestoneStatus }>(({ theme, status }) => ({ | ||
display: 'flex', | ||
alignItems: 'center', | ||
gap: theme.spacing(1), | ||
paddingRight: theme.spacing(1), | ||
fontSize: theme.fontSizes.smallerBody, | ||
borderRadius: theme.shape.borderRadiusMedium, | ||
backgroundColor: | ||
status === 'active' ? theme.palette.success.light : 'transparent', | ||
color: | ||
status === 'active' | ||
? theme.palette.success.contrastText | ||
: status === 'completed' | ||
? theme.palette.text.secondary | ||
: theme.palette.text.primary, | ||
'& svg': { | ||
color: | ||
status === 'active' | ||
? theme.palette.success.main | ||
: status === 'paused' | ||
? theme.palette.text.disabled | ||
: status === 'completed' | ||
? theme.palette.neutral.border | ||
: theme.palette.primary.main, | ||
}, | ||
})); | ||
|
||
interface IReleasePlanMilestoneStatusProps { | ||
status: MilestoneStatus; | ||
onStartMilestone: () => void; | ||
} | ||
|
||
export const ReleasePlanMilestoneStatus = ({ | ||
status, | ||
onStartMilestone, | ||
}: IReleasePlanMilestoneStatusProps) => { | ||
const statusText = | ||
status === 'active' | ||
? 'Running' | ||
: status === 'paused' | ||
? 'Paused (disabled in environment)' | ||
: status === 'completed' | ||
? 'Restart' | ||
: 'Start'; | ||
|
||
return ( | ||
<StyledStatus status={status}> | ||
{status === 'active' ? ( | ||
<TripOriginIcon /> | ||
) : status === 'paused' ? ( | ||
<PauseCircleIcon /> | ||
) : ( | ||
<PlayCircleIcon /> | ||
)} | ||
{status === 'not-started' || status === 'completed' ? ( | ||
<Link | ||
onClick={(e) => { | ||
e.stopPropagation(); | ||
onStartMilestone(); | ||
}} | ||
> | ||
{statusText} | ||
</Link> | ||
) : ( | ||
<span>{statusText}</span> | ||
)} | ||
</StyledStatus> | ||
); | ||
}; |
2 changes: 1 addition & 1 deletion
2
...easePlan/ReleasePlanMilestoneStrategy.tsx → ...ilestone/ReleasePlanMilestoneStrategy.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
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