]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-9691 Align size badges on project cards
authorStas Vilchik <stas.vilchik@sonarsource.com>
Thu, 12 Oct 2017 15:00:25 +0000 (17:00 +0200)
committerStas Vilchik <stas.vilchik@sonarsource.com>
Mon, 16 Oct 2017 09:08:02 +0000 (11:08 +0200)
server/sonar-web/src/main/js/apps/projects/components/ProjectCardOverallMeasures.tsx
server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/ProjectCardOverallMeasures-test.tsx.snap

index cdb325a02dde4a35eda2a2a416be5fe26338f63e..8c3cdc978f24d940d473300823818ffd9fcc9f55 100644 (file)
@@ -141,15 +141,15 @@ export default function ProjectCardOverallMeasures({ measures }: Props) {
         <div className="project-card-measure project-card-ncloc" data-key="ncloc">
           <div className="project-card-measure-inner pull-right">
             <div className="project-card-measure-number">
-              <span className="spacer-right">
-                <SizeRating value={Number(measures['ncloc'])} />
-              </span>
               <Measure
                 measure={{
                   metric: { key: 'ncloc', type: 'SHORT_INT' },
                   value: measures['ncloc']
                 }}
               />
+              <span className="spacer-left">
+                <SizeRating value={Number(measures['ncloc'])} />
+              </span>
             </div>
             <div className="project-card-measure-label">
               <ProjectCardLanguages distribution={measures['ncloc_language_distribution']} />
index c9e88821373006d69583eec9ad4df7433fe61729..ed38e592644559af2b80b7e47477e16c611387d8 100644 (file)
@@ -258,13 +258,6 @@ exports[`should render correctly with all data 1`] = `
       <div
         className="project-card-measure-number"
       >
-        <span
-          className="spacer-right"
-        >
-          <SizeRating
-            value={2053}
-          />
-        </span>
         <Measure
           measure={
             Object {
@@ -276,6 +269,13 @@ exports[`should render correctly with all data 1`] = `
             }
           }
         />
+        <span
+          className="spacer-left"
+        >
+          <SizeRating
+            value={2053}
+          />
+        </span>
       </div>
       <div
         className="project-card-measure-label"
@@ -298,13 +298,6 @@ exports[`should render ncloc correctly 1`] = `
     <div
       className="project-card-measure-number"
     >
-      <span
-        className="spacer-right"
-      >
-        <SizeRating
-          value={16549887}
-        />
-      </span>
       <Measure
         measure={
           Object {
@@ -316,6 +309,13 @@ exports[`should render ncloc correctly 1`] = `
           }
         }
       />
+      <span
+        className="spacer-left"
+      >
+        <SizeRating
+          value={16549887}
+        />
+      </span>
     </div>
     <div
       className="project-card-measure-label"