aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorViktor Vorona <viktor.vorona@sonarsource.com>2024-08-23 15:49:17 +0200
committersonartech <sonartech@sonarsource.com>2024-08-26 20:03:08 +0000
commit1d4b45c8b37cc57c8577744df7adc3de0afc945f (patch)
tree3fa5c216f5e84f73812487f6c6053779a5f550e5 /server
parent9b423d8aa31ff01476bfb29300fa6e3af53f19d9 (diff)
downloadsonarqube-1d4b45c8b37cc57c8577744df7adc3de0afc945f.tar.gz
sonarqube-1d4b45c8b37cc57c8577744df7adc3de0afc945f.zip
SONAR-22728 Change Activity Split line text
Diffstat (limited to 'server')
-rw-r--r--server/sonar-web/src/main/js/components/charts/SplitLinePopover.tsx2
-rw-r--r--server/sonar-web/src/main/js/components/common/DocumentationLink.tsx16
2 files changed, 13 insertions, 5 deletions
diff --git a/server/sonar-web/src/main/js/components/charts/SplitLinePopover.tsx b/server/sonar-web/src/main/js/components/charts/SplitLinePopover.tsx
index 3d29dc59f22..5fab13951de 100644
--- a/server/sonar-web/src/main/js/components/charts/SplitLinePopover.tsx
+++ b/server/sonar-web/src/main/js/components/charts/SplitLinePopover.tsx
@@ -45,7 +45,7 @@ export default function SplitLinePopover({ paddingLeft, splitPointDate, xScale }
title={translate('project_activity.graphs.rating_split.title')}
description={translate('project_activity.graphs.rating_split.description')}
footer={
- <DocumentationLink to={DocLink.MetricDefinitions}>
+ <DocumentationLink standalone to={DocLink.MetricDefinitions}>
{translate('learn_more')}
</DocumentationLink>
}
diff --git a/server/sonar-web/src/main/js/components/common/DocumentationLink.tsx b/server/sonar-web/src/main/js/components/common/DocumentationLink.tsx
index 1942843ef1f..b95aeeb4688 100644
--- a/server/sonar-web/src/main/js/components/common/DocumentationLink.tsx
+++ b/server/sonar-web/src/main/js/components/common/DocumentationLink.tsx
@@ -18,15 +18,23 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { Link, LinkProps } from '@sonarsource/echoes-react';
+import { Link, LinkProps, LinkStandalone } from '@sonarsource/echoes-react';
import * as React from 'react';
import { DocLink } from '../../helpers/doc-links';
import { useDocUrl } from '../../helpers/docs';
-type Props = Omit<LinkProps, 'to'> & { innerRef?: React.Ref<HTMLAnchorElement>; to: DocLink };
+type Props = Omit<LinkProps, 'to'> & {
+ innerRef?: React.Ref<HTMLAnchorElement>;
+ standalone?: boolean;
+ to: DocLink;
+};
-export default function DocumentationLink({ to, innerRef, ...props }: Props) {
+export default function DocumentationLink({ to, innerRef, standalone = false, ...props }: Props) {
const toStatic = useDocUrl(to);
- return <Link ref={innerRef} to={toStatic} {...props} />;
+ return standalone ? (
+ <LinkStandalone ref={innerRef} to={toStatic} {...props} />
+ ) : (
+ <Link ref={innerRef} to={toStatic} {...props} />
+ );
}