From 8ee3c3907267332347808cd0b5740ad82c9428d6 Mon Sep 17 00:00:00 2001 From: David Cho-Lerat Date: Wed, 10 Apr 2024 18:07:48 +0200 Subject: [PATCH] SONAR-21973 Remove unused icons --- .../components/icons/HighImpactCircleIcon.tsx | 45 ------ .../icons/OverviewQGNotComputedIcon.tsx | 131 ------------------ .../src/components/icons/RefreshIcon.tsx | 23 --- .../src/components/icons/index.ts | 4 +- 4 files changed, 1 insertion(+), 202 deletions(-) delete mode 100644 server/sonar-web/design-system/src/components/icons/HighImpactCircleIcon.tsx delete mode 100644 server/sonar-web/design-system/src/components/icons/OverviewQGNotComputedIcon.tsx delete mode 100644 server/sonar-web/design-system/src/components/icons/RefreshIcon.tsx diff --git a/server/sonar-web/design-system/src/components/icons/HighImpactCircleIcon.tsx b/server/sonar-web/design-system/src/components/icons/HighImpactCircleIcon.tsx deleted file mode 100644 index 3ff33ec1789..00000000000 --- a/server/sonar-web/design-system/src/components/icons/HighImpactCircleIcon.tsx +++ /dev/null @@ -1,45 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2024 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -import { useTheme } from '@emotion/react'; -import { themeColor, themeContrast } from '../../helpers'; -import { CustomIcon, IconProps } from './Icon'; - -export function HighImpactCircleIcon(props: Readonly) { - const theme = useTheme(); - - const bgColor = themeColor('overviewCardErrorIcon')({ - theme, - }); - const iconColor = themeContrast('overviewCardErrorIcon')({ - theme, - }); - - return ( - - - - - ); -} diff --git a/server/sonar-web/design-system/src/components/icons/OverviewQGNotComputedIcon.tsx b/server/sonar-web/design-system/src/components/icons/OverviewQGNotComputedIcon.tsx deleted file mode 100644 index 816385a2c26..00000000000 --- a/server/sonar-web/design-system/src/components/icons/OverviewQGNotComputedIcon.tsx +++ /dev/null @@ -1,131 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2024 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -import { useTheme } from '@emotion/react'; -import { themeColor } from '../../helpers/theme'; - -export function OverviewQGNotComputedIcon({ className }: { className?: string }) { - const theme = useTheme(); - - return ( - - - - - - - - - - - - - - - - - - - - - - ); -} diff --git a/server/sonar-web/design-system/src/components/icons/RefreshIcon.tsx b/server/sonar-web/design-system/src/components/icons/RefreshIcon.tsx deleted file mode 100644 index 98931b3f912..00000000000 --- a/server/sonar-web/design-system/src/components/icons/RefreshIcon.tsx +++ /dev/null @@ -1,23 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2024 SonarSource SA - * mailto:info AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -import { SyncIcon } from '@primer/octicons-react'; -import { OcticonHoc } from './Icon'; - -export const RefreshIcon = OcticonHoc(SyncIcon, 'RefreshIcon'); diff --git a/server/sonar-web/design-system/src/components/icons/index.ts b/server/sonar-web/design-system/src/components/icons/index.ts index caeb1088b5a..deaf64a2f59 100644 --- a/server/sonar-web/design-system/src/components/icons/index.ts +++ b/server/sonar-web/design-system/src/components/icons/index.ts @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + export { AddNewIcon } from './AddNewIcon'; export { BranchIcon } from './BranchIcon'; export { BugIcon } from './BugIcon'; @@ -43,7 +44,6 @@ export { FlagInfoIcon } from './FlagInfoIcon'; export { FlagSuccessIcon } from './FlagSuccessIcon'; export { FlagWarningIcon } from './FlagWarningIcon'; export { HelperHintIcon } from './HelperHintIcon'; -export { HighImpactCircleIcon } from './HighImpactCircleIcon'; export { HomeFillIcon } from './HomeFillIcon'; export { HomeIcon } from './HomeIcon'; export * from './Icon'; @@ -60,14 +60,12 @@ export { NoDataIcon } from './NoDataIcon'; export { OpenCloseIndicator } from './OpenCloseIndicator'; export { OpenNewTabIcon } from './OpenNewTabIcon'; export { OverridenIcon } from './OverridenIcon'; -export { OverviewQGNotComputedIcon } from './OverviewQGNotComputedIcon'; export { OverviewQGPassedIcon } from './OverviewQGPassedIcon'; export { PencilIcon } from './PencilIcon'; export { PinIcon } from './PinIcon'; export { ProjectIcon } from './ProjectIcon'; export { PullRequestIcon } from './PullRequestIcon'; export { QualifierIcon } from './QualifierIcon'; -export { RefreshIcon } from './RefreshIcon'; export { RequiredIcon } from './RequiredIcon'; export { SecurityHotspotIcon } from './SecurityHotspotIcon'; export { SeparatorCircleIcon } from './SeparatorCircleIcon'; -- 2.39.5