aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-web/src')
-rw-r--r--server/sonar-web/src/main/js/app/components/nav/component/ComponentNavBranch.tsx4
-rw-r--r--server/sonar-web/src/main/js/app/components/nav/component/__tests__/__snapshots__/ComponentNavBranch-test.tsx.snap24
2 files changed, 25 insertions, 3 deletions
diff --git a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavBranch.tsx b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavBranch.tsx
index 334fdfb5e1b..e3a27248da2 100644
--- a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavBranch.tsx
+++ b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavBranch.tsx
@@ -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()}
diff --git a/server/sonar-web/src/main/js/app/components/nav/component/__tests__/__snapshots__/ComponentNavBranch-test.tsx.snap b/server/sonar-web/src/main/js/app/components/nav/component/__tests__/__snapshots__/ComponentNavBranch-test.tsx.snap
index 38c20e78b97..baa03cf6636 100644
--- a/server/sonar-web/src/main/js/app/components/nav/component/__tests__/__snapshots__/ComponentNavBranch-test.tsx.snap
+++ b/server/sonar-web/src/main/js/app/components/nav/component/__tests__/__snapshots__/ComponentNavBranch-test.tsx.snap
@@ -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"
/>