]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-12189 Make dashes smaller for empty measures
authorJeremy Davis <jeremy.davis@sonarsource.com>
Fri, 21 Jun 2019 15:26:14 +0000 (17:26 +0200)
committersonartech <sonartech@sonarsource.com>
Fri, 28 Jun 2019 06:45:49 +0000 (08:45 +0200)
server/sonar-web/src/main/js/apps/overview/main/Coverage.tsx
server/sonar-web/src/main/js/apps/overview/main/Duplications.tsx
server/sonar-web/src/main/js/apps/overview/main/VulnerabilitiesAndHotspots.tsx
server/sonar-web/src/main/js/apps/overview/main/__tests__/__snapshots__/VulnerabilitiesAndHotspots-test.tsx.snap
server/sonar-web/src/main/js/apps/overview/main/enhance.tsx
server/sonar-web/src/main/js/apps/overview/pullRequests/__tests__/__snapshots__/ReviewApp-test.tsx.snap
server/sonar-web/src/main/js/apps/overview/styles.css
server/sonar-web/src/main/js/apps/portfolio/styles.css

index a335fa06f50b2bd7c064e2790e31fac102470f1a..6c7990e42c71ef34fbcd677774a16cc9da1542f7 100644 (file)
@@ -106,7 +106,7 @@ export class Coverage extends React.PureComponent<ComposedProps> {
           </DrilldownLink>
         </div>
       ) : (
-        <span>—</span>
+        <span className="big">—</span>
       );
 
     const newLinesToCover = measures.find(measure => measure.metric.key === 'new_lines_to_cover');
index 30b4c08d5703e9e51463fc35a5db71d1a0b8dd03..edc8c1953282203dabcbef7d59e6ff6c6feb6148 100644 (file)
@@ -106,7 +106,7 @@ export class Duplications extends React.PureComponent<ComposedProps> {
           </DrilldownLink>
         </div>
       ) : (
-        <span>—</span>
+        <span className="big">—</span>
       );
 
     const newLinesMeasure = measures.find(measure => measure.metric.key === 'new_lines');
index 2802b7796d8e737892bae7bd15871452ae692f48..4e021d1bf677d53a5477b53683a724e0ccb9d6f9 100644 (file)
@@ -56,7 +56,7 @@ export class VulnerabiltiesAndHotspots extends React.PureComponent<ComposedProps
           </div>
           <div className="overview-domain-measure">
             <div className="overview-domain-measure-value">
-              <span>{this.props.renderIssues('new_security_hotspots', 'SECURITY_HOTSPOT')}</span>
+              {this.props.renderIssues('new_security_hotspots', 'SECURITY_HOTSPOT')}
             </div>
             <div className="overview-domain-measure-label">
               <SecurityHotspotIcon className="little-spacer-right" />
index b8c6dc9ddb65407f992531f5d7d00aed0592fa9f..04386abdc13a49e3717452aa8e28ac1188bbfdb1 100644 (file)
@@ -128,7 +128,7 @@ exports[`should render correctly 1`] = `
           className="overview-domain-measure"
         >
           <div
-            className="overview-domain-measure-value overview-domain-measure-value-small"
+            className="overview-domain-measure-value"
           >
             <Link
               onlyActiveOnIndex={false}
@@ -260,27 +260,25 @@ exports[`should render correctly 1`] = `
           className="overview-domain-measure"
         >
           <div
-            className="overview-domain-measure-value overview-domain-measure-value-small"
+            className="overview-domain-measure-value"
           >
-            <span>
-              <Link
-                onlyActiveOnIndex={false}
-                style={Object {}}
-                to={
-                  Object {
-                    "pathname": "/project/issues",
-                    "query": Object {
-                      "id": "my-project",
-                      "resolved": "false",
-                      "sinceLeakPeriod": "true",
-                      "types": "SECURITY_HOTSPOT",
-                    },
-                  }
+            <Link
+              onlyActiveOnIndex={false}
+              style={Object {}}
+              to={
+                Object {
+                  "pathname": "/project/issues",
+                  "query": Object {
+                    "id": "my-project",
+                    "resolved": "false",
+                    "sinceLeakPeriod": "true",
+                    "types": "SECURITY_HOTSPOT",
+                  },
                 }
-              >
-                10
-              </Link>
-            </span>
+              }
+            >
+              10
+            </Link>
           </div>
           <div
             className="overview-domain-measure-label"
index 72cda20160680c611cf380f448cde241920c88be..e4af5bce6b3b4ae7aa848f5b69275f735dff4659 100644 (file)
@@ -151,7 +151,7 @@ export default function enhance(ComposedComponent: React.ComponentType<ComposedP
       const { branchLike, measures, component } = this.props;
       const measure = measures.find(measure => measure.metric.key === metric);
       if (!measure) {
-        return <span>—</span>;
+        return <span className="big">—</span>;
       }
 
       const value = this.getValue(measure);
index f23c3a895ff2849c771b0666719e0f36509c5ec5..66376718be8f6d06fe0b0ec1609baf0e38cc81b9 100644 (file)
@@ -425,7 +425,7 @@ exports[`should render correctly for a failed QG 1`] = `
                   "title": "Foo Bar feature",
                 }
               }
-              className="huge"
+              className="overview-domain-measure-value"
               component={
                 Object {
                   "breadcrumbs": Array [],
@@ -1460,7 +1460,7 @@ exports[`should render correctly for a passed QG 1`] = `
                   "title": "Foo Bar feature",
                 }
               }
-              className="huge"
+              className="overview-domain-measure-value"
               component={
                 Object {
                   "breadcrumbs": Array [],
index 438648e9c3d0f5ddac703784be71617b149b4a01..7745bce4e329ce3cbc2b5963777b9067c3a42ca5 100644 (file)
 
 .pr-overview-measurements-value .measure-empty {
   margin-top: -4px;
+  font-size: var(--bigFontSize);
 }
 
 .pr-overview-measurements-rating,
index 6778e7eca1a3814e656d087d604d646872502049..bcc30c9a8e780c25059dc6079d38877efb4292a2 100644 (file)
 
 .portfolio-box-rating .rating.no-rating {
   color: var(--secondFontColor);
+  font-size: var(--bigFontSize);
 }
 
 .portfolio-box-links {