From 604938c43114902c83638e4ea57707fa23535550 Mon Sep 17 00:00:00 2001 From: Philippe Perrin Date: Wed, 12 Oct 2022 10:34:59 +0200 Subject: [PATCH] SONAR-17461 Languages menu entry are not rendered properly when the name is long --- server/sonar-docs/src/components/PageLink.tsx | 3 ++- .../components/__tests__/__snapshots__/PageLink-test.tsx.snap | 1 + server/sonar-docs/src/layouts/layout.css | 3 +++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/server/sonar-docs/src/components/PageLink.tsx b/server/sonar-docs/src/components/PageLink.tsx index cda51b8d57c..61e547368b8 100644 --- a/server/sonar-docs/src/components/PageLink.tsx +++ b/server/sonar-docs/src/components/PageLink.tsx @@ -43,7 +43,8 @@ export default function PageLink({ className, location, node }: Props) {
+ to={url} + title={title}> {title}
diff --git a/server/sonar-docs/src/components/__tests__/__snapshots__/PageLink-test.tsx.snap b/server/sonar-docs/src/components/__tests__/__snapshots__/PageLink-test.tsx.snap index 15e3aaf993a..173cb10ba75 100644 --- a/server/sonar-docs/src/components/__tests__/__snapshots__/PageLink-test.tsx.snap +++ b/server/sonar-docs/src/components/__tests__/__snapshots__/PageLink-test.tsx.snap @@ -4,6 +4,7 @@ exports[`should render correctly 1`] = `
Foo diff --git a/server/sonar-docs/src/layouts/layout.css b/server/sonar-docs/src/layouts/layout.css index d13c61f7b2d..f3a1fda781b 100644 --- a/server/sonar-docs/src/layouts/layout.css +++ b/server/sonar-docs/src/layouts/layout.css @@ -308,6 +308,9 @@ a.search-result .note { font-size: 14px; line-height: 26px; margin: 0; + text-overflow: ellipsis; + overflow-x: hidden; + white-space: nowrap; } .sub-menu-link:hover, -- 2.39.5