]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-18383 Remove QG status (Passed/Failed) from Header
authorguillaume-peoch-sonarsource <guillaume.peoch@sonarsource.com>
Wed, 1 Feb 2023 14:56:12 +0000 (15:56 +0100)
committersonartech <sonartech@sonarsource.com>
Fri, 3 Feb 2023 14:26:01 +0000 (14:26 +0000)
server/sonar-web/src/main/js/apps/overview/branches/QualityGatePanel.tsx
server/sonar-web/src/main/js/apps/overview/branches/QualityGatePanelSection.tsx
server/sonar-web/src/main/js/apps/overview/branches/__tests__/__snapshots__/QualityGatePanel-test.tsx.snap
server/sonar-web/src/main/js/apps/overview/branches/__tests__/__snapshots__/QualityGatePanelSection-test.tsx.snap
server/sonar-web/src/main/js/apps/overview/pullRequests/LargeQualityGateBadge.tsx
server/sonar-web/src/main/js/apps/overview/pullRequests/__tests__/__snapshots__/LargeQualityGateBadge-test.tsx.snap
server/sonar-web/src/main/js/apps/overview/styles.css

index dd41fa73376c77bdd87bbe42431143c547f37bfd..1eab5de6fdfd075c2c239b9739e7d1a39c92771b 100644 (file)
@@ -108,7 +108,9 @@ export function QualityGatePanel(props: QualityGatePanelProps) {
                 success,
               })}
             >
