From 2d1ab592f000d85e8b41e5c00a76ac47ed0ee48d Mon Sep 17 00:00:00 2001 From: Revanshu Paliwal Date: Tue, 24 Jan 2023 15:45:25 +0100 Subject: [PATCH] SONAR-17815 Updating links for learn more CAYC and translation changes --- .../js/apps/overview/branches/CleanAsYouCodeWarning.tsx | 8 +++----- .../js/apps/quality-gates/components/DetailsHeader.tsx | 4 +++- server/sonar-web/src/main/js/components/ui/Alert.tsx | 5 +++++ .../ui/__tests__/__snapshots__/Alert-test.tsx.snap | 5 +++++ .../src/main/resources/org/sonar/l10n/core.properties | 2 +- 5 files changed, 17 insertions(+), 7 deletions(-) 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 7dd4dc118c2..9dbb28caa5c 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,6 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as React from 'react'; +import DocLink from '../../../components/common/DocLink'; import Link from '../../../components/common/Link'; import { Alert } from '../../../components/ui/Alert'; import { translate } from '../../../helpers/l10n'; @@ -45,12 +46,9 @@ export default function CleanAsYouCodeWarning({ component }: Props) { )} - + {translate('overview.quality_gate.conditions.cayc.link')} - + ); } diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/DetailsHeader.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/DetailsHeader.tsx index 49b1b5213fd..53e5490d777 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/DetailsHeader.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/DetailsHeader.tsx @@ -38,6 +38,8 @@ interface Props { refreshList: () => Promise; } +const TOOLTIP_MOUSE_LEAVE_DELAY = 0.3; + export default class DetailsHeader extends React.PureComponent { handleActionRefresh = () => { const { refreshItem, refreshList } = this.props; @@ -72,7 +74,7 @@ export default class DetailsHeader extends React.PureComponent {

{qualityGate.name}

{qualityGate.isBuiltIn && } {!qualityGate.isCaycCompliant && ( - }> + } mouseLeaveDelay={TOOLTIP_MOUSE_LEAVE_DELAY}> )} diff --git a/server/sonar-web/src/main/js/components/ui/Alert.tsx b/server/sonar-web/src/main/js/components/ui/Alert.tsx index 57b190ce00b..b73db54ab2c 100644 --- a/server/sonar-web/src/main/js/components/ui/Alert.tsx +++ b/server/sonar-web/src/main/js/components/ui/Alert.tsx @@ -97,6 +97,11 @@ const StyledAlert = styled.div<{ isInline: boolean; variantInfo: AlertVariantInf a, .button-link { + border-color: ${colors.primarya40}; + } + + a: hover, + .button-link:hover { border-color: ${colors.darkBlue}; } `; diff --git a/server/sonar-web/src/main/js/components/ui/__tests__/__snapshots__/Alert-test.tsx.snap b/server/sonar-web/src/main/js/components/ui/__tests__/__snapshots__/Alert-test.tsx.snap index e60826739f7..9fb48a19931 100644 --- a/server/sonar-web/src/main/js/components/ui/__tests__/__snapshots__/Alert-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/ui/__tests__/__snapshots__/Alert-test.tsx.snap @@ -17,6 +17,11 @@ exports[`should render banner alert with correct css 1`] = ` .emotion-0 a, .emotion-0 .button-link { + border-color: rgba(35, 107, 151, 0.40); +} + +.emotion-0 a:hover, +.emotion-0 .button-link:hover { border-color: #236a97; } diff --git a/sonar-core/src/main/resources/org/sonar/l10n/core.properties b/sonar-core/src/main/resources/org/sonar/l10n/core.properties index c6aeb863cfd..24801719a71 100644 --- a/sonar-core/src/main/resources/org/sonar/l10n/core.properties +++ b/sonar-core/src/main/resources/org/sonar/l10n/core.properties @@ -1854,7 +1854,7 @@ quality_gates.cayc.unlock_edit=Unlock editing quality_gates.cayc.tooltip.message=This quality gate does not comply with Clean as You Code. quality_gates.cayc.badge.tooltip.learn_more=Learn more: Clean as You Code quality_gates.cayc.banner.title=This quality gate complies with Clean as You Code -quality_gates.cayc.banner.description=This quality gate complies with the {cayc_link} methodology so that you benefit from the most efficient approach to delivering Clean Code. The quality gate ensures that the {new_code_link} you’re working on has: +quality_gates.cayc.banner.description=This quality gate complies with the {cayc_link} methodology, so that you benefit from the most efficient approach to delivering Clean Code. The quality gate ensures that the {new_code_link} you’re working on has: quality_gates.cayc.banner.list_item1=No bugs quality_gates.cayc.banner.list_item2=No vulnerabilities quality_gates.cayc.banner.list_item3=No security hotspots to review -- 2.39.5