]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-22453 Use the updated "align" prop for DropdownMenu.Root
authorDavid Cho-Lerat <david.cho-lerat@sonarsource.com>
Mon, 15 Jul 2024 14:41:35 +0000 (16:41 +0200)
committersonartech <sonartech@sonarsource.com>
Tue, 16 Jul 2024 20:02:55 +0000 (20:02 +0000)
server/sonar-web/src/main/js/app/components/nav/global/GlobalNavMore.tsx
server/sonar-web/src/main/js/app/components/nav/settings/SettingsNav.tsx
server/sonar-web/src/main/js/components/activity-graph/GraphsHeader.tsx
server/sonar-web/src/main/js/components/embed-docs-modal/EmbedDocsPopupHelper.tsx

index 84de3342ce84e1bdbd7e2c27b6723e1600c4c0de..ab4a4150bd400a9fd9678c9eb6967353aa4bec0b 100644 (file)
@@ -18,7 +18,7 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 
-import { DropdownMenu } from '@sonarsource/echoes-react';
+import { DropdownMenu, DropdownMenuAlign } from '@sonarsource/echoes-react';
 import { MainMenuItem } from 'design-system';
 import * as React from 'react';
 import { translate } from '../../../../helpers/l10n';
@@ -43,7 +43,7 @@ function GlobalNavMore({ appState: { globalPages = [] } }: Readonly<{ appState:
 
   return (
     <DropdownMenu.Root
-      align="start"
+      align={DropdownMenuAlign.Start}
       id="moreMenuDropdown"
       items={withoutPortfolios.map(renderGlobalPageLink)}
     >
index e562c6016c72fbd5c9e698dbdb9d3e4fc9f8a335..516b1cca0c7df9021736e5a73525173bd1ccadbc 100644 (file)
@@ -18,7 +18,7 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 
-import { DropdownMenu } from '@sonarsource/echoes-react';
+import { DropdownMenu, DropdownMenuAlign } from '@sonarsource/echoes-react';
 import { LightLabel, NavBarTabLink, NavBarTabs, TopBar } from 'design-system';
 import * as React from 'react';
 import { Location } from 'react-router-dom';
@@ -95,7 +95,7 @@ export class SettingsNav extends React.PureComponent<Props> {
 
     return (
       <DropdownMenu.Root
-        align="start"
+        align={DropdownMenuAlign.Start}
         id="settings-navigation-configuration-dropdown"
         items={
           <>
index 008c47f2cd378c6d87437ef5b9617b0d02f1328c..13265163d17467a3c321ba7dab2a3d3814abae4b 100644 (file)
@@ -18,7 +18,7 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 
-import { DropdownMenu } from '@sonarsource/echoes-react';
+import { DropdownMenu, DropdownMenuAlign } from '@sonarsource/echoes-react';
 import { ButtonSecondary, ChevronDownIcon, TextMuted } from 'design-system';
 import * as React from 'react';
 import { translate } from '../../helpers/l10n';
@@ -77,7 +77,7 @@ export default function GraphsHeader(props: Props) {
   return (
     <div className={className}>
       <div className="sw-flex">
-        <DropdownMenu.Root id="activity-graph-type" align="start" items={options}>
+        <DropdownMenu.Root align={DropdownMenuAlign.Start} id="activity-graph-type" items={options}>
           <ButtonSecondary
             aria-label={translate('project_activity.graphs.choose_type')}
             className={
index b929c57fd6c6a9b6d98db8c90e8ab1da783b292c..96bb70c5c5b19bdae428a40c6242748a75df47ac 100644 (file)
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 
-import { DropdownMenu, IconQuestionMark, Tooltip } from '@sonarsource/echoes-react';
+import {
+  DropdownMenu,
+  DropdownMenuAlign,
+  IconQuestionMark,
+  Tooltip,
+} from '@sonarsource/echoes-react';
 import { InteractiveIcon } from 'design-system';
 import * as React from 'react';
 import { translate } from '../../helpers/l10n';
@@ -27,7 +32,11 @@ import { EmbedDocsPopup } from './EmbedDocsPopup';
 export default function EmbedDocsPopupHelper() {
   return (
     <div className="dropdown">
-      <DropdownMenu.Root align="end" id="help-menu-dropdown" items={<EmbedDocsPopup />}>
+      <DropdownMenu.Root
+        align={DropdownMenuAlign.End}
+        id="help-menu-dropdown"
+        items={<EmbedDocsPopup />}
+      >
         <Tooltip content={translate('help')}>
           <InteractiveIcon
             Icon={IconQuestionMark}