From ddb6f1e13ff2cde359672c1df474c5b6e6f137da Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Mon, 23 Oct 2017 09:46:53 +0200 Subject: [PATCH] SONAR-9702 cut long branch name in header --- .../nav/component/ComponentNavBranch.tsx | 4 +++- .../ComponentNavBranch-test.tsx.snap | 24 +++++++++++++++++-- 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 - {currentBranch.name} + + {currentBranch.name} + {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 + + + master + + @@ -92,7 +102,17 @@ exports[`renders short-living branch 1`] = ` } className="little-spacer-right" /> - foo + + + foo + + -- 2.39.5