From d07f205c2ee51e7ec24ccdef16d44e44bc998474 Mon Sep 17 00:00:00 2001 From: Jeremy Davis Date: Wed, 27 Jul 2022 15:44:32 +0200 Subject: [PATCH] SONAR-16683 [891479] Semantic web for help, search and account menu --- .../src/main/js/app/components/nav/global/GlobalNav.css | 8 +++++--- .../src/main/js/app/components/nav/global/GlobalNav.tsx | 4 ++-- .../main/js/app/components/nav/global/GlobalNavUser.tsx | 7 +++---- .../__tests__/__snapshots__/GlobalNav-test.tsx.snap | 8 ++++---- .../__tests__/__snapshots__/GlobalNavUser-test.tsx.snap | 5 ++--- .../src/main/js/app/components/search/Search.tsx | 4 ++-- .../components/embed-docs-modal/EmbedDocsPopupHelper.tsx | 4 ++-- 7 files changed, 20 insertions(+), 20 deletions(-) diff --git a/server/sonar-web/src/main/js/app/components/nav/global/GlobalNav.css b/server/sonar-web/src/main/js/app/components/nav/global/GlobalNav.css index 949f6f212b9..4555cecf010 100644 --- a/server/sonar-web/src/main/js/app/components/nav/global/GlobalNav.css +++ b/server/sonar-web/src/main/js/app/components/nav/global/GlobalNav.css @@ -41,7 +41,6 @@ .navbar-login { margin-right: -10px; - white-space: nowrap; } .navbar-avatar { @@ -70,7 +69,8 @@ height: var(--globalNavHeight); } -.global-navbar-menu > li > a { +.global-navbar-menu > li > a, +.global-navbar-menu .navbar-login { display: block; height: var(--globalNavHeight); padding: calc((var(--globalNavHeight) - var(--globalNavContentHeight)) / 2) 10px; @@ -88,7 +88,9 @@ .global-navbar-menu > li > a.active, .global-navbar-menu > li > a:hover, .global-navbar-menu > li > a:focus, -.global-navbar-menu > .dropdown.open > a { +.navbar-login.active, +.navbar-login:hover, +.navbar-login:focus { background-color: #020202; border-bottom-color: var(--blue); } diff --git a/server/sonar-web/src/main/js/app/components/nav/global/GlobalNav.tsx b/server/sonar-web/src/main/js/app/components/nav/global/GlobalNav.tsx index 6dd85f5fde4..f04302d2f4a 100644 --- a/server/sonar-web/src/main/js/app/components/nav/global/GlobalNav.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/global/GlobalNav.tsx @@ -42,11 +42,11 @@ export function GlobalNav(props: GlobalNavProps) { - + ); } diff --git a/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavUser.tsx b/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavUser.tsx index b56309057c0..089c8705516 100644 --- a/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavUser.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/global/GlobalNavUser.tsx @@ -75,8 +75,7 @@ export class GlobalNavUser extends React.PureComponent { - } - tagName="li"> + }> { renderAnonymous() { return ( -
  • +
    {translate('layout.login')} -
  • + ); } diff --git a/server/sonar-web/src/main/js/app/components/nav/global/__tests__/__snapshots__/GlobalNav-test.tsx.snap b/server/sonar-web/src/main/js/app/components/nav/global/__tests__/__snapshots__/GlobalNav-test.tsx.snap index a6e53684300..e0baf5bebbd 100644 --- a/server/sonar-web/src/main/js/app/components/nav/global/__tests__/__snapshots__/GlobalNav-test.tsx.snap +++ b/server/sonar-web/src/main/js/app/components/nav/global/__tests__/__snapshots__/GlobalNav-test.tsx.snap @@ -20,7 +20,7 @@ exports[`should render correctly: anonymous users 1`] = ` } } /> -
      @@ -33,7 +33,7 @@ exports[`should render correctly: anonymous users 1`] = ` } } /> -
    + `; @@ -56,7 +56,7 @@ exports[`should render correctly: logged in users 1`] = ` } } /> -
      @@ -68,6 +68,6 @@ exports[`should render correctly: logged in users 1`] = ` } } /> -
    + `; diff --git a/server/sonar-web/src/main/js/app/components/nav/global/__tests__/__snapshots__/GlobalNavUser-test.tsx.snap b/server/sonar-web/src/main/js/app/components/nav/global/__tests__/__snapshots__/GlobalNavUser-test.tsx.snap index 40956326a7d..de81a2b9674 100644 --- a/server/sonar-web/src/main/js/app/components/nav/global/__tests__/__snapshots__/GlobalNavUser-test.tsx.snap +++ b/server/sonar-web/src/main/js/app/components/nav/global/__tests__/__snapshots__/GlobalNavUser-test.tsx.snap @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`should render the right interface for anonymous user 1`] = ` -
  • +
    layout.login -
  • + `; exports[`should render the right interface for logged in user 1`] = ` @@ -51,7 +51,6 @@ exports[`should render the right interface for logged in user 1`] = ` } - tagName="li" > { render() { const search = ( -
  • +
    {
    )} -
  • + ); return this.state.open ? ( diff --git a/server/sonar-web/src/main/js/components/embed-docs-modal/EmbedDocsPopupHelper.tsx b/server/sonar-web/src/main/js/components/embed-docs-modal/EmbedDocsPopupHelper.tsx index 00ba400af41..b78665a57aa 100644 --- a/server/sonar-web/src/main/js/components/embed-docs-modal/EmbedDocsPopupHelper.tsx +++ b/server/sonar-web/src/main/js/components/embed-docs-modal/EmbedDocsPopupHelper.tsx @@ -52,7 +52,7 @@ export default class EmbedDocsPopupHelper extends React.PureComponent<{}, State> render() { return ( -
  • +
    -
  • + ); } } -- 2.39.5