diff options
author | Philippe Perrin <philippe.perrin@sonarsource.com> | 2022-08-09 18:31:33 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2022-08-10 20:03:08 +0000 |
commit | d93dfacbcf021816f538af4102e2491fc4693532 (patch) | |
tree | 397cd36f34d9d2ea26f111b254124ea2d342eaf1 /server/sonar-web/src | |
parent | e12852cc16f5d328c25e6569759d0eb1ee467835 (diff) | |
download | sonarqube-d93dfacbcf021816f538af4102e2491fc4693532.tar.gz sonarqube-d93dfacbcf021816f538af4102e2491fc4693532.zip |
SONAR-17075 Fix language pages menu entry display when text is too long
Diffstat (limited to 'server/sonar-web/src')
-rw-r--r-- | server/sonar-web/src/main/js/app/styles/components/list-groups.css | 2 | ||||
-rw-r--r-- | server/sonar-web/src/main/js/apps/documentation/components/MenuItem.tsx | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/server/sonar-web/src/main/js/app/styles/components/list-groups.css b/server/sonar-web/src/main/js/app/styles/components/list-groups.css index 79c391b050b..c8501537126 100644 --- a/server/sonar-web/src/main/js/app/styles/components/list-groups.css +++ b/server/sonar-web/src/main/js/app/styles/components/list-groups.css @@ -76,6 +76,8 @@ a.list-group-item { .list-group-item-heading { margin-top: 5px; margin-bottom: 5px; + text-overflow: ellipsis; + overflow: hidden; } .list-group-item-heading:after { diff --git a/server/sonar-web/src/main/js/apps/documentation/components/MenuItem.tsx b/server/sonar-web/src/main/js/apps/documentation/components/MenuItem.tsx index 4e57fee57aa..1e9245acbed 100644 --- a/server/sonar-web/src/main/js/apps/documentation/components/MenuItem.tsx +++ b/server/sonar-web/src/main/js/apps/documentation/components/MenuItem.tsx @@ -36,12 +36,16 @@ export function MenuItem({ depth = 0, node, splat }: Props) { const active = testPathAgainstUrl(node.url, splat); const maxDepth = Math.min(depth, 3); + const title = node.navTitle || node.title; + return ( <Link className={classNames('list-group-item', { active, [`depth-${maxDepth}`]: depth > 0 })} key={node.url} to={'/documentation' + node.url}> - <h3 className="list-group-item-heading">{node.navTitle || node.title}</h3> + <h3 className="list-group-item-heading" title={title}> + {title} + </h3> </Link> ); } |