From 837be166ca9c04bebd7556bf3995cfa828e04f45 Mon Sep 17 00:00:00 2001 From: Jeremy Davis Date: Thu, 12 Aug 2021 18:11:10 +0200 Subject: [PATCH] SONAR-12004 Replace diamonds with full text --- .../components/icons/ProjectEventIcon.tsx | 32 -------- .../components/DefinitionChangeEventInner.tsx | 30 +++++--- .../apps/projectActivity/components/Event.tsx | 9 --- .../projectActivity/components/EventInner.tsx | 20 +++-- .../ProjectActivityEventSelectOption.tsx | 4 +- .../ProjectActivityEventSelectValue.tsx | 38 ---------- .../components/ProjectActivityPageHeader.tsx | 3 - .../components/RichQualityGateEventInner.tsx | 5 +- .../DefinitionChangeEventInner-test.tsx | 19 +++++ .../RichQualityGateEventInner-test.tsx | 5 ++ .../DefinitionChangeEventInner-test.tsx.snap | 22 ++++-- .../__snapshots__/Event-test.tsx.snap | 6 -- .../__snapshots__/EventInner-test.tsx.snap | 26 ++++--- ...ectActivityEventSelectOption-test.tsx.snap | 9 +-- .../ProjectActivityPageHeader-test.tsx.snap | 1 - .../activity-graph/GraphsTooltips.tsx | 6 +- .../GraphsTooltipsContentEvents.tsx | 20 ++--- .../__tests__/GraphsTooltips-test.tsx | 4 + .../GraphsTooltips-test.tsx.snap | 76 +++++++++++++++++++ .../GraphsTooltipsContentEvents-test.tsx.snap | 46 +++++++---- 20 files changed, 216 insertions(+), 165 deletions(-) delete mode 100644 server/sonar-ui-common/components/icons/ProjectEventIcon.tsx delete mode 100644 server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityEventSelectValue.tsx diff --git a/server/sonar-ui-common/components/icons/ProjectEventIcon.tsx b/server/sonar-ui-common/components/icons/ProjectEventIcon.tsx deleted file mode 100644 index 5ddba6b19ea..00000000000 --- a/server/sonar-ui-common/components/icons/ProjectEventIcon.tsx +++ /dev/null @@ -1,32 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2021 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 * as React from 'react'; -import Icon, { IconProps } from './Icon'; - -export default function ProjectEventIcon({ fill = '#fff', size = 14, ...iconProps }: IconProps) { - return ( - - - - ); -} diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/DefinitionChangeEventInner.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/DefinitionChangeEventInner.tsx index d48b29e4e0c..f113cdb43b1 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/DefinitionChangeEventInner.tsx +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/DefinitionChangeEventInner.tsx @@ -20,7 +20,7 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router'; -import { ResetButtonLink } from 'sonar-ui-common/components/controls/buttons'; +import { ButtonLink } from 'sonar-ui-common/components/controls/buttons'; import BranchIcon from 'sonar-ui-common/components/icons/BranchIcon'; import DropdownIcon from 'sonar-ui-common/components/icons/DropdownIcon'; import { translate } from 'sonar-ui-common/helpers/l10n'; @@ -39,6 +39,7 @@ export function isDefinitionChangeEvent(event: T.AnalysisEvent): event is Defini interface Props { branchLike: BranchLike | undefined; event: DefinitionChangeEvent; + readonly?: boolean; } interface State { @@ -131,21 +132,26 @@ export class DefinitionChangeEventInner extends React.PureComponent - {translate('event.category', event.category)}: + + {translate('event.category', event.category)} + {!readonly && ':'} + -
- - {expanded ? translate('hide') : translate('more')} - - -
+ {!readonly && ( +
+ + {expanded ? translate('hide') : translate('more')} + + +
+ )} {expanded && (