diff options
author | Wouter Admiraal <wouter.admiraal@sonarsource.com> | 2022-09-01 13:56:24 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2022-09-01 20:03:03 +0000 |
commit | 1efc533bdf465a1a8f94a3d2a407049fe85ce680 (patch) | |
tree | 51b938b581443487685d2043350ed884ea77c224 | |
parent | f805fcade6380af18ac0f37a8c0c08dad99592ed (diff) | |
download | sonarqube-1efc533bdf465a1a8f94a3d2a407049fe85ce680.tar.gz sonarqube-1efc533bdf465a1a8f94a3d2a407049fe85ce680.zip |
[NO JIRA] Align duplication and coverage icons with new colors
3 files changed, 13 insertions, 13 deletions
diff --git a/server/sonar-web/src/main/js/components/ui/CoverageRating.tsx b/server/sonar-web/src/main/js/components/ui/CoverageRating.tsx index cad8dfba2f9..e928884c689 100644 --- a/server/sonar-web/src/main/js/components/ui/CoverageRating.tsx +++ b/server/sonar-web/src/main/js/components/ui/CoverageRating.tsx @@ -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 diff --git a/server/sonar-web/src/main/js/components/ui/DuplicationsRating.css b/server/sonar-web/src/main/js/components/ui/DuplicationsRating.css index d5b24f7c8b1..1335b21ca15 100644 --- a/server/sonar-web/src/main/js/components/ui/DuplicationsRating.css +++ b/server/sonar-web/src/main/js/components/ui/DuplicationsRating.css @@ -63,7 +63,7 @@ } .duplications-rating-A { - border-color: var(--green); + border-color: var(--success500); } .duplications-rating-A:after { @@ -71,13 +71,13 @@ } .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 { @@ -96,13 +96,13 @@ } .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 { @@ -121,13 +121,13 @@ } .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 { @@ -146,13 +146,13 @@ } .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 { diff --git a/server/sonar-web/src/main/js/components/ui/__tests__/__snapshots__/CoverageRating-test.tsx.snap b/server/sonar-web/src/main/js/components/ui/__tests__/__snapshots__/CoverageRating-test.tsx.snap index e99f960c29e..1da133e8db5 100644 --- a/server/sonar-web/src/main/js/components/ui/__tests__/__snapshots__/CoverageRating-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/ui/__tests__/__snapshots__/CoverageRating-test.tsx.snap @@ -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, }, ] |