aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRevanshu Paliwal <revanshu.paliwal@sonarsource.com>2023-01-24 15:45:25 +0100
committersonartech <sonartech@sonarsource.com>2023-02-03 14:41:20 +0000
commit2d1ab592f000d85e8b41e5c00a76ac47ed0ee48d (patch)
treea508c6244f4af46970fd2e0e12eeab029688576e
parentb794086251be96e2ae0c24030ece55870d4b3f09 (diff)
downloadsonarqube-2d1ab592f000d85e8b41e5c00a76ac47ed0ee48d.tar.gz
sonarqube-2d1ab592f000d85e8b41e5c00a76ac47ed0ee48d.zip
SONAR-17815 Updating links for learn more CAYC and translation changes
-rw-r--r--server/sonar-web/src/main/js/apps/overview/branches/CleanAsYouCodeWarning.tsx8
-rw-r--r--server/sonar-web/src/main/js/apps/quality-gates/components/DetailsHeader.tsx4
-rw-r--r--server/sonar-web/src/main/js/components/ui/Alert.tsx5
-rw-r--r--server/sonar-web/src/main/js/components/ui/__tests__/__snapshots__/Alert-test.tsx.snap5
-rw-r--r--sonar-core/src/main/resources/org/sonar/l10n/core.properties2
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) {
</div>
)}
- <Link
- target="_blank"
- to="https://docs.sonarqube.org/latest/user-guide/clean-as-you-code/#quality-gate"
- >
+ <DocLink to="/user-guide/clean-as-you-code/">
{translate('overview.quality_gate.conditions.cayc.link')}
- </Link>
+ </DocLink>
</>
);
}
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<void>;
}
+const TOOLTIP_MOUSE_LEAVE_DELAY = 0.3;
+
export default class DetailsHeader extends React.PureComponent<Props> {
handleActionRefresh = () => {
const { refreshItem, refreshList } = this.props;
@@ -72,7 +74,7 @@ export default class DetailsHeader extends React.PureComponent<Props> {
<h2>{qualityGate.name}</h2>
{qualityGate.isBuiltIn && <BuiltInQualityGateBadge className="spacer-left" />}
{!qualityGate.isCaycCompliant && (
- <Tooltip overlay={<CaycBadgeTooltip />}>
+ <Tooltip overlay={<CaycBadgeTooltip />} mouseLeaveDelay={TOOLTIP_MOUSE_LEAVE_DELAY}>
<AlertWarnIcon className="spacer-left" />
</Tooltip>
)}
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