From: Jeremy Davis Date: Wed, 27 Jul 2022 12:56:50 +0000 (+0200) Subject: SONAR-16683 [891491] proper structure for docs popup X-Git-Tag: 9.6.0.59041~134 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=0ade067c4ebd2ebd14e2d18842ff90a088629880;p=sonarqube.git SONAR-16683 [891491] proper structure for docs popup --- diff --git a/server/sonar-web/src/main/js/app/styles/components/menu.css b/server/sonar-web/src/main/js/app/styles/components/menu.css index 567e5f9a18c..1d48642153b 100644 --- a/server/sonar-web/src/main/js/app/styles/components/menu.css +++ b/server/sonar-web/src/main/js/app/styles/components/menu.css @@ -27,6 +27,10 @@ background-clip: padding-box; } +.menu:not(:last-of-type) { + padding-bottom: 12px; +} + .menu + .menu { border-top: 1px solid var(--barBorderColor); } diff --git a/server/sonar-web/src/main/js/components/embed-docs-modal/EmbedDocsPopup.tsx b/server/sonar-web/src/main/js/components/embed-docs-modal/EmbedDocsPopup.tsx index 699c03b9521..0fd077c50b4 100644 --- a/server/sonar-web/src/main/js/components/embed-docs-modal/EmbedDocsPopup.tsx +++ b/server/sonar-web/src/main/js/components/embed-docs-modal/EmbedDocsPopup.tsx @@ -31,7 +31,11 @@ interface Props { export default class EmbedDocsPopup extends React.PureComponent { renderTitle(text: string) { - return
  • {text}
  • ; + return ( +
  • + {text} +
  • + ); } renderSuggestions = ({ suggestions }: { suggestions: SuggestionLink[] }) => { @@ -39,17 +43,16 @@ export default class EmbedDocsPopup extends React.PureComponent { return null; } return ( - <> +
      {this.renderTitle(translate('embed_docs.suggestion'))} - {suggestions.map((suggestion, index) => ( -
    • + {suggestions.map(suggestion => ( +
    • {suggestion.text}
    • ))} -
    • - +
    ); }; @@ -71,8 +74,8 @@ export default class EmbedDocsPopup extends React.PureComponent { render() { return ( -
      - {this.renderSuggestions} + {this.renderSuggestions} +
      • {translate('embed_docs.documentation')} @@ -83,13 +86,15 @@ export default class EmbedDocsPopup extends React.PureComponent { {translate('api_documentation.page')}
      • -
      • +
      + +
        {this.renderTitle(translate('embed_docs.stay_connected'))}
      • {this.renderIconLink( diff --git a/server/sonar-web/src/main/js/components/embed-docs-modal/__tests__/__snapshots__/EmbedDocsPopup-test.tsx.snap b/server/sonar-web/src/main/js/components/embed-docs-modal/__tests__/__snapshots__/EmbedDocsPopup-test.tsx.snap index da58a8ccb00..edd740b4349 100644 --- a/server/sonar-web/src/main/js/components/embed-docs-modal/__tests__/__snapshots__/EmbedDocsPopup-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/embed-docs-modal/__tests__/__snapshots__/EmbedDocsPopup-test.tsx.snap @@ -2,12 +2,13 @@ exports[`should render 1`] = ` + + +
          - - -
        • -
        • +
        + +
        • embed_docs.stay_connected