From 3ea3794bd19d5ac2830aef3e58d8d735b1acff25 Mon Sep 17 00:00:00 2001 From: Wouter Admiraal Date: Fri, 18 Jun 2021 14:26:01 +0200 Subject: [PATCH] SONAR-14943 Adjust project creation menu layout --- .../components/ProjectCreationMenu.tsx | 14 +++- .../ProjectCreationMenu-test.tsx.snap | 24 +++++- .../main/js/components/icons/EllipsisIcon.tsx | 39 ++++++++++ .../icons/__tests__/EllipsisIcon-test.tsx | 34 +++++++++ .../__snapshots__/EllipsisIcon-test.tsx.snap | 16 ++++ .../tutorials/TutorialSelectionRenderer.tsx | 8 +- .../TutorialSelectionRenderer-test.tsx.snap | 75 +++++-------------- .../src/main/js/helpers/constants.ts | 5 ++ .../resources/org/sonar/l10n/core.properties | 2 +- 9 files changed, 152 insertions(+), 65 deletions(-) create mode 100644 server/sonar-web/src/main/js/components/icons/EllipsisIcon.tsx create mode 100644 server/sonar-web/src/main/js/components/icons/__tests__/EllipsisIcon-test.tsx create mode 100644 server/sonar-web/src/main/js/components/icons/__tests__/__snapshots__/EllipsisIcon-test.tsx.snap diff --git a/server/sonar-web/src/main/js/apps/projects/components/ProjectCreationMenu.tsx b/server/sonar-web/src/main/js/apps/projects/components/ProjectCreationMenu.tsx index 7ea8dbc5211..a2677ae4de8 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/ProjectCreationMenu.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/ProjectCreationMenu.tsx @@ -18,13 +18,15 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import { Link } from 'react-router'; import { Button } from 'sonar-ui-common/components/controls/buttons'; import Dropdown from 'sonar-ui-common/components/controls/Dropdown'; import DropdownIcon from 'sonar-ui-common/components/icons/DropdownIcon'; import { translate } from 'sonar-ui-common/helpers/l10n'; import { getAlmSettings } from '../../../api/alm-settings'; import { withCurrentUser } from '../../../components/hoc/withCurrentUser'; -import { IMPORT_COMPATIBLE_ALMS } from '../../../helpers/constants'; +import EllipsisIcon from '../../../components/icons/EllipsisIcon'; +import { IMPORT_COMPATIBLE_ALMS, IMPORT_COMPATIBLE_ALM_COUNT } from '../../../helpers/constants'; import { hasGlobalPermission } from '../../../helpers/users'; import { AlmKeys, AlmSettingsInstance } from '../../../types/alm-settings'; import { Permissions } from '../../../types/permissions'; @@ -117,10 +119,18 @@ export class ProjectCreationMenu extends React.PureComponent { overlay={ }>