-              <h3 className="big-spacer-bottom huge">{translate('metric.level', overallLevel)}</h3>
+              <div className="big-spacer-bottom huge h3">
+                {translate('metric.level', overallLevel)}
+              </div>
 
               <span className="small">
                 {overallFailedConditionsCount > 0
index fe6547c71757bcc2b658663de75a1844f26b9b5b..faedae61120d6b3f90491b0694a98e8c9cb5bdb5 100644 (file)
@@ -117,13 +117,13 @@ export function QualityGatePanelSection(props: QualityGatePanelSectionProps) {
           onClick={toggle}
         >
           <div className="display-flex-center">
-            <h3
-              className="overview-quality-gate-conditions-project-name text-ellipsis"
+            <div
+              className="overview-quality-gate-conditions-project-name text-ellipsis h3"
               title={qgStatus.name}
             >
               {collapsed ? <ChevronRightIcon /> : <ChevronDownIcon />}
               <span className="spacer-left">{qgStatus.name}</span>
-            </h3>
+            </div>
             {collapsed && displayConditions(qgStatus.failedConditions.length)}
           </div>
         </ButtonPlain>
@@ -148,12 +148,12 @@ export function QualityGatePanelSection(props: QualityGatePanelSectionProps) {
           {newCodeFailedConditions.length > 0 && (
             <>
               {showSectionTitles && (
-                <h4 className="big-padded overview-quality-gate-conditions-section-title">
+                <div className="big-padded overview-quality-gate-conditions-section-title h4">
                   {translateWithParameters(
                     'quality_gates.conditions.new_code_x',
                     newCodeFailedConditions.length.toString()
                   )}
-                </h4>
+                </div>
               )}
               <QualityGateConditions
                 component={qgStatus}
@@ -166,12 +166,12 @@ export function QualityGatePanelSection(props: QualityGatePanelSectionProps) {
           {overallFailedConditions.length > 0 && (
             <>
               {showSectionTitles && (
-                <h4 className="big-padded overview-quality-gate-conditions-section-title">
+                <div className="big-padded overview-quality-gate-conditions-section-title h4">
                   {translateWithParameters(
                     'quality_gates.conditions.overall_code_x',
                     overallFailedConditions.length.toString()
                   )}
-                </h4>
+                </div>
               )}
               <QualityGateConditions
                 component={qgStatus}
index f0dd91c82f5c1bdfb46d34559db815280bc08c21..293440a0cfb0b4be419edbbd9664c61be651da37 100644 (file)
@@ -29,11 +29,11 @@ exports[`should render correctly for applications 1`] = `
     <div
       className="overview-quality-gate-badge-large failed"
     >
-      <h3
-        className="big-spacer-bottom huge"
+      <div
+        className="big-spacer-bottom huge h3"
       >
         metric.level.ERROR
-      </h3>
+      </div>
       <span
         className="small"
       >
@@ -293,11 +293,11 @@ exports[`should render correctly for applications 2`] = `
     <div
       className="overview-quality-gate-badge-large failed"
     >
-      <h3
-        className="big-spacer-bottom huge"
+      <div
+        className="big-spacer-bottom huge h3"
       >
         metric.level.ERROR
-      </h3>
+      </div>
       <span
         className="small"
       >
@@ -464,11 +464,11 @@ exports[`should render correctly for projects 1`] = `
     <div
       className="overview-quality-gate-badge-large failed"
     >
-      <h3
-        className="big-spacer-bottom huge"
+      <div
+        className="big-spacer-bottom huge h3"
       >
         metric.level.ERROR
-      </h3>
+      </div>
       <span
         className="small"
       >
@@ -600,11 +600,11 @@ exports[`should render correctly for projects 2`] = `
     <div
       className="overview-quality-gate-badge-large success"
     >
-      <h3
-        className="big-spacer-bottom huge"
+      <div
+        className="big-spacer-bottom huge h3"
       >
         metric.level.OK
-      </h3>
+      </div>
       <span
         className="small"
       >
@@ -662,11 +662,11 @@ exports[`should render correctly for projects 3`] = `
     <div
       className="overview-quality-gate-badge-large failed"
     >
-      <h3
-        className="big-spacer-bottom huge"
+      <div
+        className="big-spacer-bottom huge h3"
       >
         metric.level.ERROR
-      </h3>
+      </div>
       <span
         className="small"
       >
index 15613e9ec2318beeb6f180aa70b43a4a3fea800b..75b980c3018159ecb3bdd3d1a9c66142f0836d65 100644 (file)
@@ -32,11 +32,11 @@ exports[`should render correctly 1`] = `
       }
     />
   </div>
-  <h4
-    className="big-padded overview-quality-gate-conditions-section-title"
+  <div
+    className="big-padded overview-quality-gate-conditions-section-title h4"
   >
     quality_gates.conditions.new_code_x.1
-  </h4>
+  </div>
   <Memo(QualityGateConditions)
     component={
       {
@@ -123,11 +123,11 @@ exports[`should render correctly 1`] = `
       ]
     }
   />
-  <h4
-    className="big-padded overview-quality-gate-conditions-section-title"
+  <div
+    className="big-padded overview-quality-gate-conditions-section-title h4"
   >
     quality_gates.conditions.overall_code_x.1
-  </h4>
+  </div>
   <Memo(QualityGateConditions)
     component={
       {
@@ -230,8 +230,8 @@ exports[`should render correctly 2`] = `
     <div
       className="display-flex-center"
     >
-      <h3
-        className="overview-quality-gate-conditions-project-name text-ellipsis"
+      <div
+        className="overview-quality-gate-conditions-project-name text-ellipsis h3"
         title="Foo"
       >
         <ChevronDownIcon />
@@ -240,14 +240,14 @@ exports[`should render correctly 2`] = `
         >
           Foo
         </span>
-      </h3>
+      </div>
     </div>
   </ButtonPlain>
-  <h4
-    className="big-padded overview-quality-gate-conditions-section-title"
+  <div
+    className="big-padded overview-quality-gate-conditions-section-title h4"
   >
     quality_gates.conditions.new_code_x.1
-  </h4>
+  </div>
   <Memo(QualityGateConditions)
     component={
       {
@@ -334,11 +334,11 @@ exports[`should render correctly 2`] = `
       ]
     }
   />
-  <h4
-    className="big-padded overview-quality-gate-conditions-section-title"
+  <div
+    className="big-padded overview-quality-gate-conditions-section-title h4"
   >
     quality_gates.conditions.overall_code_x.1
-  </h4>
+  </div>
   <Memo(QualityGateConditions)
     component={
       {
index 31a4e536cd02c061eaa8ab0932abc24179ebc47c..95802c86f0f420e943cb8a55ed90ad6eab786cf7 100644 (file)
@@ -67,7 +67,7 @@ export function LargeQualityGateBadge({ component, level }: Props) {
         </HelpTooltip>
       </div>
       {level !== undefined && (
-        <h3 className="huge-spacer-top huge">{translate('metric.level', level)}</h3>
+        <div className="huge-spacer-top huge h3">{translate('metric.level', level)}</div>
       )}
     </div>
   );
index 5d17f34fe398f463d6e96acbfd3b43f7aef17ed7..04838bb893d138467eb254acdd403225550d8c06 100644 (file)
@@ -38,11 +38,11 @@ exports[`should render correctly for SQ 1`] = `
       />
     </HelpTooltip>
   </div>
-  <h3
-    className="huge-spacer-top huge"
+  <div
+    className="huge-spacer-top huge h3"
   >
     metric.level.ERROR
-  </h3>
+  </div>
 </div>
 `;
 
@@ -84,10 +84,10 @@ exports[`should render correctly for SQ 2`] = `
       />
     </HelpTooltip>
   </div>
-  <h3
-    className="huge-spacer-top huge"
+  <div
+    className="huge-spacer-top huge h3"
   >
     metric.level.OK
-  </h3>
+  </div>
 </div>
 `;
index d06f711df3218d6a9a9ced1006949d4cf91eeac1..19dfba11686c3ec730072c9005f5003a0bc7e05b 100644 (file)
   height: 160px;
 }
 
-.overview-quality-gate-badge-large h3 {
+.overview-quality-gate-badge-large .h3 {
   color: white;
 }