1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-08-09 13:47:13 +02:00

chore: update ux styling for lifecycle charts (#10481)

Some small ux tweaks to lifecycle charts.


1. Removed vertical lines
2. Styled the legend to have round dots, not square.
<img width="1891" height="656" alt="image"
src="https://github.com/user-attachments/assets/b2c09085-7a2e-4e14-92e0-b3e83edf201d"
/>
This commit is contained in:
Jaanus Sellin 2025-08-08 10:25:58 +03:00 committed by GitHub
parent 937cba4c1a
commit e43cdcf034
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 2 deletions

View File

@ -193,6 +193,10 @@ export const CreationArchiveChart: FC<ICreationArchiveChartProps> = ({
legend: {
position: 'bottom' as const,
labels: {
color: theme.palette.text.secondary,
usePointStyle: true,
padding: 21,
boxHeight: 8,
filter: (legendItem) => {
return !flagTypeNames.includes(
legendItem.text || '',
@ -234,6 +238,7 @@ export const CreationArchiveChart: FC<ICreationArchiveChartProps> = ({
scales: {
x: {
type: 'time',
display: false,
time: {
unit: 'week',
tooltipFormat: 'PPP',

View File

@ -1,11 +1,12 @@
import type { FC } from 'react';
import { Box, Typography, Link, styled } from '@mui/material';
import { Box, Typography, styled } from '@mui/material';
import { HelpIcon } from 'component/common/HelpIcon/HelpIcon';
import InfoOutlined from '@mui/icons-material/InfoOutlined';
import Lightbulb from '@mui/icons-material/LightbulbOutlined';
import { StatsExplanation } from 'component/insights/InsightsCharts.styles';
import type { GroupedDataByProject } from 'component/insights/hooks/useGroupedProjectTrends';
import type { InstanceInsightsSchema } from 'openapi';
import { Link } from 'react-router-dom';
function getCurrentArchiveRatio(
groupedCreationArchiveData: GroupedDataByProject<
@ -72,6 +73,7 @@ const StyledLink = styled(Link)(({ theme }) => ({
'&:hover': {
textDecoration: 'underline',
},
fontSize: theme.spacing(1.75),
}));
interface CreationArchiveStatsProps {
@ -105,7 +107,7 @@ export const CreationArchiveStats: FC<CreationArchiveStatsProps> = ({
Do you create more flags than you archive? Or do you have good
process for cleaning up?
</StatsExplanation>
<StyledLink href='/search?lifecycle=IS:completed' variant='body2'>
<StyledLink to='/search?lifecycle=IS:completed'>
View flags in cleanup stage
</StyledLink>
</>