aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorViktor Vorona <viktor.vorona@sonarsource.com>2024-06-03 12:41:03 +0200
committersonartech <sonartech@sonarsource.com>2024-06-03 20:02:59 +0000
commit6ab426e56135b054604d56cc4b259b346743effd (patch)
treef8c2080cf47f714bf61c6d31e5abd691a82e1155 /server
parentbfc11bdefa88f5a7efb0ae67d87d976655a7747b (diff)
downloadsonarqube-6ab426e56135b054604d56cc4b259b346743effd.tar.gz
sonarqube-6ab426e56135b054604d56cc4b259b346743effd.zip
SONAR-22224 Use new tooltips
Diffstat (limited to 'server')
-rw-r--r--server/sonar-web/src/main/js/apps/coding-rules/components/ActivatedRuleActions.tsx5
-rw-r--r--server/sonar-web/src/main/js/apps/coding-rules/components/ActivationFormModal.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/coding-rules/components/RuleListItem.tsx5
-rw-r--r--server/sonar-web/src/main/js/components/issue/components/IssuePrioritized.tsx5
-rw-r--r--server/sonar-web/src/main/js/helpers/doc-links.ts1
5 files changed, 11 insertions, 7 deletions
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/ActivatedRuleActions.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/ActivatedRuleActions.tsx
index e8eb5899505..b1a674d1442 100644
--- a/server/sonar-web/src/main/js/apps/coding-rules/components/ActivatedRuleActions.tsx
+++ b/server/sonar-web/src/main/js/apps/coding-rules/components/ActivatedRuleActions.tsx
@@ -17,10 +17,11 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { DangerButtonSecondary, Tooltip } from 'design-system';
+import { DangerButtonSecondary } from 'design-system';
import * as React from 'react';
import { Profile } from '../../../api/quality-profiles';
import ConfirmButton from '../../../components/controls/ConfirmButton';
+import Tooltip from '../../../components/controls/Tooltip';
import { translate, translateWithParameters } from '../../../helpers/l10n';
import { Rule, RuleActivation } from '../../../types/types';
import ActivationButton from './ActivationButton';
@@ -115,7 +116,7 @@ export default function ActivatedRuleActions(props: Readonly<Props>) {
hasParent &&
!canDeactivateInherited &&
activation.inherit !== 'OVERRIDES' && (
- <Tooltip overlay={translate('coding_rules.can_not_deactivate')}>
+ <Tooltip content={translate('coding_rules.can_not_deactivate')}>
<DangerButtonSecondary
disabled
className="sw-ml-2"
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/ActivationFormModal.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/ActivationFormModal.tsx
index 0aa16e70563..94487afb689 100644
--- a/server/sonar-web/src/main/js/apps/coding-rules/components/ActivationFormModal.tsx
+++ b/server/sonar-web/src/main/js/apps/coding-rules/components/ActivationFormModal.tsx
@@ -158,7 +158,7 @@ export default function ActivationFormModal(props: Readonly<Props>) {
{intl.formatMessage({ id: 'coding_rules.prioritized_rule.note' })}
<DocumentationLink
className="sw-ml-2 sw-whitespace-nowrap"
- to="/instance-administration/quality-profiles/#prioritizing-rules"
+ to={DocLink.InstanceAdminQualityProfilesPrioritizingRules}
>
{intl.formatMessage({ id: 'learn_more' })}
</DocumentationLink>
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleListItem.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleListItem.tsx
index 425f7911f14..25b65e20a73 100644
--- a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleListItem.tsx
+++ b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleListItem.tsx
@@ -37,6 +37,7 @@ import { CleanCodeAttributePill } from '../../../components/shared/CleanCodeAttr
import SoftwareImpactPillList from '../../../components/shared/SoftwareImpactPillList';
import TypeHelper from '../../../components/shared/TypeHelper';
import TagsList from '../../../components/tags/TagsList';
+import { DocLink } from '../../../helpers/doc-links';
import { translate, translateWithParameters } from '../../../helpers/l10n';
import { getRuleUrl } from '../../../helpers/urls';
import {
@@ -282,7 +283,7 @@ export default function RuleListItem(props: Readonly<Props>) {
}
links={[
{
- href: '/user-guide/clean-code/introduction',
+ href: DocLink.CleanCodeIntroduction,
label: translate('learn_more'),
},
]}
@@ -299,7 +300,7 @@ export default function RuleListItem(props: Readonly<Props>) {
<>
<SeparatorCircleIcon aria-hidden as="li" />
<li>
- <Tooltip overlay={translate('coding_rules.rule_template.title')}>
+ <Tooltip content={translate('coding_rules.rule_template.title')}>
<span>
<Badge>{translate('coding_rules.rule_template')}</Badge>
</span>
diff --git a/server/sonar-web/src/main/js/components/issue/components/IssuePrioritized.tsx b/server/sonar-web/src/main/js/components/issue/components/IssuePrioritized.tsx
index 5bdd2246cf3..56ac778de7f 100644
--- a/server/sonar-web/src/main/js/components/issue/components/IssuePrioritized.tsx
+++ b/server/sonar-web/src/main/js/components/issue/components/IssuePrioritized.tsx
@@ -18,13 +18,14 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { TextSubdued, Tooltip } from 'design-system';
+import { Tooltip } from '@sonarsource/echoes-react';
+import { TextSubdued } from 'design-system';
import * as React from 'react';
import { translate } from '../../../helpers/l10n';
export default function IssuePrioritized() {
return (
- <Tooltip overlay={translate('issue.prioritized_rule.description')}>
+ <Tooltip content={translate('issue.prioritized_rule.description')}>
<TextSubdued>{translate('prioritized')}</TextSubdued>
</Tooltip>
);
diff --git a/server/sonar-web/src/main/js/helpers/doc-links.ts b/server/sonar-web/src/main/js/helpers/doc-links.ts
index 271234d3628..a7f62f03eb0 100644
--- a/server/sonar-web/src/main/js/helpers/doc-links.ts
+++ b/server/sonar-web/src/main/js/helpers/doc-links.ts
@@ -56,6 +56,7 @@ export enum DocLink {
InstanceAdminMarketplace = '/instance-administration/marketplace/',
InstanceAdminPluginVersionMatrix = '/instance-administration/plugin-version-matrix/',
InstanceAdminQualityProfiles = '/instance-administration/quality-profiles/',
+ InstanceAdminQualityProfilesPrioritizingRules = '/instance-administration/quality-profiles/#prioritizing-rules',
InstanceAdminReindexation = '/instance-administration/reindexing/',
InstanceAdminSecurity = '/instance-administration/security/',
IssueResolutions = '/user-guide/issues/#resolutions-deprecated',