]> source.dussan.org Git - sonarqube.git/commitdiff
[NO JIRA] Align duplication and coverage icons with new colors
authorWouter Admiraal <wouter.admiraal@sonarsource.com>
Thu, 1 Sep 2022 11:56:24 +0000 (13:56 +0200)
committersonartech <sonartech@sonarsource.com>
Thu, 1 Sep 2022 20:03:03 +0000 (20:03 +0000)
server/sonar-web/src/main/js/components/ui/CoverageRating.tsx
server/sonar-web/src/main/js/components/ui/DuplicationsRating.css
server/sonar-web/src/main/js/components/ui/__tests__/__snapshots__/CoverageRating-test.tsx.snap

index cad8dfba2f9bb8d0ad42694e3beee1682e374ca8..e928884c68932c0bbcf24f5fe409db451744045a 100644 (file)
@@ -45,8 +45,8 @@ export default function CoverageRating({
   if (value != null) {
     const numberValue = Number(value);
     data = [
-      { value: numberValue, fill: muted ? colors.gray71 : colors.green },
-      { value: FULL_PERCENT - numberValue, fill: muted ? 'transparent' : colors.lineCoverageRed }
+      { value: numberValue, fill: muted ? colors.gray71 : colors.success500 },
+      { value: FULL_PERCENT - numberValue, fill: muted ? 'transparent' : colors.error500 }
     ];
     if (numberValue !== 0 && numberValue < FULL_PERCENT) {
       padAngle = 0.1; // Same for all sizes, because it scales automatically
index d5b24f7c8b1333f62e9c367f2b6b1b962a086bec..1335b21ca152e1d8ffd94a88248c0d9a7dbecb7a 100644 (file)
@@ -63,7 +63,7 @@
 }
 
 .duplications-rating-A {
-  border-color: var(--green);
+  border-color: var(--success500);
 }
 
 .duplications-rating-A:after {
 }
 
 .duplications-rating-B {
-  border-color: var(--lightGreen);
+  border-color: var(--successVariant);
 }
 
 .duplications-rating-B:after {
   width: 6px;
   height: 6px;
-  background-color: var(--lightGreen);
+  background-color: var(--successVariant);
 }
 
 .duplications-rating-small.duplications-rating-B:after {
 }
 
 .duplications-rating-C {
-  border-color: var(--yellow);
+  border-color: var(--warningVariant);
 }
 
 .duplications-rating-C:after {
   width: 8px;
   height: 8px;
-  background-color: var(--yellow);
+  background-color: var(--warningVariant);
 }
 
 .duplications-rating-small.duplications-rating-C:after {
 }
 
 .duplications-rating-D {
-  border-color: var(--orange);
+  border-color: var(--warningAccent);
 }
 
 .duplications-rating-D:after {
   width: var(--smallFontSize);
   height: var(--smallFontSize);
-  background-color: var(--orange);
+  background-color: var(--warningAccent);
 }
 
 .duplications-rating-small.duplications-rating-D:after {
 }
 
 .duplications-rating-E {
-  border-color: var(--red);
+  border-color: var(--error500);
 }
 
 .duplications-rating-E:after {
   width: 14px;
   height: 14px;
-  background-color: var(--red);
+  background-color: var(--error500);
 }
 
 .duplications-rating-small.duplications-rating-E:after {
index e99f960c29e3e1c8c661b7b8a079d7b224ba22c0..1da133e8db5b05e60752c7c8141dcc025c3b014a 100644 (file)
@@ -5,11 +5,11 @@ exports[`should render correctly 1`] = `
   data={
     Array [
       Object {
-        "fill": "#00aa00",
+        "fill": "#008A25",
         "value": 25,
       },
       Object {
-        "fill": "#a4030f",
+        "fill": "#D02F3A",
         "value": 75,
       },
     ]