]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-17815 Updating links for learn more CAYC and translation changes
authorRevanshu Paliwal <revanshu.paliwal@sonarsource.com>
Tue, 24 Jan 2023 14:45:25 +0000 (15:45 +0100)
committersonartech <sonartech@sonarsource.com>
Fri, 3 Feb 2023 14:41:20 +0000 (14:41 +0000)
server/sonar-web/src/main/js/apps/overview/branches/CleanAsYouCodeWarning.tsx
server/sonar-web/src/main/js/apps/quality-gates/components/DetailsHeader.tsx
server/sonar-web/src/main/js/components/ui/Alert.tsx
server/sonar-web/src/main/js/components/ui/__tests__/__snapshots__/Alert-test.tsx.snap
sonar-core/src/main/resources/org/sonar/l10n/core.properties

index 7dd4dc118c210674475f0aa60988c98a5a6ae007..9dbb28caa5c81419c9f2afcea5f6a54752ee68cd 100644 (file)
@@ -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>
     </>
   );
 }
index 49b1b5213fd090d08478f852a21b647073826322..53e5490d777e22b1049f422c0ad8c4b8cbe17f7c 100644 (file)
@@ -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>
               )}
index 57b190ce00b808b8daef6221b5f1503d64ed502b..b73db54ab2c46edb1e7e8aa03110d2d7194fc9c7 100644 (file)
@@ -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};
   }
 `;
index e60826739f76ea571513b6e0097b3995c5115fe1..9fb48a19931ecafb29cb7ceca2463d777e6d590a 100644 (file)
@@ -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;
 }
 
index c6aeb863cfddc2ce5bdcc395b51765335942aec6..24801719a71f9f9f1b94d706a60fced70370cbd6 100644 (file)
@@ -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