mirror of
https://github.com/Unleash/unleash.git
synced 2025-07-21 13:47:39 +02:00
feat: rename health insights to technical debt insights on dashboard (#10082)
This commit is contained in:
parent
7f14cc2c3d
commit
c8933cc8e6
@ -65,8 +65,29 @@ const ProjectHealthMessage: FC<{
|
|||||||
: 'Remember to archive your stale feature flags to keep the project health growing.';
|
: 'Remember to archive your stale feature flags to keep the project health growing.';
|
||||||
const keepDoingMessage =
|
const keepDoingMessage =
|
||||||
'This indicates that you are doing a good job of archiving your feature flags.';
|
'This indicates that you are doing a good job of archiving your feature flags.';
|
||||||
|
const avgCurrentTechnicalDebt = 100 - (avgHealthCurrentWindow ?? 0);
|
||||||
|
const avgPastTechnicalDebt = 100 - (avgHealthPastWindow ?? 0);
|
||||||
|
|
||||||
if (trend === 'improved') {
|
if (trend === 'improved') {
|
||||||
|
if (healthToTechDebtEnabled) {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Typography>
|
||||||
|
On average, your project technical debt went down from{' '}
|
||||||
|
<PercentageScore>
|
||||||
|
{avgPastTechnicalDebt}%
|
||||||
|
</PercentageScore>{' '}
|
||||||
|
to{' '}
|
||||||
|
<PercentageScore>
|
||||||
|
{avgCurrentTechnicalDebt}%
|
||||||
|
</PercentageScore>{' '}
|
||||||
|
during the last 4 weeks.
|
||||||
|
</Typography>
|
||||||
|
<Typography>{keepDoingMessage}</Typography>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Typography>
|
<Typography>
|
||||||
@ -81,6 +102,25 @@ const ProjectHealthMessage: FC<{
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (trend === 'declined') {
|
if (trend === 'declined') {
|
||||||
|
if (healthToTechDebtEnabled) {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Typography>
|
||||||
|
On average, your project technical debt went up from{' '}
|
||||||
|
<PercentageScore>
|
||||||
|
{avgPastTechnicalDebt}%
|
||||||
|
</PercentageScore>{' '}
|
||||||
|
to{' '}
|
||||||
|
<PercentageScore>
|
||||||
|
{avgCurrentTechnicalDebt}%
|
||||||
|
</PercentageScore>{' '}
|
||||||
|
during the last 4 weeks.
|
||||||
|
</Typography>
|
||||||
|
<Typography>{improveMessage}</Typography>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Typography>
|
<Typography>
|
||||||
@ -95,6 +135,21 @@ const ProjectHealthMessage: FC<{
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (trend === 'consistent') {
|
if (trend === 'consistent') {
|
||||||
|
if (healthToTechDebtEnabled) {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Typography>
|
||||||
|
On average, your project technical debt has remained at{' '}
|
||||||
|
<PercentageScore>
|
||||||
|
{avgCurrentTechnicalDebt}%
|
||||||
|
</PercentageScore>{' '}
|
||||||
|
during the last 4 weeks.
|
||||||
|
</Typography>
|
||||||
|
<Typography>{keepDoingMessage}</Typography>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Typography>
|
<Typography>
|
||||||
@ -112,6 +167,21 @@ const ProjectHealthMessage: FC<{
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (trend === 'unknown') {
|
if (trend === 'unknown') {
|
||||||
|
if (healthToTechDebtEnabled) {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Typography>
|
||||||
|
Your current project technical debt is{' '}
|
||||||
|
<PercentageScore>
|
||||||
|
{avgCurrentTechnicalDebt}%
|
||||||
|
</PercentageScore>
|
||||||
|
.
|
||||||
|
</Typography>
|
||||||
|
<Typography>{improveMessage}</Typography>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Typography>
|
<Typography>
|
||||||
@ -132,6 +202,7 @@ export const ProjectSetupComplete: FC<{
|
|||||||
project: string;
|
project: string;
|
||||||
insights: PersonalDashboardProjectDetailsSchemaInsights;
|
insights: PersonalDashboardProjectDetailsSchemaInsights;
|
||||||
}> = ({ project, insights }) => {
|
}> = ({ project, insights }) => {
|
||||||
|
const healthToTechDebtEnabled = useFlag('healthToTechDebt');
|
||||||
const projectHealthTrend = determineProjectHealthTrend(insights);
|
const projectHealthTrend = determineProjectHealthTrend(insights);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -140,7 +211,9 @@ export const ProjectSetupComplete: FC<{
|
|||||||
<>
|
<>
|
||||||
<Lightbulb color='primary' />
|
<Lightbulb color='primary' />
|
||||||
<Typography sx={{ fontWeight: 'bold' }} component='h4'>
|
<Typography sx={{ fontWeight: 'bold' }} component='h4'>
|
||||||
Project health
|
{healthToTechDebtEnabled
|
||||||
|
? 'Technical debt'
|
||||||
|
: 'Project health'}
|
||||||
</Typography>
|
</Typography>
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user