From 1965bd78437531eb63bd166ea8d08dc8e06a1886 Mon Sep 17 00:00:00 2001 From: 7PH Date: Mon, 29 Jan 2024 18:02:36 +0100 Subject: [PATCH] SONAR-21455 Make software quality breakdown card links clickable on their full width --- .../SoftwareImpactMeasureBreakdownCard.tsx | 72 ++++++++++--------- 1 file changed, 37 insertions(+), 35 deletions(-) diff --git a/server/sonar-web/src/main/js/apps/overview/branches/SoftwareImpactMeasureBreakdownCard.tsx b/server/sonar-web/src/main/js/apps/overview/branches/SoftwareImpactMeasureBreakdownCard.tsx index 576d23fbd0d..d07db0ef836 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/SoftwareImpactMeasureBreakdownCard.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/SoftwareImpactMeasureBreakdownCard.tsx @@ -51,17 +51,17 @@ export function SoftwareImpactMeasureBreakdownCard( }); const testId = `software-impact-${softwareQuality}-severity-${severity}`; - const cardClasses = classNames( - 'sw-w-1/3 sw-p-2 sw-rounded-1 sw-text-xs sw-font-semibold sw-select-none sw-flex sw-gap-1 sw-justify-center sw-items-center', - severity, - { - active, - }, - ); + const cardClasses = + 'sw-w-1/3 sw-p-2 sw-rounded-1 sw-text-xs sw-font-semibold sw-select-none sw-flex sw-gap-1 sw-justify-center sw-items-center'; if (!value) { return ( - + - ); @@ -73,33 +73,34 @@ export function SoftwareImpactMeasureBreakdownCard( id: `overview.measures.software_impact.severity.${severity}.tooltip`, })} > - - - {formatMeasure(value, MetricType.ShortInteger)} - - {intl.formatMessage({ - id: `overview.measures.software_impact.severity.${severity}`, - })} - - - + + {formatMeasure(value, MetricType.ShortInteger)} + + {intl.formatMessage({ + id: `overview.measures.software_impact.severity.${severity}`, + })} + + ); } @@ -117,5 +118,6 @@ const StyledBreakdownCard = styled.div` background-color: ${themeColor('overviewSoftwareImpactSeverityLow')}; } `; +const StyledBreakdownLinkCard = StyledBreakdownCard.withComponent(DiscreetLinkBox); export default SoftwareImpactMeasureBreakdownCard; -- 2.39.5