From 04f7a37abda3e7b3bd599b68c5e26c403ecfcfc9 Mon Sep 17 00:00:00 2001 From: Revanshu Paliwal Date: Mon, 16 Jan 2023 15:08:20 +0100 Subject: SONAR-17815 CAYC Wording changes for QG page --- .../overview/branches/CleanAsYouCodeWarning.tsx | 24 +--------------------- .../sonar-web/src/main/js/apps/overview/styles.css | 9 -------- .../components/ConditionReviewAndUpdateModal.tsx | 19 +++++++++++++++-- .../apps/quality-gates/components/Conditions.tsx | 7 +++---- .../components/__tests__/QualityGate-it.tsx | 5 ++++- .../src/main/js/apps/quality-gates/styles.css | 5 ----- 6 files changed, 25 insertions(+), 44 deletions(-) (limited to 'server') diff --git a/server/sonar-web/src/main/js/apps/overview/branches/CleanAsYouCodeWarning.tsx b/server/sonar-web/src/main/js/apps/overview/branches/CleanAsYouCodeWarning.tsx index f41c9c11d42..7dd4dc118c2 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/CleanAsYouCodeWarning.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/CleanAsYouCodeWarning.tsx @@ -18,7 +18,6 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; -import { FormattedMessage } from 'react-intl'; import Link from '../../../components/common/Link'; import { Alert } from '../../../components/ui/Alert'; import { translate } from '../../../helpers/l10n'; @@ -32,28 +31,7 @@ interface Props { export default function CleanAsYouCodeWarning({ component }: Props) { return ( <> - - {component.qualityGate ? ( - - - {component.qualityGate.name} - - - ), - }} - /> - ) : ( - translate('overview.quality_gate.conditions.cayc.warning.no_link') - )} - + {translate('overview.quality_gate.conditions.cayc.warning')}

{translate('overview.quality_gate.conditions.cayc.details')} diff --git a/server/sonar-web/src/main/js/apps/overview/styles.css b/server/sonar-web/src/main/js/apps/overview/styles.css index dbe0751d8ec..d06f711df32 100644 --- a/server/sonar-web/src/main/js/apps/overview/styles.css +++ b/server/sonar-web/src/main/js/apps/overview/styles.css @@ -159,15 +159,6 @@ font-size: var(--bigFontSize); } -.overview-quality-gate-alert-inline-link { - display: inline-block; - max-width: 100%; - overflow: hidden; - text-overflow: ellipsis; - padding-bottom: 1px; - margin-bottom: -5px; -} - /* * Animations */ diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/ConditionReviewAndUpdateModal.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/ConditionReviewAndUpdateModal.tsx index d587a5a298f..328ad0dffc2 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/ConditionReviewAndUpdateModal.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/ConditionReviewAndUpdateModal.tsx @@ -19,7 +19,9 @@ */ import { sortBy } from 'lodash'; import * as React from 'react'; +import { FormattedMessage } from 'react-intl'; import { createCondition, deleteCondition, updateCondition } from '../../../api/quality-gates'; +import DocLink from '../../../components/common/DocLink'; import ConfirmModal from '../../../components/controls/ConfirmModal'; import { translate, translateWithParameters } from '../../../helpers/l10n'; import { Condition, Dict, Metric, QualityGate } from '../../../types/types'; @@ -110,8 +112,21 @@ export default class CaycReviewUpdateConditionsModal extends React.PureComponent size="medium" >

-

- {translate('quality_gates.cayc.review_update_modal.description')} +

+ + {translate('quality_gates.cayc')} + + ), + }} + /> +

+

+ {translate('quality_gates.cayc.review_update_modal.description2')}

{translate('quality_gates.conditions.new_code', 'long')} diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/Conditions.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/Conditions.tsx index f0615f4406b..707387f074d 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/Conditions.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/Conditions.tsx @@ -315,9 +315,8 @@ export class Conditions extends React.PureComponent { )} {qualityGate.isCaycCompliant && !unlockEditing && canEdit && ( -
-

{translate('quality_gates.cayc_unfollow.title')}

-
+
+

{ ), }} /> -

+

diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/QualityGate-it.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/QualityGate-it.tsx index b011eed4e71..76a1faf300a 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/QualityGate-it.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/QualityGate-it.tsx @@ -315,7 +315,10 @@ it('should show warning banner when CAYC condition is not properly set and shoul }) ).toBeInTheDocument(); expect( - screen.getByText('quality_gates.cayc.review_update_modal.description') + screen.getByText('quality_gates.cayc.review_update_modal.description1') + ).toBeInTheDocument(); + expect( + screen.getByText('quality_gates.cayc.review_update_modal.description2') ).toBeInTheDocument(); expect( screen.getByRole('button', { name: 'quality_gates.cayc.review_update_modal.confirm_text' }) diff --git a/server/sonar-web/src/main/js/apps/quality-gates/styles.css b/server/sonar-web/src/main/js/apps/quality-gates/styles.css index f4703e59887..649182ea7dc 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/styles.css +++ b/server/sonar-web/src/main/js/apps/quality-gates/styles.css @@ -76,8 +76,3 @@ .cayc-warning-description { line-height: 18px; } - -.qg-unfollow-cayc { - border: 1px solid var(--neutral200); - background-color: var(--neutral50); -} -- cgit v1.2.3