]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-9702 cut long branch name in header
authorStas Vilchik <stas.vilchik@sonarsource.com>
Mon, 23 Oct 2017 07:46:53 +0000 (09:46 +0200)
committerStas Vilchik <stas.vilchik@sonarsource.com>
Mon, 23 Oct 2017 11:41:52 +0000 (13:41 +0200)
server/sonar-web/src/main/js/app/components/nav/component/ComponentNavBranch.tsx
server/sonar-web/src/main/js/app/components/nav/component/__tests__/__snapshots__/ComponentNavBranch-test.tsx.snap

index 334fdfb5e1b94605cc9e857397a3575bbec82194..e3a27248da2e4eade7f86accd0ce920f683463a7 100644 (file)
@@ -215,7 +215,9 @@ export default class ComponentNavBranch extends React.PureComponent<Props, State
         })}>
         <a className="link-base-color link-no-underline" href="#" onClick={this.handleClick}>
           <BranchIcon branch={currentBranch} className="little-spacer-right" />
-          {currentBranch.name}
+          <Tooltip overlay={currentBranch.name} mouseEnterDelay={1}>
+            <span className="text-limited text-top">{currentBranch.name}</span>
+          </Tooltip>
           <i className="icon-dropdown little-spacer-left" />
         </a>
         {this.renderDropdown()}
index 38c20e78b975288baf3ad1eba8763eb5c3113bf5..baa03cf66365c8070477a21a4ba114ddd52c1bf9 100644 (file)
@@ -18,7 +18,17 @@ exports[`renders main branch 1`] = `
       }
       className="little-spacer-right"
     />
-    master
+    <Tooltip
+      mouseEnterDelay={1}
+      overlay="master"
+      placement="bottom"
+    >
+      <span
+        className="text-limited text-top"
+      >
+        master
+      </span>
+    </Tooltip>
     <i
       className="icon-dropdown little-spacer-left"
     />
@@ -92,7 +102,17 @@ exports[`renders short-living branch 1`] = `
       }
       className="little-spacer-right"
     />
-    foo
+    <Tooltip
+      mouseEnterDelay={1}
+      overlay="foo"
+      placement="bottom"
+    >
+      <span
+        className="text-limited text-top"
+      >
+        foo
+      </span>
+    </Tooltip>
     <i
       className="icon-dropdown little-spacer-left"
     />