]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-17027 Align the way we display links (internal & external) in the UI
authorWouter Admiraal <wouter.admiraal@sonarsource.com>
Thu, 25 Aug 2022 08:45:27 +0000 (10:45 +0200)
committersonartech <sonartech@sonarsource.com>
Mon, 29 Aug 2022 20:02:53 +0000 (20:02 +0000)
288 files changed:
server/sonar-web/package.json
server/sonar-web/src/main/js/app/components/ComponentContainerNotFound.tsx
server/sonar-web/src/main/js/app/components/GlobalFooter.tsx
server/sonar-web/src/main/js/app/components/KeyboardShortcutsModal.tsx
server/sonar-web/src/main/js/app/components/NotFound.tsx
server/sonar-web/src/main/js/app/components/__tests__/__snapshots__/GlobalFooter-test.tsx.snap
server/sonar-web/src/main/js/app/components/__tests__/__snapshots__/KeyboardShortcutsModal-test.tsx.snap
server/sonar-web/src/main/js/app/components/indexation/IndexationNotificationRenderer.tsx
server/sonar-web/src/main/js/app/components/indexation/__tests__/__snapshots__/IndexationNotificationRenderer-test.tsx.snap
server/sonar-web/src/main/js/app/components/nav/component/Breadcrumb.tsx
server/sonar-web/src/main/js/app/components/nav/component/ComponentNavBgTaskNotif.tsx
server/sonar-web/src/main/js/app/components/nav/component/ComponentNavLicenseNotif.tsx
server/sonar-web/src/main/js/app/components/nav/component/ComponentNavProjectBindingErrorNotif.tsx
server/sonar-web/src/main/js/app/components/nav/component/HeaderMeta.tsx
server/sonar-web/src/main/js/app/components/nav/component/__tests__/__snapshots__/ComponentNavLicenseNotif-test.tsx.snap
server/sonar-web/src/main/js/app/components/nav/component/__tests__/__snapshots__/ComponentNavProjectBindingErrorNotif-test.tsx.snap
server/sonar-web/src/main/js/app/components/nav/component/__tests__/__snapshots__/HeaderMeta-test.tsx.snap
server/sonar-web/src/main/js/app/components/nav/component/branch-like/CurrentBranchLike.tsx
server/sonar-web/src/main/js/app/components/nav/component/branch-like/Menu.tsx
server/sonar-web/src/main/js/app/components/nav/component/branch-like/__tests__/Menu-test.tsx
server/sonar-web/src/main/js/app/components/nav/component/branch-like/__tests__/__snapshots__/CurrentBranchLike-test.tsx.snap
server/sonar-web/src/main/js/app/components/nav/component/branch-like/__tests__/__snapshots__/Menu-test.tsx.snap
server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/MetaQualityGate.tsx
server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/MetaQualityProfiles.tsx
server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/__tests__/__snapshots__/MetaQualityProfiles-test.tsx.snap
server/sonar-web/src/main/js/app/components/nav/global/GlobalNavBranding.tsx
server/sonar-web/src/main/js/app/components/nav/global/GlobalNavMenu.tsx
server/sonar-web/src/main/js/app/components/nav/global/GlobalNavUser.tsx
server/sonar-web/src/main/js/app/components/nav/global/__tests__/__snapshots__/GlobalNavBranding-test.tsx.snap
server/sonar-web/src/main/js/app/components/nav/settings/SystemRestartNotif.tsx
server/sonar-web/src/main/js/app/components/nav/settings/__tests__/__snapshots__/SystemRestartNotif-test.tsx.snap
server/sonar-web/src/main/js/app/components/search/SearchResult.tsx
server/sonar-web/src/main/js/app/components/search/__tests__/__snapshots__/SearchResult-test.tsx.snap
server/sonar-web/src/main/js/app/components/update-notification/__tests__/UpdateNotification-test.tsx
server/sonar-web/src/main/js/app/styles/init/links.css
server/sonar-web/src/main/js/apps/account/projects/ProjectCard.tsx
server/sonar-web/src/main/js/apps/audit-logs/components/AuditAppRenderer.tsx
server/sonar-web/src/main/js/apps/audit-logs/components/__tests__/__snapshots__/AuditAppRenderer-test.tsx.snap
server/sonar-web/src/main/js/apps/background-tasks/components/Header.tsx
server/sonar-web/src/main/js/apps/background-tasks/components/NoWorkersSupportPopup.tsx
server/sonar-web/src/main/js/apps/background-tasks/components/TaskComponent.tsx
server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/__snapshots__/NoWorkersSupportPopup-test.tsx.snap
server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/__snapshots__/TaskComponent-test.tsx.snap
server/sonar-web/src/main/js/apps/code/components/ComponentName.tsx
server/sonar-web/src/main/js/apps/code/components/__tests__/__snapshots__/ComponentName-test.tsx.snap
server/sonar-web/src/main/js/apps/coding-rules/__tests__/CodingRules-it.ts
server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsCustomRules.tsx
server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsIssues.tsx
server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsMeta.tsx
server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsProfiles.tsx
server/sonar-web/src/main/js/apps/coding-rules/components/RuleListItem.tsx
server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/RuleListItem-test.tsx
server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/__snapshots__/RuleDetailsIssues-test.tsx.snap
server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/__snapshots__/RuleDetailsMeta-test.tsx.snap
server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/__snapshots__/RuleListItem-test.tsx.snap
server/sonar-web/src/main/js/apps/component-measures/components/MeasureHeader.tsx
server/sonar-web/src/main/js/apps/component-measures/components/__tests__/__snapshots__/MeasureHeader-test.tsx.snap
server/sonar-web/src/main/js/apps/component-measures/drilldown/BubbleChart.tsx
server/sonar-web/src/main/js/apps/component-measures/drilldown/ComponentCell.tsx
server/sonar-web/src/main/js/apps/component-measures/drilldown/__tests__/ComponentCell-test.tsx
server/sonar-web/src/main/js/apps/component-measures/drilldown/__tests__/__snapshots__/BubbleChart-test.tsx.snap
server/sonar-web/src/main/js/apps/component-measures/drilldown/__tests__/__snapshots__/ComponentCell-test.tsx.snap
server/sonar-web/src/main/js/apps/create/project/AzurePersonalAccessTokenForm.tsx
server/sonar-web/src/main/js/apps/create/project/AzureProjectAccordion.tsx
server/sonar-web/src/main/js/apps/create/project/AzureProjectCreateRenderer.tsx
server/sonar-web/src/main/js/apps/create/project/AzureProjectsList.tsx
server/sonar-web/src/main/js/apps/create/project/BitbucketCloudSearchForm.tsx
server/sonar-web/src/main/js/apps/create/project/BitbucketImportRepositoryForm.tsx
server/sonar-web/src/main/js/apps/create/project/BitbucketProjectAccordion.tsx
server/sonar-web/src/main/js/apps/create/project/GitHubProjectCreateRenderer.tsx
server/sonar-web/src/main/js/apps/create/project/GitlabProjectSelectionForm.tsx
server/sonar-web/src/main/js/apps/create/project/WrongBindingCountAlert.tsx
server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/AzurePersonalAccessTokenForm-test.tsx.snap
server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/AzureProjectAccordion-test.tsx.snap
server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/AzureProjectCreateRenderer-test.tsx.snap
server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/AzureProjectsList-test.tsx.snap
server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/BitbucketCloudSearchForm-test.tsx.snap
server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/BitbucketImportRepositoryForm-test.tsx.snap
server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/BitbucketProjectAccordion-test.tsx.snap
server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/GitHubProjectCreateRenderer-test.tsx.snap
server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/GitlabProjectSelectionForm-test.tsx.snap
server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/WrongBindingCountAlert-test.tsx.snap
server/sonar-web/src/main/js/apps/documentation/components/App.tsx
server/sonar-web/src/main/js/apps/documentation/components/MenuItem.tsx
server/sonar-web/src/main/js/apps/documentation/components/SearchResultEntry.tsx
server/sonar-web/src/main/js/apps/documentation/components/__tests__/__snapshots__/App-test.tsx.snap
server/sonar-web/src/main/js/apps/documentation/components/__tests__/__snapshots__/MenuItem-test.tsx.snap
server/sonar-web/src/main/js/apps/documentation/components/__tests__/__snapshots__/SearchResultEntry-test.tsx.snap
server/sonar-web/src/main/js/apps/issues/components/IssueHeader.tsx
server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/IssueSourceViewerHeader.tsx
server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/__tests__/__snapshots__/IssueSourceViewerHeader-test.tsx.snap
server/sonar-web/src/main/js/apps/maintenance/components/App.tsx
server/sonar-web/src/main/js/apps/maintenance/components/__tests__/__snapshots__/App-test.tsx.snap
server/sonar-web/src/main/js/apps/marketplace/App.tsx
server/sonar-web/src/main/js/apps/marketplace/__tests__/__snapshots__/App-test.tsx.snap
server/sonar-web/src/main/js/apps/marketplace/components/LicensePromptModal.tsx
server/sonar-web/src/main/js/apps/marketplace/components/PluginActions.tsx
server/sonar-web/src/main/js/apps/marketplace/components/__tests__/__snapshots__/PluginActions-test.tsx.snap
server/sonar-web/src/main/js/apps/overview/branches/FirstAnalysisNextStepsNotif.tsx
server/sonar-web/src/main/js/apps/overview/branches/MeasuresPanelNoNewCode.tsx
server/sonar-web/src/main/js/apps/overview/branches/__tests__/MeasuresPanelNoNewCode-test.tsx
server/sonar-web/src/main/js/apps/overview/branches/__tests__/__snapshots__/FirstAnalysisNextStepsNotif-test.tsx.snap
server/sonar-web/src/main/js/apps/overview/branches/__tests__/__snapshots__/MeasuresPanelNoNewCode-test.tsx.snap
server/sonar-web/src/main/js/apps/overview/components/IssueLabel.tsx
server/sonar-web/src/main/js/apps/overview/components/QualityGateCondition.tsx
server/sonar-web/src/main/js/apps/overview/components/__tests__/__snapshots__/IssueLabel-test.tsx.snap
server/sonar-web/src/main/js/apps/overview/components/__tests__/__snapshots__/QualityGateCondition-test.tsx.snap
server/sonar-web/src/main/js/apps/overview/pullRequests/LargeQualityGateBadge.tsx
server/sonar-web/src/main/js/apps/overview/pullRequests/__tests__/__snapshots__/LargeQualityGateBadge-test.tsx.snap
server/sonar-web/src/main/js/apps/permission-templates/components/NameCell.tsx
server/sonar-web/src/main/js/apps/permission-templates/components/TemplateHeader.tsx
server/sonar-web/src/main/js/apps/permission-templates/components/__tests__/__snapshots__/NameCell-test.tsx.snap
server/sonar-web/src/main/js/apps/projectActivity/components/DefinitionChangeEventInner.tsx
server/sonar-web/src/main/js/apps/projectActivity/components/RichQualityGateEventInner.tsx
server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/DefinitionChangeEventInner-test.tsx.snap
server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/RichQualityGateEventInner-test.tsx.snap
server/sonar-web/src/main/js/apps/projectBaseline/components/AppHeader.tsx
server/sonar-web/src/main/js/apps/projectBaseline/components/__tests__/__snapshots__/AppHeader-test.tsx.snap
server/sonar-web/src/main/js/apps/projectBranches/components/LifetimeInformationRenderer.tsx
server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/__snapshots__/LifetimeInformationRenderer-test.tsx.snap
server/sonar-web/src/main/js/apps/projectDump/components/Export.tsx
server/sonar-web/src/main/js/apps/projectDump/components/Import.tsx
server/sonar-web/src/main/js/apps/projectDump/components/__tests__/__snapshots__/Export-test.tsx.snap
server/sonar-web/src/main/js/apps/projectDump/components/__tests__/__snapshots__/Import-test.tsx.snap
server/sonar-web/src/main/js/apps/projectLinks/LinkRow.tsx
server/sonar-web/src/main/js/apps/projectLinks/__tests__/__snapshots__/LinkRow-test.tsx.snap
server/sonar-web/src/main/js/apps/projectQualityGate/ProjectQualityGateAppRenderer.tsx
server/sonar-web/src/main/js/apps/projectQualityGate/__tests__/__snapshots__/ProjectQualityGateAppRenderer-test.tsx.snap
server/sonar-web/src/main/js/apps/projectQualityProfiles/ProjectQualityProfilesAppRenderer.tsx
server/sonar-web/src/main/js/apps/projectQualityProfiles/__tests__/__snapshots__/ProjectQualityProfilesAppRenderer-test.tsx.snap
server/sonar-web/src/main/js/apps/projectQualityProfiles/components/LanguageProfileSelectOption.tsx
server/sonar-web/src/main/js/apps/projectQualityProfiles/components/__tests__/__snapshots__/LanguageProfileSelectOption-test.tsx.snap
server/sonar-web/src/main/js/apps/projects/components/EmptyFavoriteSearch.tsx
server/sonar-web/src/main/js/apps/projects/components/NoFavoriteProjects.tsx
server/sonar-web/src/main/js/apps/projects/components/ProjectCreationMenu.tsx
server/sonar-web/src/main/js/apps/projects/components/ProjectCreationMenuItem.tsx
server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/NoFavoriteProjects-test.tsx.snap
server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/ProjectCreationMenu-test.tsx.snap
server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/ProjectCreationMenuItem-test.tsx.snap
server/sonar-web/src/main/js/apps/projects/components/project-card/ProjectCard.tsx
server/sonar-web/src/main/js/apps/projects/components/project-card/__tests__/__snapshots__/ProjectCard-test.tsx.snap
server/sonar-web/src/main/js/apps/projectsManagement/CreateProjectForm.tsx
server/sonar-web/src/main/js/apps/projectsManagement/ProjectRow.tsx
server/sonar-web/src/main/js/apps/projectsManagement/__tests__/__snapshots__/CreateProjectForm-test.tsx.snap
server/sonar-web/src/main/js/apps/projectsManagement/__tests__/__snapshots__/ProjectRow-test.tsx.snap
server/sonar-web/src/main/js/apps/quality-profiles/changelog/Changelog.tsx
server/sonar-web/src/main/js/apps/quality-profiles/changelog/__tests__/Changelog-test.tsx
server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResults.tsx
server/sonar-web/src/main/js/apps/quality-profiles/compare/__tests__/ComparisonResults-test.tsx
server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileExporters.tsx
server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileHeader.tsx
server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileProjects.tsx
server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRules.tsx
server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRulesDeprecatedWarning.tsx
server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRulesRowOfType.tsx
server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRulesRowTotal.tsx
server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRulesSonarWayComparison.tsx
server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/__snapshots__/ProfileExporters-test.tsx.snap
server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/__snapshots__/ProfileHeader-test.tsx.snap
server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/__snapshots__/ProfileProjects-test.tsx.snap
server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/__snapshots__/ProfileRules-test.tsx.snap
server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/__snapshots__/ProfileRulesDeprecatedWarning-test.tsx.snap
server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/__snapshots__/ProfileRulesRowOfType-test.tsx.snap
server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/__snapshots__/ProfileRulesRowTotal-test.tsx.snap
server/sonar-web/src/main/js/apps/quality-profiles/details/__tests__/__snapshots__/ProfileRulesSonarWayComparison-test.tsx.snap
server/sonar-web/src/main/js/apps/quality-profiles/home/EvolutionDeprecated.tsx
server/sonar-web/src/main/js/apps/quality-profiles/home/EvolutionRules.tsx
server/sonar-web/src/main/js/apps/quality-profiles/home/PageHeader.tsx
server/sonar-web/src/main/js/apps/quality-profiles/home/ProfilesListRow.tsx
server/sonar-web/src/main/js/apps/quality-profiles/home/__tests__/__snapshots__/EvolutionDeprecated-test.tsx.snap
server/sonar-web/src/main/js/apps/quality-profiles/home/__tests__/__snapshots__/PageHeader-test.tsx.snap
server/sonar-web/src/main/js/apps/quality-profiles/home/__tests__/__snapshots__/ProfilesListRow-test.tsx.snap
server/sonar-web/src/main/js/apps/security-hotspots/components/EmptyHotspotsPage.tsx
server/sonar-web/src/main/js/apps/security-hotspots/components/HotspotHeader.tsx
server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/__snapshots__/EmptyHotspotsPage-test.tsx.snap
server/sonar-web/src/main/js/apps/security-hotspots/components/__tests__/__snapshots__/HotspotHeader-test.tsx.snap
server/sonar-web/src/main/js/apps/sessions/components/LoginForm.tsx
server/sonar-web/src/main/js/apps/sessions/components/Unauthorized.tsx
server/sonar-web/src/main/js/apps/sessions/components/__tests__/__snapshots__/LoginForm-test.tsx.snap
server/sonar-web/src/main/js/apps/sessions/components/__tests__/__snapshots__/Unauthorized-test.tsx.snap
server/sonar-web/src/main/js/apps/settings/components/AnalysisScope.tsx
server/sonar-web/src/main/js/apps/settings/components/NewCodePeriod.tsx
server/sonar-web/src/main/js/apps/settings/components/SettingsSearchRenderer.tsx
server/sonar-web/src/main/js/apps/settings/components/__tests__/__snapshots__/AnalysisScope-test.tsx.snap
server/sonar-web/src/main/js/apps/settings/components/__tests__/__snapshots__/NewCodePeriod-test.tsx.snap
server/sonar-web/src/main/js/apps/settings/components/__tests__/__snapshots__/SettingsSearchRenderer-test.tsx.snap
server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmBindingDefinitionBox.tsx
server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmBindingDefinitionFormField.tsx
server/sonar-web/src/main/js/apps/settings/components/almIntegration/AlmTabRenderer.tsx
server/sonar-web/src/main/js/apps/settings/components/almIntegration/AzureForm.tsx
server/sonar-web/src/main/js/apps/settings/components/almIntegration/BitbucketCloudForm.tsx
server/sonar-web/src/main/js/apps/settings/components/almIntegration/BitbucketServerForm.tsx
server/sonar-web/src/main/js/apps/settings/components/almIntegration/GithubForm.tsx
server/sonar-web/src/main/js/apps/settings/components/almIntegration/GitlabForm.tsx
server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/AlmBindingDefinitionBox-test.tsx.snap
server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/AlmBindingDefinitionFormField-test.tsx.snap
server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/AlmTabRenderer-test.tsx.snap
server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/AzureForm-test.tsx.snap
server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/BitbucketCloudForm-test.tsx.snap
server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/BitbucketServerForm-test.tsx.snap
server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/GithubForm-test.tsx.snap
server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/GitlabForm-test.tsx.snap
server/sonar-web/src/main/js/apps/settings/components/authentication/Authentication.tsx
server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/AlmSpecificForm.tsx
server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/PRDecorationBindingRenderer.tsx
server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/__tests__/__snapshots__/AlmSpecificForm-test.tsx.snap
server/sonar-web/src/main/js/apps/settings/components/pullRequestDecorationBinding/__tests__/__snapshots__/PRDecorationBindingRenderer-test.tsx.snap
server/sonar-web/src/main/js/apps/settings/encryption/EncryptionForm.tsx
server/sonar-web/src/main/js/apps/settings/encryption/GenerateSecretKeyForm.tsx
server/sonar-web/src/main/js/apps/settings/encryption/__tests__/__snapshots__/EncryptionForm-test.tsx.snap
server/sonar-web/src/main/js/apps/settings/encryption/__tests__/__snapshots__/GenerateSecretKeyForm-test.tsx.snap
server/sonar-web/src/main/js/apps/web-api/components/Action.tsx
server/sonar-web/src/main/js/apps/web-api/components/Menu.tsx
server/sonar-web/src/main/js/apps/web-api/components/WebApiApp.tsx
server/sonar-web/src/main/js/apps/web-api/components/__tests__/__snapshots__/Action-test.tsx.snap
server/sonar-web/src/main/js/apps/web-api/components/__tests__/__snapshots__/Menu-test.tsx.snap
server/sonar-web/src/main/js/apps/web-api/components/__tests__/__snapshots__/WebApiApp-test.tsx.snap
server/sonar-web/src/main/js/apps/webhooks/components/PageHeader.tsx
server/sonar-web/src/main/js/apps/webhooks/components/__tests__/__snapshots__/PageHeader-test.tsx.snap
server/sonar-web/src/main/js/components/SourceViewer/SourceViewerHeader.tsx
server/sonar-web/src/main/js/components/SourceViewer/__tests__/__snapshots__/SourceViewerHeader-test.tsx.snap
server/sonar-web/src/main/js/components/SourceViewer/components/DuplicationPopup.tsx
server/sonar-web/src/main/js/components/SourceViewer/components/MeasuresOverlay.tsx
server/sonar-web/src/main/js/components/SourceViewer/components/__tests__/__snapshots__/MeasuresOverlay-test.tsx.snap
server/sonar-web/src/main/js/components/charts/BubbleChart.tsx
server/sonar-web/src/main/js/components/charts/TreeMapRect.tsx
server/sonar-web/src/main/js/components/charts/__tests__/BubbleChart-test.tsx
server/sonar-web/src/main/js/components/common/ActivityLink.tsx
server/sonar-web/src/main/js/components/common/DocumentationTooltip.tsx
server/sonar-web/src/main/js/components/common/Link.tsx [new file with mode: 0644]
server/sonar-web/src/main/js/components/common/MeasuresLink.tsx
server/sonar-web/src/main/js/components/common/__tests__/Link-test.tsx [new file with mode: 0644]
server/sonar-web/src/main/js/components/common/__tests__/__snapshots__/ActivityLink-test.tsx.snap
server/sonar-web/src/main/js/components/common/__tests__/__snapshots__/DocumentationTooltip-test.tsx.snap
server/sonar-web/src/main/js/components/common/__tests__/__snapshots__/MeasuresLink-test.tsx.snap
server/sonar-web/src/main/js/components/controls/ActionsDropdown.tsx
server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/ActionsDropdown-test.tsx.snap
server/sonar-web/src/main/js/components/docs/DocLink.tsx
server/sonar-web/src/main/js/components/docs/DocTooltipLink.tsx
server/sonar-web/src/main/js/components/docs/__tests__/__snapshots__/DocLink-test.tsx.snap
server/sonar-web/src/main/js/components/docs/__tests__/__snapshots__/DocTooltipLink-test.tsx.snap
server/sonar-web/src/main/js/components/embed-docs-modal/EmbedDocsPopup.tsx
server/sonar-web/src/main/js/components/issue/components/IssueMessageTags.tsx
server/sonar-web/src/main/js/components/issue/components/IssueTitleBar.tsx
server/sonar-web/src/main/js/components/issue/components/__tests__/__snapshots__/IssueTitleBar-test.tsx.snap
server/sonar-web/src/main/js/components/issue/popups/SetTransitionPopup.tsx
server/sonar-web/src/main/js/components/rules/OtherContextOption.tsx
server/sonar-web/src/main/js/components/shared/DrilldownLink.tsx
server/sonar-web/src/main/js/components/shared/__tests__/__snapshots__/DrilldownLink-test.tsx.snap
server/sonar-web/src/main/js/components/tutorials/azure-pipelines/ExtensionInstallationStepContent.tsx
server/sonar-web/src/main/js/components/tutorials/azure-pipelines/__tests__/__snapshots__/ExtensionInstallationStepContent-test.tsx.snap
server/sonar-web/src/main/js/components/tutorials/azure-pipelines/commands/AlertClassicEditor.tsx
server/sonar-web/src/main/js/components/tutorials/azure-pipelines/commands/PublishSteps.tsx
server/sonar-web/src/main/js/components/tutorials/azure-pipelines/commands/__tests__/__snapshots__/AlertClassicEditor-test.tsx.snap
server/sonar-web/src/main/js/components/tutorials/azure-pipelines/commands/__tests__/__snapshots__/PublishSteps-test.tsx.snap
server/sonar-web/src/main/js/components/tutorials/components/EditTokenModal.tsx
server/sonar-web/src/main/js/components/tutorials/components/GithubCFamilyExampleRepositories.tsx
server/sonar-web/src/main/js/components/tutorials/components/__tests__/__snapshots__/GithubCFamilyExampleRepositories-test.tsx.snap
server/sonar-web/src/main/js/components/tutorials/jenkins/PreRequisitesStep.tsx
server/sonar-web/src/main/js/components/tutorials/jenkins/WebhookStepBitbucket.tsx
server/sonar-web/src/main/js/components/tutorials/jenkins/WebhookStepGithub.tsx
server/sonar-web/src/main/js/components/tutorials/jenkins/__tests__/__snapshots__/PreRequisitesStep-test.tsx.snap
server/sonar-web/src/main/js/components/tutorials/jenkins/__tests__/__snapshots__/WebhookStepBitbucket-test.tsx.snap
server/sonar-web/src/main/js/components/tutorials/jenkins/__tests__/__snapshots__/WebhookStepGithub-test.tsx.snap
server/sonar-web/src/main/js/components/tutorials/other/DoneNextSteps.tsx
server/sonar-web/src/main/js/components/tutorials/other/TokenStep.tsx
server/sonar-web/src/main/js/components/tutorials/other/__tests__/__snapshots__/DoneNextSteps-test.tsx.snap
server/sonar-web/src/main/js/components/tutorials/other/__tests__/__snapshots__/TokenStep-test.tsx.snap
server/sonar-web/src/main/js/components/tutorials/other/commands/DotNetExecute.tsx
server/sonar-web/src/main/js/components/tutorials/other/commands/DotNetFramework.tsx
server/sonar-web/src/main/js/components/tutorials/other/commands/DownloadScanner.tsx
server/sonar-web/src/main/js/components/tutorials/other/commands/ExecBuildWrapper.tsx
server/sonar-web/src/main/js/components/tutorials/other/commands/ExecScanner.tsx
server/sonar-web/src/main/js/components/tutorials/other/commands/JavaGradle.tsx
server/sonar-web/src/main/js/components/tutorials/other/commands/JavaMaven.tsx
server/sonar-web/src/main/js/components/tutorials/other/commands/__tests__/__snapshots__/DotNetExecute-test.tsx.snap
server/sonar-web/src/main/js/components/tutorials/other/commands/__tests__/__snapshots__/DotNetFramework-test.tsx.snap
server/sonar-web/src/main/js/components/tutorials/other/commands/__tests__/__snapshots__/DownloadScanner-test.tsx.snap
server/sonar-web/src/main/js/components/tutorials/other/commands/__tests__/__snapshots__/ExecBuildWrapper-test.tsx.snap
server/sonar-web/src/main/js/components/tutorials/other/commands/__tests__/__snapshots__/ExecScanner-test.tsx.snap
server/sonar-web/src/main/js/components/tutorials/other/commands/__tests__/__snapshots__/JavaGradle-test.tsx.snap
server/sonar-web/src/main/js/components/tutorials/other/commands/__tests__/__snapshots__/JavaMaven-test.tsx.snap
server/sonar-web/src/main/js/components/upgrade/SystemUpgradeForm.tsx
server/sonar-web/src/main/js/components/upgrade/SystemUpgradeItem.tsx
server/sonar-web/src/main/js/components/upgrade/__tests__/__snapshots__/SystemUpgradeForm-test.tsx.snap
server/sonar-web/src/main/js/components/upgrade/__tests__/__snapshots__/SystemUpgradeItem-test.tsx.snap
server/sonar-web/src/main/js/helpers/mocks/system-upgrades.ts
sonar-core/src/main/resources/org/sonar/l10n/core.properties

index 0c4c2d124e45b29d17d4947d27a2f93b5d7ea6fc..a2ffdeec0efcae0afa4028dac85d64990b4ebe8f 100644 (file)
@@ -7,7 +7,6 @@
   "dependencies": {
     "@emotion/react": "11.10.0",
     "@emotion/styled": "11.10.0",
-    "@types/diff": "5.0.2",
     "classnames": "2.3.1",
     "clipboard": "2.0.11",
     "core-js": "3.21.1",
@@ -61,6 +60,7 @@
     "@types/d3-selection": "1.3.2",
     "@types/d3-shape": "1.2.4",
     "@types/d3-zoom": "1.7.3",
+    "@types/diff": "5.0.2",
     "@types/dompurify": "2.3.3",
     "@types/enzyme": "3.10.5",
     "@types/jest": "27.4.1",
index c6fb0f8c382ce8dd17fdaaac43acaa3715c51634..4375ae160bc8b6473db3ce4155a34e54133dc90c 100644 (file)
@@ -19,7 +19,7 @@
  */
 import * as React from 'react';
 import { Helmet } from 'react-helmet-async';
-import { Link } from 'react-router-dom';
+import Link from '../../components/common/Link';
 import { translate } from '../../helpers/l10n';
 
 export default function ComponentContainerNotFound() {
index 70d929392fd989c88da57967775ec47fc83fc98c..7631e5345a6d4d6b0982572fdf6b518473689854 100644 (file)
@@ -18,8 +18,8 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import * as React from 'react';
-import { Link } from 'react-router-dom';
 import InstanceMessage from '../../components/common/InstanceMessage';
+import Link from '../../components/common/Link';
 import { Alert } from '../../components/ui/Alert';
 import { getEdition } from '../../helpers/editions';
 import { translate, translateWithParameters } from '../../helpers/l10n';
index bb9da9bbc6f7dc98638c233359beb6d559a5b526..15c6672a055994ab63e1f2b61334aba297db7012 100644 (file)
@@ -18,7 +18,7 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../components/common/Link';
 import { Button } from '../../components/controls/buttons';
 import Modal from '../../components/controls/Modal';
 import { isInput } from '../../helpers/keyboardEventHelpers';
index 2c5546b4a4a67094627c4eddf9fe3ed6ac6fda21..9ad45060d035f8f400a32cc2eb203a7be5ff520f 100644 (file)
@@ -19,7 +19,7 @@
  */
 import * as React from 'react';
 import { Helmet } from 'react-helmet-async';
-import { Link } from 'react-router-dom';
+import Link from '../../components/common/Link';
 import { translate } from '../../helpers/l10n';
 import SimpleContainer from './SimpleContainer';
 
index 233f033bc312c34af1a518d65c25e2b00ecc9f7f..93db6c4ba6f03f314ba31b5ca5f07774f0b1b104 100644 (file)
@@ -44,11 +44,11 @@ exports[`should display the sq version 1`] = `
     <li
       className="page-footer-menu-item"
     >
-      <Link
+      <ForwardRef(Link)
         to="/documentation"
       >
         footer.documentation
-      </Link>
+      </ForwardRef(Link)>
     </li>
     <li
       className="page-footer-menu-item"
@@ -64,11 +64,11 @@ exports[`should display the sq version 1`] = `
     <li
       className="page-footer-menu-item"
     >
-      <Link
+      <ForwardRef(Link)
         to="/web_api"
       >
         footer.web_api
-      </Link>
+      </ForwardRef(Link)>
     </li>
   </ul>
 </div>
@@ -108,11 +108,11 @@ exports[`should not render the only logged in information 1`] = `
     <li
       className="page-footer-menu-item"
     >
-      <Link
+      <ForwardRef(Link)
         to="/documentation"
       >
         footer.documentation
-      </Link>
+      </ForwardRef(Link)>
     </li>
     <li
       className="page-footer-menu-item"
@@ -173,11 +173,11 @@ exports[`should render the only logged in information 1`] = `
     <li
       className="page-footer-menu-item"
     >
-      <Link
+      <ForwardRef(Link)
         to="/documentation"
       >
         footer.documentation
-      </Link>
+      </ForwardRef(Link)>
     </li>
     <li
       className="page-footer-menu-item"
@@ -193,11 +193,11 @@ exports[`should render the only logged in information 1`] = `
     <li
       className="page-footer-menu-item"
     >
-      <Link
+      <ForwardRef(Link)
         to="/web_api"
       >
         footer.web_api
-      </Link>
+      </ForwardRef(Link)>
     </li>
   </ul>
 </div>
index 595ebb03f549334b1482157f83ff8ff35d7bec06..f63709831aad3695934738b210abcaf7b7f95172 100644 (file)
@@ -14,12 +14,12 @@ exports[`should render correctly: visible 1`] = `
     <h2>
       keyboard_shortcuts.title
     </h2>
-    <Link
+    <ForwardRef(Link)
       onClick={[Function]}
       to="/account"
     >
       keyboard_shortcuts.disable_link
-    </Link>
+    </ForwardRef(Link)>
   </div>
   <div
     className="modal-body modal-container markdown display-flex-start shortcuts-modal"
index 16439c7b2f04c892ec00c48d40d4448bcb4c9665..c63bf4def707a2c9bf746d1f83a6bb8c7f450f60 100644 (file)
@@ -22,7 +22,7 @@
 
 import * as React from 'react';
 import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
 import { Alert, AlertProps } from '../../../components/ui/Alert';
 import { translate, translateWithParameters } from '../../../helpers/l10n';
 import { queryToSearch } from '../../../helpers/urls';
index 6802c47918044ac1f124fab506136bf37bd28e69..2872d6529b98575a637e5e2fdca2edd941bf963c 100644 (file)
@@ -94,7 +94,7 @@ exports[`should render correctly for type="CompletedWithFailure" & isSystemAdmin
           id="indexation.completed_with_error"
           values={
             Object {
-              "link": <Link
+              "link": <ForwardRef(Link)
                 to={
                   Object {
                     "pathname": "/admin/background_tasks",
@@ -103,7 +103,7 @@ exports[`should render correctly for type="CompletedWithFailure" & isSystemAdmin
                 }
               >
                 indexation.completed_with_error.link
-              </Link>,
+              </ForwardRef(Link)>,
             }
           }
         />
@@ -176,7 +176,7 @@ exports[`should render correctly for type="InProgress" & isSystemAdmin=true 1`]
           id="indexation.admin_link"
           values={
             Object {
-              "link": <Link
+              "link": <ForwardRef(Link)
                 to={
                   Object {
                     "pathname": "/admin/background_tasks",
@@ -185,7 +185,7 @@ exports[`should render correctly for type="InProgress" & isSystemAdmin=true 1`]
                 }
               >
                 background_tasks.page
-              </Link>,
+              </ForwardRef(Link)>,
             }
           }
         />
@@ -261,7 +261,7 @@ exports[`should render correctly for type="InProgressWithFailure" & isSystemAdmi
           id="indexation.progression_with_error"
           values={
             Object {
-              "link": <Link
+              "link": <ForwardRef(Link)
                 to={
                   Object {
                     "pathname": "/admin/background_tasks",
@@ -270,7 +270,7 @@ exports[`should render correctly for type="InProgressWithFailure" & isSystemAdmi
                 }
               >
                 indexation.progression_with_error.link
-              </Link>,
+              </ForwardRef(Link)>,
             }
           }
         />
index c9cc789ec0544c671943d218c143e2deaa416bd9..ab7f8f585284f63b0a5c3d6492ad664fa14d0f1c 100644 (file)
@@ -19,7 +19,7 @@
  */
 import { last } from 'lodash';
 import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../../components/common/Link';
 import QualifierIcon from '../../../../components/icons/QualifierIcon';
 import { isMainBranch } from '../../../../helpers/branch-like';
 import { getComponentOverviewUrl } from '../../../../helpers/urls';
index bdd5fce58c6b9f6c8949335470f34265a50eb68f..0277db563330c6a8104719e95791f12c0bb6b1af 100644 (file)
@@ -19,8 +19,8 @@
  */
 import * as React from 'react';
 import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
 import { STATUSES } from '../../../../apps/background-tasks/constants';
+import Link from '../../../../components/common/Link';
 import { Location, withRouter } from '../../../../components/hoc/withRouter';
 import { Alert } from '../../../../components/ui/Alert';
 import { hasMessage, translate } from '../../../../helpers/l10n';
index ba2f645c2d153a87af065909b782b3b8398bcbc3..a719e3372147e09ef2f89241f299b550a3931b47 100644 (file)
@@ -18,8 +18,8 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import * as React from 'react';
-import { Link } from 'react-router-dom';
 import { isValidLicense } from '../../../../api/editions';
+import Link from '../../../../components/common/Link';
 import { Alert } from '../../../../components/ui/Alert';
 import { translate, translateWithParameters } from '../../../../helpers/l10n';
 import { AppState } from '../../../../types/appstate';
index 5cbb5494a0a629f04aa2b0d77ac6cf35b8e245ae..fbf1723f736e664c244e1efcafc522d5663e7efd 100644 (file)
@@ -19,8 +19,8 @@
  */
 import * as React from 'react';
 import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
 import { PULL_REQUEST_DECORATION_BINDING_CATEGORY } from '../../../../apps/settings/constants';
+import Link from '../../../../components/common/Link';
 import { Alert } from '../../../../components/ui/Alert';
 import { translate } from '../../../../helpers/l10n';
 import { getProjectSettingsUrl } from '../../../../helpers/urls';
index 27fc83ce27146c418b257ec1e2cc1b28653ae4ee..4d7ba4f3bea1071d2a9cc11e8e06e17e367ff098 100644 (file)
@@ -20,8 +20,8 @@
 import * as React from 'react';
 import { useIntl } from 'react-intl';
 import BranchStatus from '../../../../components/common/BranchStatus';
+import Link from '../../../../components/common/Link';
 import HomePageSelect from '../../../../components/controls/HomePageSelect';
-import DetachIcon from '../../../../components/icons/DetachIcon';
 import { formatterOption } from '../../../../components/intl/DateTimeFormatter';
 import { isBranch, isPullRequest } from '../../../../helpers/branch-like';
 import { translate, translateWithParameters } from '../../../../helpers/l10n';
@@ -86,14 +86,13 @@ export function HeaderMeta(props: HeaderMetaProps) {
       {isPullRequest(branchLike) && (
         <div className="navbar-context-meta-secondary display-inline-flex-center">
           {branchLike.url !== undefined && (
-            <a
-              className="display-inline-flex-center big-spacer-right"
-              href={branchLike.url}
-              rel="noopener noreferrer"
-              target="_blank">
+            <Link
+              className="link-no-underline big-spacer-right"
+              to={branchLike.url}
+              target="_blank"
+              size={12}>
               {translate('branches.see_the_pr')}
-              <DetachIcon className="little-spacer-left" size={12} />
-            </a>
+            </Link>
           )}
           <BranchStatus branchLike={branchLike} component={component} />
         </div>
index 30fcabe49124b2adaff2186298b7dde5b00e393e..415d696f63e45170c74cfab4051f848fc2e36339 100644 (file)
@@ -19,12 +19,12 @@ exports[`renders background task license info correctly 1`] = `
   >
     Foo
   </span>
-  <Link
+  <ForwardRef(Link)
     to="/admin/extension/license/app"
   >
     license.component_navigation.button.LICENSING
     .
-  </Link>
+  </ForwardRef(Link)>
 </Alert>
 `;
 
@@ -52,11 +52,11 @@ exports[`renders correctly for LICENSING_LOC error 1`] = `
   >
     Foo
   </span>
-  <Link
+  <ForwardRef(Link)
     to="/admin/extension/license/app"
   >
     license.component_navigation.button.LICENSING_LOC
     .
-  </Link>
+  </ForwardRef(Link)>
 </Alert>
 `;
index 86ee8a116133285c70bea6a1475d95a3f68357ff..f7fa9433b9d38bfc6183a8823e2f97c90931cf40 100644 (file)
@@ -27,7 +27,7 @@ exports[`should render correctly: project admin 1`] = `
     id="component_navigation.pr_deco.error_detected_X"
     values={
       Object {
-        "action": <Link
+        "action": <ForwardRef(Link)
           to={
             Object {
               "pathname": "/project/settings",
@@ -36,7 +36,7 @@ exports[`should render correctly: project admin 1`] = `
           }
         >
           component_navigation.pr_deco.action.check_project_settings
-        </Link>,
+        </ForwardRef(Link)>,
       }
     }
   />
index 677f9989be4f32f33ac641ba69cfaa844b0953a5..98ebacc1ab8b0dbfeff7803800cee7e5c4788bd4 100644 (file)
@@ -185,18 +185,14 @@ exports[`should render correctly for a pull request 1`] = `
   <div
     className="navbar-context-meta-secondary display-inline-flex-center"
   >
-    <a
-      className="display-inline-flex-center big-spacer-right"
-      href="https://example.com/pull/1234"
-      rel="noopener noreferrer"
+    <ForwardRef(Link)
+      className="link-no-underline big-spacer-right"
+      size={12}
       target="_blank"
+      to="https://example.com/pull/1234"
     >
       branches.see_the_pr
-      <DetachIcon
-        className="little-spacer-left"
-        size={12}
-      />
-    </a>
+    </ForwardRef(Link)>
     <withBranchStatus(BranchStatus)
       branchLike={
         Object {
index 79a6ec109dfdd9c54185370e45336a6d1414cbc4..7c51dd97fa7c9f10b62f4f4133dff383b3f270ff 100644 (file)
@@ -18,8 +18,8 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import * as React from 'react';
-import { Link } from 'react-router-dom';
 import DocumentationTooltip from '../../../../../components/common/DocumentationTooltip';
+import Link from '../../../../../components/common/Link';
 import HelpTooltip from '../../../../../components/controls/HelpTooltip';
 import BranchLikeIcon from '../../../../../components/icons/BranchLikeIcon';
 import DropdownIcon from '../../../../../components/icons/DropdownIcon';
index 8e5f1127d15fa68c48fbbdd6c8cc218752599dec..e171e41daff9c868cb8c2e190548d01ae1c249bd 100644 (file)
@@ -18,7 +18,7 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../../../components/common/Link';
 import { DropdownOverlay } from '../../../../../components/controls/Dropdown';
 import SearchBox from '../../../../../components/controls/SearchBox';
 import { Router, withRouter } from '../../../../../components/hoc/withRouter';
index b11f3a30f7a93a43c8e780201601d069bf8dd308..f11ac90ad017a404fd964686e6677a88235567aa 100644 (file)
@@ -19,7 +19,7 @@
  */
 import { shallow } from 'enzyme';
 import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../../../../components/common/Link';
 import SearchBox from '../../../../../../components/controls/SearchBox';
 import { KeyboardKeys } from '../../../../../../helpers/keycodes';
 import {
index 03c55f4adfc5cd6026a5032b90f1eb20937fdd99..eb009ecfeee37b22c1fb67e80dbb031d5a251ccb 100644 (file)
@@ -79,7 +79,7 @@ exports[`applications should render correctly when there is only one branch and
         <hr
           className="spacer-top spacer-bottom"
         />
-        <Link
+        <ForwardRef(Link)
           to={
             Object {
               "pathname": "/project/admin/extension/developer-server/application-console",
@@ -88,7 +88,7 @@ exports[`applications should render correctly when there is only one branch and
           }
         >
           application.branches.link
-        </Link>
+        </ForwardRef(Link)>
       </React.Fragment>
     }
   >
index df18a2f2f5ac01ffc27944ba7992274bd46cbb43..ed6cc27a2a010d34f75a64bec30eb0e7f085f8a1 100644 (file)
@@ -146,7 +146,7 @@ exports[`should render correctly 1`] = `
   <div
     className="hint-container text-right"
   >
-    <Link
+    <ForwardRef(Link)
       onClick={[Function]}
       to={
         Object {
@@ -156,7 +156,7 @@ exports[`should render correctly 1`] = `
       }
     >
       branch_like_navigation.manage
-    </Link>
+    </ForwardRef(Link)>
   </div>
 </DropdownOverlay>
 `;
@@ -307,7 +307,7 @@ exports[`should render correctly with no current branch like 1`] = `
   <div
     className="hint-container text-right"
   >
-    <Link
+    <ForwardRef(Link)
       onClick={[Function]}
       to={
         Object {
@@ -317,7 +317,7 @@ exports[`should render correctly with no current branch like 1`] = `
       }
     >
       branch_like_navigation.manage
-    </Link>
+    </ForwardRef(Link)>
   </div>
 </DropdownOverlay>
 `;
index 379997fccabba21d5e10fc40b3a0ab1253fe6274..3826ae760efa4af8220620924fb1ab591c03fd39 100644 (file)
@@ -18,7 +18,7 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../../../../components/common/Link';
 import { translate } from '../../../../../../helpers/l10n';
 import { getQualityGateUrl } from '../../../../../../helpers/urls';
 
index 2b6bac54bbdb1db1216dfd8900ef869106b5e706..50794431cefb1280ef0ed5b06b33bb932b78171a 100644 (file)
@@ -18,8 +18,8 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import * as React from 'react';
-import { Link } from 'react-router-dom';
 import { searchRules } from '../../../../../../api/rules';
+import Link from '../../../../../../components/common/Link';
 import Tooltip from '../../../../../../components/controls/Tooltip';
 import { translate, translateWithParameters } from '../../../../../../helpers/l10n';
 import { getQualityProfileUrl } from '../../../../../../helpers/urls';
index 0c11ae23f65c8bd604ce9ca822dd8fcd0c150b28..04941dc74b73dfb70a99c39bb617ec5c01394e02 100644 (file)
@@ -42,7 +42,7 @@ exports[`should render correctly 1`] = `
           CSS
           )
         </span>
-        <Link
+        <ForwardRef(Link)
           to={
             Object {
               "pathname": "/profiles/show",
@@ -55,7 +55,7 @@ exports[`should render correctly 1`] = `
           >
             name
           </span>
-        </Link>
+        </ForwardRef(Link)>
       </div>
     </li>
   </ul>
@@ -108,7 +108,7 @@ exports[`should render correctly 2`] = `
             CSS
             )
           </span>
-          <Link
+          <ForwardRef(Link)
             to={
               Object {
                 "pathname": "/profiles/show",
@@ -121,7 +121,7 @@ exports[`should render correctly 2`] = `
             >
               name
             </span>
-          </Link>
+          </ForwardRef(Link)>
         </div>
       </li>
     </Tooltip>
index 5e0231911bc79535abfa0a7e524107b6ae73fd8a..a766edf15e6b8597bf3baabd106a2c6c4989d075 100644 (file)
@@ -18,7 +18,7 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../../components/common/Link';
 import { translate } from '../../../../helpers/l10n';
 import { getBaseUrl } from '../../../../helpers/system';
 import { AppState } from '../../../../types/appstate';
index ae72bfedf00b432da7eebc73726fa5f78ca78d7e..79dee1dc5c210da7c6f28ae9d51c5838824d4e15 100644 (file)
@@ -19,8 +19,9 @@
  */
 import classNames from 'classnames';
 import * as React from 'react';
-import { Link, NavLink } from 'react-router-dom';
+import { NavLink } from 'react-router-dom';
 import { isMySet } from '../../../../apps/issues/utils';
+import Link from '../../../../components/common/Link';
 import Dropdown from '../../../../components/controls/Dropdown';
 import DropdownIcon from '../../../../components/icons/DropdownIcon';
 import { translate } from '../../../../helpers/l10n';
index 14c4221719e11a7fc7df1912e7da4505eeecd9ca..83539d8ce5cce5b797ca8682f52f2abaca0a7b6c 100644 (file)
@@ -18,7 +18,7 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../../components/common/Link';
 import Dropdown from '../../../../components/controls/Dropdown';
 import { Router, withRouter } from '../../../../components/hoc/withRouter';
 import Avatar from '../../../../components/ui/Avatar';
@@ -98,9 +98,9 @@ export class GlobalNavUser extends React.PureComponent<Props> {
   renderAnonymous() {
     return (
       <div>
-        <a className="navbar-login" href="/sessions/new" onClick={this.handleLogin}>
+        <Link className="navbar-login" to="/sessions/new" onClick={this.handleLogin}>
           {translate('layout.login')}
-        </a>
+        </Link>
       </div>
     );
   }
index 9fe279984b6ad86100aafcdf9d3b3cfb95c9234d..56d829bf6828f4275d9aa456046ebf9823046430 100644 (file)
@@ -1,7 +1,7 @@
 // Jest Snapshot v1, https://goo.gl/fbAQLP
 
 exports[`should render correctly: default 1`] = `
-<Link
+<ForwardRef(Link)
   className="navbar-brand"
   to="/"
 >
@@ -12,11 +12,11 @@ exports[`should render correctly: default 1`] = `
     title="layout.sonar.slogan"
     width={83}
   />
-</Link>
+</ForwardRef(Link)>
 `;
 
 exports[`should render correctly: with logo 1`] = `
-<Link
+<ForwardRef(Link)
   className="navbar-brand"
   to="/"
 >
@@ -27,11 +27,11 @@ exports[`should render correctly: with logo 1`] = `
     title="layout.sonar.slogan"
     width={100}
   />
-</Link>
+</ForwardRef(Link)>
 `;
 
 exports[`should render correctly: with logo and width 1`] = `
-<Link
+<ForwardRef(Link)
   className="navbar-brand"
   to="/"
 >
@@ -42,5 +42,5 @@ exports[`should render correctly: with logo and width 1`] = `
     title="layout.sonar.slogan"
     width="200"
   />
-</Link>
+</ForwardRef(Link)>
 `;
index b16dca9e9cbe56efb7c78aec03b076d2f2cd1e5e..da0436e8c6951f2bcffc5f1b010f51ec91541af5 100644 (file)
@@ -19,7 +19,7 @@
  */
 import * as React from 'react';
 import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
+import Link from '../../../../components/common/Link';
 import { Alert } from '../../../../components/ui/Alert';
 import { translate } from '../../../../helpers/l10n';
 import { getInstance } from '../../../../helpers/system';
index 1bec0d5aa3af2ad2bf0fe1480cee52715cac07d8..a8678bc9396411d5860aec2ecf42437ae06f3b38 100644 (file)
@@ -11,11 +11,11 @@ exports[`should render correctly 1`] = `
     values={
       Object {
         "instance": undefined,
-        "link": <Link
+        "link": <ForwardRef(Link)
           to="/admin/background_tasks"
         >
           background_tasks.page
-        </Link>,
+        </ForwardRef(Link)>,
       }
     }
   />
index c6d8d84cc97370b34d1925bfe10ff36de36af3f8..ff444714d0198d3a5a3f661b1abd5a564ca67ca6 100644 (file)
@@ -18,7 +18,7 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
 import ClockIcon from '../../../components/icons/ClockIcon';
 import FavoriteIcon from '../../../components/icons/FavoriteIcon';
 import QualifierIcon from '../../../components/icons/QualifierIcon';
index a9d22eae13d0607c730e4033ff6592285cc7776f..ac7e9e5b4e6288e8acf4bfb4e22282454b68d3d7 100644 (file)
@@ -6,7 +6,7 @@ exports[`renders favorite 1`] = `
   key="foo"
   role="option"
 >
-  <Link
+  <ForwardRef(Link)
     data-key="foo"
     onClick={[MockFunction]}
     onFocus={[Function]}
@@ -48,7 +48,7 @@ exports[`renders favorite 1`] = `
         foo
       </div>
     </div>
-  </Link>
+  </ForwardRef(Link)>
 </li>
 `;
 
@@ -58,7 +58,7 @@ exports[`renders match 1`] = `
   key="foo"
   role="option"
 >
-  <Link
+  <ForwardRef(Link)
     data-key="foo"
     onClick={[MockFunction]}
     onFocus={[Function]}
@@ -99,7 +99,7 @@ exports[`renders match 1`] = `
         foo
       </div>
     </div>
-  </Link>
+  </ForwardRef(Link)>
 </li>
 `;
 
@@ -109,7 +109,7 @@ exports[`renders recently browsed 1`] = `
   key="foo"
   role="option"
 >
-  <Link
+  <ForwardRef(Link)
     data-key="foo"
     onClick={[MockFunction]}
     onFocus={[Function]}
@@ -150,7 +150,7 @@ exports[`renders recently browsed 1`] = `
         foo
       </div>
     </div>
-  </Link>
+  </ForwardRef(Link)>
 </li>
 `;
 
@@ -160,7 +160,7 @@ exports[`renders selected 1`] = `
   key="foo"
   role="option"
 >
-  <Link
+  <ForwardRef(Link)
     data-key="foo"
     onClick={[MockFunction]}
     onFocus={[Function]}
@@ -198,7 +198,7 @@ exports[`renders selected 1`] = `
         foo
       </div>
     </div>
-  </Link>
+  </ForwardRef(Link)>
 </li>
 `;
 
@@ -209,7 +209,7 @@ exports[`renders selected 2`] = `
   key="foo"
   role="option"
 >
-  <Link
+  <ForwardRef(Link)
     data-key="foo"
     onClick={[MockFunction]}
     onFocus={[Function]}
@@ -247,6 +247,6 @@ exports[`renders selected 2`] = `
         foo
       </div>
     </div>
-  </Link>
+  </ForwardRef(Link)>
 </li>
 `;
index f63a4aee7f74f3449369c29b9e363cb0876882f1..c850f77dc8775db7781730cd3f082d488761d105 100644 (file)
@@ -22,18 +22,18 @@ import * as React from 'react';
 import { getSystemUpgrades } from '../../../../api/system';
 import { Alert } from '../../../../components/ui/Alert';
 import DismissableAlert from '../../../../components/ui/DismissableAlert';
-import { mockUpgrades } from '../../../../helpers/mocks/system-upgrades';
+import { mockSystemUpgrade } from '../../../../helpers/mocks/system-upgrades';
 import { mockAppState, mockCurrentUser, mockLoggedInUser } from '../../../../helpers/testMocks';
 import { waitAndUpdate } from '../../../../helpers/testUtils';
 import { Permissions } from '../../../../types/permissions';
 import { UpdateNotification } from '../UpdateNotification';
 
 jest.mock('../../../../api/system', () => {
-  const { mockUpgrades } = jest.requireActual('../../../../helpers/mocks/system-upgrades');
+  const { mockSystemUpgrade } = jest.requireActual('../../../../helpers/mocks/system-upgrades');
   return {
     getSystemUpgrades: jest
       .fn()
-      .mockResolvedValue({ upgrades: [mockUpgrades({ version: '9.1' })], latestLTS: '8.9' })
+      .mockResolvedValue({ upgrades: [mockSystemUpgrade({ version: '9.1' })], latestLTS: '8.9' })
   };
 });
 
@@ -86,7 +86,7 @@ it('should not show prompt when no upgrade', async () => {
 
 it('should show prompt when no lts date', async () => {
   (getSystemUpgrades as jest.Mock).mockResolvedValueOnce({
-    upgrades: [mockUpgrades({ version: '8.9', releaseDate: 'INVALID' })],
+    upgrades: [mockSystemUpgrade({ version: '8.9', releaseDate: 'INVALID' })],
     latestLTS: '8.9'
   });
   const wrapper = shallowRender({
@@ -100,7 +100,7 @@ it('should show prompt when no lts date', async () => {
 
 it('should show prompt when minor upgrade', async () => {
   (getSystemUpgrades as jest.Mock).mockResolvedValueOnce({
-    upgrades: [mockUpgrades({ version: '9.2' }), mockUpgrades({ version: '9.1' })],
+    upgrades: [mockSystemUpgrade({ version: '9.2' }), mockSystemUpgrade({ version: '9.1' })],
     latestLTS: '8.9'
   });
   const wrapper = shallowRender({
@@ -114,7 +114,7 @@ it('should show prompt when minor upgrade', async () => {
 
 it('should show prompt when patch upgrade', async () => {
   (getSystemUpgrades as jest.Mock).mockResolvedValueOnce({
-    upgrades: [mockUpgrades({ version: '9.2' }), mockUpgrades({ version: '9.1.1' })],
+    upgrades: [mockSystemUpgrade({ version: '9.2' }), mockSystemUpgrade({ version: '9.1.1' })],
     latestLTS: '8.9'
   });
   const wrapper = shallowRender({
@@ -129,9 +129,9 @@ it('should show prompt when patch upgrade', async () => {
 it('should show prompt when lts upgrade', async () => {
   (getSystemUpgrades as jest.Mock).mockResolvedValueOnce({
     upgrades: [
-      mockUpgrades({ version: '8.9', releaseDate: formatDate(new Date(Date.now())) }),
-      mockUpgrades({ version: '9.2' }),
-      mockUpgrades({ version: '9.1.1' })
+      mockSystemUpgrade({ version: '8.9', releaseDate: formatDate(new Date(Date.now())) }),
+      mockSystemUpgrade({ version: '9.2' }),
+      mockSystemUpgrade({ version: '9.1.1' })
     ],
     latestLTS: '8.9'
   });
@@ -149,9 +149,9 @@ it('should show prompt when lts upgrade is more than 6 month', async () => {
   ltsDate.setMonth(ltsDate.getMonth() - 7);
   (getSystemUpgrades as jest.Mock).mockResolvedValueOnce({
     upgrades: [
-      mockUpgrades({ version: '8.9', releaseDate: formatDate(ltsDate) }),
-      mockUpgrades({ version: '9.2' }),
-      mockUpgrades({ version: '9.1.1' })
+      mockSystemUpgrade({ version: '8.9', releaseDate: formatDate(ltsDate) }),
+      mockSystemUpgrade({ version: '9.2' }),
+      mockSystemUpgrade({ version: '9.1.1' })
     ],
     latestLTS: '8.9'
   });
@@ -167,9 +167,9 @@ it('should show prompt when lts upgrade is more than 6 month', async () => {
 it('should show correct alert when not dismissable', async () => {
   (getSystemUpgrades as jest.Mock).mockResolvedValueOnce({
     upgrades: [
-      mockUpgrades({ version: '8.9', releaseDate: formatDate(new Date(Date.now())) }),
-      mockUpgrades({ version: '9.2' }),
-      mockUpgrades({ version: '9.1.1' })
+      mockSystemUpgrade({ version: '8.9', releaseDate: formatDate(new Date(Date.now())) }),
+      mockSystemUpgrade({ version: '9.2' }),
+      mockSystemUpgrade({ version: '9.1.1' })
     ],
     latestLTS: '8.9'
   });
index 9d7995d0d8fc7a0eae3cb08a566164835dfa472b..dc4c7c56b5e44d99dd88ff12d6c3f08c3b0bf9fb 100644 (file)
@@ -32,6 +32,11 @@ a:focus {
   border-bottom-color: var(--primary);
 }
 
+a svg,
+a img {
+  vertical-align: middle;
+}
+
 .link-no-underline {
   border-bottom-color: transparent !important;
 }
index f8d3e916aad2b3f8da0452a9c9e2f3b57bf65dbc..1a80ff210ed1671b852bc499f1138366928cb4c5 100644 (file)
@@ -18,8 +18,8 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import * as React from 'react';
-import { Link } from 'react-router-dom';
 import MetaLink from '../../../app/components/nav/component/projectInformation/meta/MetaLink';
+import Link from '../../../components/common/Link';
 import HelpTooltip from '../../../components/controls/HelpTooltip';
 import DateFromNow from '../../../components/intl/DateFromNow';
 import Level from '../../../components/ui/Level';
index 38901794aacf5caa2d08cd7347ed3ee1de8a8450..668cb99c8e49e4f3d97928b07ee8cdbcc792e158 100644 (file)
@@ -21,7 +21,7 @@ import { subDays } from 'date-fns';
 import * as React from 'react';
 import { Helmet } from 'react-helmet-async';
 import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
 import DateRangeInput from '../../../components/controls/DateRangeInput';
 import Radio from '../../../components/controls/Radio';
 import Suggestions from '../../../components/embed-docs-modal/Suggestions';
index fa377d15b9c2bc9b5b0b78966965b243b77ca5a3..db78b925ddd9ad35b58fc98c65abc71bcf725d8e 100644 (file)
@@ -34,7 +34,7 @@ exports[`should render correctly for Monthly housekeeping policy 1`] = `
       values={
         Object {
           "housekeeping": "audit_logs.housekeeping_policy.Monthly",
-          "link": <Link
+          "link": <ForwardRef(Link)
             to={
               Object {
                 "hash": "#auditLogs",
@@ -44,7 +44,7 @@ exports[`should render correctly for Monthly housekeeping policy 1`] = `
             }
           >
             audit_logs.page.description.link
-          </Link>,
+          </ForwardRef(Link)>,
         }
       }
     />
@@ -156,7 +156,7 @@ exports[`should render correctly for Trimestrial housekeeping policy 1`] = `
       values={
         Object {
           "housekeeping": "audit_logs.housekeeping_policy.Trimestrial",
-          "link": <Link
+          "link": <ForwardRef(Link)
             to={
               Object {
                 "hash": "#auditLogs",
@@ -166,7 +166,7 @@ exports[`should render correctly for Trimestrial housekeeping policy 1`] = `
             }
           >
             audit_logs.page.description.link
-          </Link>,
+          </ForwardRef(Link)>,
         }
       }
     />
@@ -290,7 +290,7 @@ exports[`should render correctly for Weekly housekeeping policy 1`] = `
       values={
         Object {
           "housekeeping": "audit_logs.housekeeping_policy.Weekly",
-          "link": <Link
+          "link": <ForwardRef(Link)
             to={
               Object {
                 "hash": "#auditLogs",
@@ -300,7 +300,7 @@ exports[`should render correctly for Weekly housekeeping policy 1`] = `
             }
           >
             audit_logs.page.description.link
-          </Link>,
+          </ForwardRef(Link)>,
         }
       }
     />
@@ -400,7 +400,7 @@ exports[`should render correctly for Yearly housekeeping policy 1`] = `
       values={
         Object {
           "housekeeping": "audit_logs.housekeeping_policy.Yearly",
-          "link": <Link
+          "link": <ForwardRef(Link)
             to={
               Object {
                 "hash": "#auditLogs",
@@ -410,7 +410,7 @@ exports[`should render correctly for Yearly housekeeping policy 1`] = `
             }
           >
             audit_logs.page.description.link
-          </Link>,
+          </ForwardRef(Link)>,
         }
       }
     />
index fa7c2e92c3a6f1bd4fe17214dd61a2b6a43d91e8..dd4cbe6f060e03230a699ae5763ce36d61de3942 100644 (file)
@@ -18,7 +18,7 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
 import { translate } from '../../../helpers/l10n';
 import Workers from './Workers';
 
index 4db3bfc749ea0d5d7396d87317feae32fa284625..c471a76e5f8d5beeaebe8459b1ce9a5b404f407b 100644 (file)
@@ -18,6 +18,7 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import * as React from 'react';
+import Link from '../../../components/common/Link';
 import { translate } from '../../../helpers/l10n';
 
 export default function NoWorkersSupportPopup() {
@@ -30,12 +31,11 @@ export default function NoWorkersSupportPopup() {
         {translate('background_tasks.add_more_workers.text')}
       </p>
       <p>
-        <a
-          href="https://www.sonarqube.org/trial-request/enterprise-edition/?referrer=sonarqube-background-tasks"
-          rel="noopener noreferrer"
+        <Link
+          to="https://www.sonarqube.org/trial-request/enterprise-edition/?referrer=sonarqube-background-tasks"
           target="_blank">
           {translate('learn_more')}
-        </a>
+        </Link>
       </p>
     </>
   );
index f642e4521d5d90f162a40e41c8c45a99dd4cdbb5..8248a6785139f3d2f491181d1b8566e6454cbe81 100644 (file)
@@ -18,7 +18,7 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
 import BranchIcon from '../../../components/icons/BranchIcon';
 import PullRequestIcon from '../../../components/icons/PullRequestIcon';
 import QualifierIcon from '../../../components/icons/QualifierIcon';
index eecf3cafaa0911558ed524bda0cdad8616c53104..ad292a7ded2c208c52ed209b25bbff60b4685f3e 100644 (file)
@@ -15,13 +15,12 @@ exports[`should render correctly 1`] = `
     background_tasks.add_more_workers.text
   </p>
   <p>
-    <a
-      href="https://www.sonarqube.org/trial-request/enterprise-edition/?referrer=sonarqube-background-tasks"
-      rel="noopener noreferrer"
+    <ForwardRef(Link)
       target="_blank"
+      to="https://www.sonarqube.org/trial-request/enterprise-edition/?referrer=sonarqube-background-tasks"
     >
       learn_more
-    </a>
+    </ForwardRef(Link)>
   </p>
 </Fragment>
 `;
index 44c3899b20b9233f05bb1e5ce5b8d3375fde25ce..d10fe462edc29a0e0c299f14aa816f5f669ea33c 100644 (file)
@@ -9,7 +9,7 @@ exports[`renders correctly 1`] = `
       qualifier="TRK"
     />
   </span>
-  <Link
+  <ForwardRef(Link)
     className="spacer-right"
     to={
       Object {
@@ -19,7 +19,7 @@ exports[`renders correctly 1`] = `
     }
   >
     Foo
-  </Link>
+  </ForwardRef(Link)>
   <TaskType
     type="REPORT"
   />
@@ -31,7 +31,7 @@ exports[`renders correctly: branch 1`] = `
   <BranchIcon
     className="little-spacer-right"
   />
-  <Link
+  <ForwardRef(Link)
     className="spacer-right"
     to={
       Object {
@@ -57,7 +57,7 @@ exports[`renders correctly: branch 1`] = `
       </span>
       feature
     </span>
-  </Link>
+  </ForwardRef(Link)>
   <TaskType
     type="REPORT"
   />
@@ -69,7 +69,7 @@ exports[`renders correctly: branch 2`] = `
   <BranchIcon
     className="little-spacer-right"
   />
-  <Link
+  <ForwardRef(Link)
     className="spacer-right"
     to={
       Object {
@@ -95,7 +95,7 @@ exports[`renders correctly: branch 2`] = `
       </span>
       branch-6.7
     </span>
-  </Link>
+  </ForwardRef(Link)>
   <TaskType
     type="REPORT"
   />
@@ -111,7 +111,7 @@ exports[`renders correctly: portfolio 1`] = `
       qualifier="VW"
     />
   </span>
-  <Link
+  <ForwardRef(Link)
     className="spacer-right"
     to={
       Object {
@@ -121,7 +121,7 @@ exports[`renders correctly: portfolio 1`] = `
     }
   >
     Foo
-  </Link>
+  </ForwardRef(Link)>
   <TaskType
     type="REPORT"
   />
@@ -133,7 +133,7 @@ exports[`renders correctly: pull request 1`] = `
   <PullRequestIcon
     className="little-spacer-right"
   />
-  <Link
+  <ForwardRef(Link)
     className="spacer-right"
     to={
       Object {
@@ -158,7 +158,7 @@ exports[`renders correctly: pull request 1`] = `
       </span>
       pr-89
     </span>
-  </Link>
+  </ForwardRef(Link)>
   <TaskType
     type="REPORT"
   />
index a22e7b7989a75f049c1e093b045697c51b820659..164d1b1b2a2ee417aefdb2bd4eafdc060dcd42ff 100644 (file)
@@ -18,8 +18,8 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import * as React from 'react';
-import { Link } from 'react-router-dom';
 import { colors } from '../../../app/theme';
+import Link from '../../../components/common/Link';
 import BranchIcon from '../../../components/icons/BranchIcon';
 import QualifierIcon from '../../../components/icons/QualifierIcon';
 import { getBranchLikeQuery } from '../../../helpers/branch-like';
index 0160ee7d4497e17a5599552daaf6b0215ad4125a..46034a852f6899fee7379df0793c1c43bbcbb963 100644 (file)
@@ -169,7 +169,7 @@ exports[`#ComponentName should render correctly for files 2`] = `
 
 foo:src/index.tsx"
 >
-  <Link
+  <ForwardRef(Link)
     className="display-inline-flex-center link-no-underline"
     to={
       Object {
@@ -186,7 +186,7 @@ foo:src/index.tsx"
     <span>
       index.tsx
     </span>
-  </Link>
+  </ForwardRef(Link)>
 </span>
 `;
 
@@ -289,7 +289,7 @@ foo
 
 foo"
 >
-  <Link
+  <ForwardRef(Link)
     className="display-inline-flex-center link-no-underline"
     to={
       Object {
@@ -306,7 +306,7 @@ foo"
     <span>
       Foo
     </span>
-  </Link>
+  </ForwardRef(Link)>
 </span>
 `;
 
@@ -322,7 +322,7 @@ foo
 
 foo"
   >
-    <Link
+    <ForwardRef(Link)
       className="display-inline-flex-center link-no-underline"
       to={
         Object {
@@ -339,7 +339,7 @@ foo"
       <span>
         Foo
       </span>
-    </Link>
+    </ForwardRef(Link)>
   </span>
   <span
     className="text-ellipsis spacer-left"
@@ -366,7 +366,7 @@ exports[`#ComponentName should render correctly for refs 3`] = `
 
 foo"
   >
-    <Link
+    <ForwardRef(Link)
       className="display-inline-flex-center link-no-underline"
       to={
         Object {
@@ -383,7 +383,7 @@ foo"
       <span>
         Foo
       </span>
-    </Link>
+    </ForwardRef(Link)>
   </span>
   <span
     className="spacer-left badge flex-1"
index 781cf70cc05ed9850f0445f8f6460c43ee19b5f8..32221bf8792e21f66497711e8cb9bbfe4bae3a62 100644 (file)
@@ -177,7 +177,7 @@ it('should show rule advanced section with context', async () => {
   expect(screen.getByText('coding_rules.context.others.description.first')).toBeInTheDocument();
 
   const productBoardLink = screen.getByRole('link', {
-    name: 'coding_rules.context.others.feedback_description.link'
+    name: 'opens_in_new_window coding_rules.context.others.feedback_description.link'
   });
   expect(productBoardLink).toBeInTheDocument();
   expect(productBoardLink).toHaveAttribute('target', '_blank');
index 569154d210958f13b3bbce2b33cbe8f1bff82b97..7d3830b3b161d9d17ac49282c9de7291365501fb 100644 (file)
@@ -19,8 +19,8 @@
  */
 import { sortBy } from 'lodash';
 import * as React from 'react';
-import { Link } from 'react-router-dom';
 import { deleteRule, searchRules } from '../../../api/rules';
+import Link from '../../../components/common/Link';
 import { Button } from '../../../components/controls/buttons';
 import ConfirmButton from '../../../components/controls/ConfirmButton';
 import SeverityHelper from '../../../components/shared/SeverityHelper';
index b2337639259ef4ca09029eca112dd80bd924c7b1..1a6a3ebd3630a528a0dbd87be07ae31c1b7a1630 100644 (file)
@@ -18,9 +18,9 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import * as React from 'react';
-import { Link } from 'react-router-dom';
 import { getFacet } from '../../../api/issues';
 import withAppStateContext from '../../../app/components/app-state/withAppStateContext';
+import Link from '../../../components/common/Link';
 import Tooltip from '../../../components/controls/Tooltip';
 import DeferredSpinner from '../../../components/ui/DeferredSpinner';
 import { translate } from '../../../helpers/l10n';
index b0582542437dd878de1ffa6c8880b087eb8bcd1b..11059de2b43f23e984efc27a1847735e331a4be8 100644 (file)
@@ -18,7 +18,7 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
 import { ButtonLink } from '../../../components/controls/buttons';
 import Dropdown from '../../../components/controls/Dropdown';
 import HelpTooltip from '../../../components/controls/HelpTooltip';
index 5d8a86d738a794c8e4d0c5d05b3d73ff71609d89..0d621c4e9259c8395760ced26eef1d726eb5b44a 100644 (file)
@@ -19,9 +19,9 @@
  */
 import { filter } from 'lodash';
 import * as React from 'react';
-import { Link } from 'react-router-dom';
 import { activateRule, deactivateRule, Profile } from '../../../api/quality-profiles';
 import InstanceMessage from '../../../components/common/InstanceMessage';
+import Link from '../../../components/common/Link';
 import { Button } from '../../../components/controls/buttons';
 import ConfirmButton from '../../../components/controls/ConfirmButton';
 import Tooltip from '../../../components/controls/Tooltip';
index 28a19498e668c0a12afefe096717e08e50fb3202..d873bec0ecdf86d4b219e8ec420b4fd056a37f65 100644 (file)
@@ -19,8 +19,8 @@
  */
 import classNames from 'classnames';
 import * as React from 'react';
-import { Link } from 'react-router-dom';
 import { deactivateRule, Profile } from '../../../api/quality-profiles';
+import Link from '../../../components/common/Link';
 import { Button } from '../../../components/controls/buttons';
 import ConfirmButton from '../../../components/controls/ConfirmButton';
 import Tooltip from '../../../components/controls/Tooltip';
index acfc1083c4a76d7b47434e2e02f3289b88823ecb..f8ea100c9d4e37c321a0440e85856f4363689aea 100644 (file)
@@ -19,8 +19,8 @@
  */
 import { shallow } from 'enzyme';
 import * as React from 'react';
-import { Link } from 'react-router-dom';
 import { deactivateRule } from '../../../../api/quality-profiles';
+import Link from '../../../../components/common/Link';
 import { mockQualityProfile, mockRule } from '../../../../helpers/testMocks';
 import { mockEvent, waitAndUpdate } from '../../../../helpers/testUtils';
 import RuleListItem from '../RuleListItem';
index bdfbd11492e7c5c68e6de295c184fb38c79dcead..4c6016c40b9ab0245e4456cffdc867744fb40764 100644 (file)
@@ -15,7 +15,7 @@ exports[`should fetch issues and render 1`] = `
         className="little-spacer-left"
       >
         (
-        <Link
+        <ForwardRef(Link)
           to={
             Object {
               "pathname": "/issues",
@@ -24,7 +24,7 @@ exports[`should fetch issues and render 1`] = `
           }
         >
           18
-        </Link>
+        </ForwardRef(Link)>
         )
       </span>
     </h2>
@@ -51,7 +51,7 @@ exports[`should fetch issues and render 1`] = `
           <td
             className="coding-rules-detail-list-parameters"
           >
-            <Link
+            <ForwardRef(Link)
               to={
                 Object {
                   "pathname": "/issues",
@@ -60,7 +60,7 @@ exports[`should fetch issues and render 1`] = `
               }
             >
               13
-            </Link>
+            </ForwardRef(Link)>
           </td>
         </tr>
         <tr
@@ -74,7 +74,7 @@ exports[`should fetch issues and render 1`] = `
           <td
             className="coding-rules-detail-list-parameters"
           >
-            <Link
+            <ForwardRef(Link)
               to={
                 Object {
                   "pathname": "/issues",
@@ -83,7 +83,7 @@ exports[`should fetch issues and render 1`] = `
               }
             >
               5
-            </Link>
+            </ForwardRef(Link)>
           </td>
         </tr>
       </tbody>
index cbfba172d8a42693db72f150a400b54ca66cfb8d..4308e9f8eb112046aff27d84ea85b129af1a1ba1 100644 (file)
@@ -15,7 +15,7 @@ exports[`should display right meta info 1`] = `
       >
         squid:S1133
       </span>
-      <Link
+      <ForwardRef(Link)
         className="coding-rules-detail-permalink link-no-underline spacer-left text-middle"
         title="permalink"
         to={
@@ -26,7 +26,7 @@ exports[`should display right meta info 1`] = `
         }
       >
         <LinkIcon />
-      </Link>
+      </ForwardRef(Link)>
       <SimilarRulesFilter
         onFilterChange={[MockFunction]}
         rule={
index 773efa6f1a951d37ffc9316c6e0faedb42bc643d..2ae4d1df139722cfb547725de0c10db2c78a135c 100644 (file)
@@ -116,7 +116,7 @@ exports[`should render correctly: default 1`] = `
           <div
             className="coding-rule-title"
           >
-            <Link
+            <ForwardRef(Link)
               className="link-no-underline"
               onClick={[Function]}
               to={
@@ -127,7 +127,7 @@ exports[`should render correctly: default 1`] = `
               }
             >
               Use foo
-            </Link>
+            </ForwardRef(Link)>
           </div>
         </td>
         <td
@@ -213,7 +213,7 @@ exports[`should render correctly: with activation 1`] = `
           <div
             className="coding-rule-title"
           >
-            <Link
+            <ForwardRef(Link)
               className="link-no-underline"
               onClick={[Function]}
               to={
@@ -224,7 +224,7 @@ exports[`should render correctly: with activation 1`] = `
               }
             >
               Use foo
-            </Link>
+            </ForwardRef(Link)>
           </div>
         </td>
         <td
index 3911ea503b2cbfad281132a383f8e56edb853d89..73319f882d771d0b652a3be11d3ffb65364bbf22 100644 (file)
@@ -18,8 +18,8 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import * as React from 'react';
-import { Link } from 'react-router-dom';
 import LanguageDistribution from '../../../components/charts/LanguageDistribution';
+import Link from '../../../components/common/Link';
 import Tooltip from '../../../components/controls/Tooltip';
 import HistoryIcon from '../../../components/icons/HistoryIcon';
 import IssueTypeIcon from '../../../components/icons/IssueTypeIcon';
index 8235bbe62dac2f87ec06b911b76308b60dca3e3e..3e7a651341cef2250263b21568dd9c7e1e6a14db 100644 (file)
@@ -29,7 +29,7 @@ exports[`should render correctly 1`] = `
       <Tooltip
         overlay="component_measures.show_metric_history"
       >
-        <Link
+        <ForwardRef(Link)
           className="js-show-history spacer-left button button-small"
           to={
             Object {
@@ -39,7 +39,7 @@ exports[`should render correctly 1`] = `
           }
         >
           <HistoryIcon />
-        </Link>
+        </ForwardRef(Link)>
       </Tooltip>
     </div>
     <div
@@ -204,7 +204,7 @@ exports[`should work with measure without value 1`] = `
       <Tooltip
         overlay="component_measures.show_metric_history"
       >
-        <Link
+        <ForwardRef(Link)
           className="js-show-history spacer-left button button-small"
           to={
             Object {
@@ -214,7 +214,7 @@ exports[`should work with measure without value 1`] = `
           }
         >
           <HistoryIcon />
-        </Link>
+        </ForwardRef(Link)>
       </Tooltip>
     </div>
     <div
index dc5030c9208ab0bad9d6a2fb0876b5af6e65b2b8..fa15cae3a519d4d2fbcb741ab230d36fdd452f28 100644 (file)
@@ -18,9 +18,9 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import * as React from 'react';
-import { Link } from 'react-router-dom';
 import OriginalBubbleChart from '../../../components/charts/BubbleChart';
 import ColorRatingsLegend from '../../../components/charts/ColorRatingsLegend';
+import Link from '../../../components/common/Link';
 import HelpTooltip from '../../../components/controls/HelpTooltip';
 import { RATING_COLORS } from '../../../helpers/constants';
 import {
index 585601da5a6a2649b9394277260919cdb9588dbc..ec93e70f7fd2e7e5ae4afc784a73cca3c6477495 100644 (file)
@@ -18,7 +18,8 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import * as React from 'react';
-import { Link, To } from 'react-router-dom';
+import { To } from 'react-router-dom';
+import Link from '../../../components/common/Link';
 import BranchIcon from '../../../components/icons/BranchIcon';
 import LinkIcon from '../../../components/icons/LinkIcon';
 import QualifierIcon from '../../../components/icons/QualifierIcon';
index 1465e2a1351f3ca7bf98b2d8aeb4e3a00794bec4..706051bd81a86f975874da690bec92484fd90c61 100644 (file)
@@ -19,7 +19,7 @@
  */
 import { shallow } from 'enzyme';
 import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../../components/common/Link';
 import {
   mockComponentMeasure,
   mockComponentMeasureEnhanced
index 0a648d6f8a104aa606afdf3df5786f039381d9f9..d9c90ef8efdfef99a0dbf3005080d589a5524fba 100644 (file)
@@ -46,7 +46,7 @@ exports[`should render correctly: all on x=0 1`] = `
     <div
       className="text-center small spacer-top spacer-bottom"
     >
-      <Link
+      <ForwardRef(Link)
         to={
           Object {
             "pathname": "/component_measures",
@@ -55,7 +55,7 @@ exports[`should render correctly: all on x=0 1`] = `
         }
       >
         component_measures.overview.see_data_as_list
-      </Link>
+      </ForwardRef(Link)>
     </div>
     <BubbleChart
       displayXGrid={true}
@@ -254,7 +254,7 @@ exports[`should render correctly: default 1`] = `
     <div
       className="text-center small spacer-top spacer-bottom"
     >
-      <Link
+      <ForwardRef(Link)
         to={
           Object {
             "pathname": "/component_measures",
@@ -263,7 +263,7 @@ exports[`should render correctly: default 1`] = `
         }
       >
         component_measures.overview.see_data_as_list
-      </Link>
+      </ForwardRef(Link)>
     </div>
     <BubbleChart
       displayXGrid={true}
@@ -463,7 +463,7 @@ exports[`should render correctly: only showing first 500 files 1`] = `
     <div
       className="text-center small spacer-top spacer-bottom"
     >
-      <Link
+      <ForwardRef(Link)
         to={
           Object {
             "pathname": "/component_measures",
@@ -472,7 +472,7 @@ exports[`should render correctly: only showing first 500 files 1`] = `
         }
       >
         component_measures.overview.see_data_as_list
-      </Link>
+      </ForwardRef(Link)>
     </div>
     <BubbleChart
       displayXGrid={true}
index 96fcb66989ecbdabd4a1d78f546b67a8d3ce4066..a7bb6a51d53095e261889aa2a4dcbe504d937c04 100644 (file)
@@ -7,7 +7,7 @@ exports[`should render correctly for a "APP" root component and a component with
   <div
     className="text-ellipsis"
   >
-    <Link
+    <ForwardRef(Link)
       className="link-no-underline"
       id="component-measures-component-link-foo"
       to={
@@ -36,7 +36,7 @@ exports[`should render correctly for a "APP" root component and a component with
           develop
         </span>
       </span>
-    </Link>
+    </ForwardRef(Link)>
   </div>
 </td>
 `;
@@ -48,7 +48,7 @@ exports[`should render correctly for a "APP" root component and a component with
   <div
     className="text-ellipsis"
   >
-    <Link
+    <ForwardRef(Link)
       className="link-no-underline"
       id="component-measures-component-link-foo"
       to={
@@ -74,7 +74,7 @@ exports[`should render correctly for a "APP" root component and a component with
           branches.main_branch
         </span>
       </span>
-    </Link>
+    </ForwardRef(Link)>
   </div>
 </td>
 `;
@@ -86,7 +86,7 @@ exports[`should render correctly for a "TRK" root component and a component with
   <div
     className="text-ellipsis"
   >
-    <Link
+    <ForwardRef(Link)
       className="link-no-underline"
       id="component-measures-component-link-foo"
       to={
@@ -107,7 +107,7 @@ exports[`should render correctly for a "TRK" root component and a component with
           Foo
         </span>
       </span>
-    </Link>
+    </ForwardRef(Link)>
   </div>
 </td>
 `;
@@ -119,7 +119,7 @@ exports[`should render correctly for a "TRK" root component and a component with
   <div
     className="text-ellipsis"
   >
-    <Link
+    <ForwardRef(Link)
       className="link-no-underline"
       id="component-measures-component-link-foo"
       to={
@@ -140,7 +140,7 @@ exports[`should render correctly for a "TRK" root component and a component with
           Foo
         </span>
       </span>
-    </Link>
+    </ForwardRef(Link)>
   </div>
 </td>
 `;
@@ -152,7 +152,7 @@ exports[`should render correctly for a "VW" root component and a component with
   <div
     className="text-ellipsis"
   >
-    <Link
+    <ForwardRef(Link)
       className="link-no-underline"
       id="component-measures-component-link-foo"
       to={
@@ -181,7 +181,7 @@ exports[`should render correctly for a "VW" root component and a component with
           develop
         </span>
       </span>
-    </Link>
+    </ForwardRef(Link)>
   </div>
 </td>
 `;
@@ -193,7 +193,7 @@ exports[`should render correctly for a "VW" root component and a component with
   <div
     className="text-ellipsis"
   >
-    <Link
+    <ForwardRef(Link)
       className="link-no-underline"
       id="component-measures-component-link-foo"
       to={
@@ -219,7 +219,7 @@ exports[`should render correctly for a "VW" root component and a component with
           branches.main_branch
         </span>
       </span>
-    </Link>
+    </ForwardRef(Link)>
   </div>
 </td>
 `;
@@ -231,7 +231,7 @@ exports[`should render correctly: default 1`] = `
   <div
     className="text-ellipsis"
   >
-    <Link
+    <ForwardRef(Link)
       className="link-no-underline"
       id="component-measures-component-link-foo:src/index.tsx"
       to={
@@ -258,7 +258,7 @@ exports[`should render correctly: default 1`] = `
           index.tsx
         </span>
       </span>
-    </Link>
+    </ForwardRef(Link)>
   </div>
 </td>
 `;
index 67ba28ef4aa1c717b3bda0689e3c28b0f836ed27..cb86bc6302302afca213cd6fd459d07bc2dff49c 100644 (file)
@@ -20,9 +20,9 @@
 import classNames from 'classnames';
 import * as React from 'react';
 import { FormattedMessage } from 'react-intl';
+import Link from '../../../components/common/Link';
 import { SubmitButton } from '../../../components/controls/buttons';
 import ValidationInput from '../../../components/controls/ValidationInput';
-import DetachIcon from '../../../components/icons/DetachIcon';
 import DeferredSpinner from '../../../components/ui/DeferredSpinner';
 import { translate } from '../../../helpers/l10n';
 import { AlmSettingsInstance } from '../../../types/alm-settings';
@@ -72,16 +72,9 @@ export default function AzurePersonalAccessTokenForm(props: AzurePersonalAccessT
             defaultMessage={translate('onboarding.create_project.pat_help.instructions', alm)}
             values={{
               link: url ? (
-                <a
-                  className="link-no-underline"
-                  href={getAzurePatUrl(url)}
-                  rel="noopener noreferrer"
-                  target="_blank">
-                  <DetachIcon className="little-spacer-right" />
-                  <span>
-                    {translate('onboarding.create_project.pat_help.instructions.link', alm)}
-                  </span>
-                </a>
+                <Link className="link-no-underline" to={getAzurePatUrl(url)} target="_blank">
+                  {translate('onboarding.create_project.pat_help.instructions.link', alm)}
+                </Link>
               ) : (
                 translate('onboarding.create_project.pat_help.instructions.link', alm)
               ),
index ec51beea670dd261a40702cbe90d95992751efa9..e590fdbdbe1f7a8726fadb7838994511071a2466 100644 (file)
@@ -20,8 +20,8 @@
 import classNames from 'classnames';
 import * as React from 'react';
 import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
 import { colors } from '../../../app/theme';
+import Link from '../../../components/common/Link';
 import BoxedGroupAccordion from '../../../components/controls/BoxedGroupAccordion';
 import ListFooter from '../../../components/controls/ListFooter';
 import Radio from '../../../components/controls/Radio';
index a7a424b32f4a2e1bb25f6c764c59c3bc34bfa9c3..214fa15ee87e9143ef7dccb64b385600f65a5135 100644 (file)
@@ -19,7 +19,7 @@
  */
 import * as React from 'react';
 import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
 import { Button } from '../../../components/controls/buttons';
 import SearchBox from '../../../components/controls/SearchBox';
 import { Alert } from '../../../components/ui/Alert';
index e8b222682c277a0d8879534e3ac0ee38fa24516b..09e18f2efae5ac0bd4a911e0ed8d54d13fc1dfb1 100644 (file)
@@ -20,7 +20,7 @@
 import { uniqBy } from 'lodash';
 import * as React from 'react';
 import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
 import ListFooter from '../../../components/controls/ListFooter';
 import { Alert } from '../../../components/ui/Alert';
 import { translate, translateWithParameters } from '../../../helpers/l10n';
index 03cb73fc03342e87143fb93e2d7b94895ea66345..de70b76174a250a1ee7443b149506798c5dd99f0 100644 (file)
  */
 import * as React from 'react';
 import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
 import { Button } from '../../../components/controls/buttons';
 import SearchBox from '../../../components/controls/SearchBox';
 import Tooltip from '../../../components/controls/Tooltip';
 import CheckIcon from '../../../components/icons/CheckIcon';
-import DetachIcon from '../../../components/icons/DetachIcon';
 import QualifierIcon from '../../../components/icons/QualifierIcon';
 import { Alert } from '../../../components/ui/Alert';
 import DeferredSpinner from '../../../components/ui/DeferredSpinner';
@@ -126,14 +125,12 @@ export default function BitbucketCloudSearchForm(props: BitbucketCloudSearchForm
                   </Tooltip>
                 </td>
                 <td>
-                  <a
+                  <Link
                     className="display-inline-flex-center big-spacer-right"
-                    href={getRepositoryUrl(repository.workspace, repository.slug)}
-                    rel="noopener noreferrer"
+                    to={getRepositoryUrl(repository.workspace, repository.slug)}
                     target="_blank">
-                    <DetachIcon className="little-spacer-right" />
                     {translate('onboarding.create_project.bitbucketcloud.link')}
-                  </a>
+                  </Link>
                 </td>
                 {repository.sqProjectKey ? (
                   <td>
index d1a741729a72433b140a83a3b7546acd55dda3a9..5434db6d159d738397c6b9aa16d8e5d340b751ce 100644 (file)
@@ -19,7 +19,7 @@
  */
 import * as React from 'react';
 import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
 import SearchBox from '../../../components/controls/SearchBox';
 import { Alert } from '../../../components/ui/Alert';
 import { translate } from '../../../helpers/l10n';
index 4bd638587d0747517d4181f69242386bfb4352c0..707f4d6415d24f17631e9e3a57b700068e1f9c06 100644 (file)
@@ -20,8 +20,8 @@
 import classNames from 'classnames';
 import * as React from 'react';
 import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
 import { colors } from '../../../app/theme';
+import Link from '../../../components/common/Link';
 import BoxedGroupAccordion from '../../../components/controls/BoxedGroupAccordion';
 import Radio from '../../../components/controls/Radio';
 import CheckIcon from '../../../components/icons/CheckIcon';
index 7fbfedb36062d88a1798eeb1d9de24eec6d841f5..8550341540733f3d4b4e1a6aa4a69d1b566d079a 100644 (file)
@@ -22,8 +22,8 @@
 
 import * as React from 'react';
 import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
 import { colors } from '../../../app/theme';
+import Link from '../../../components/common/Link';
 import { Button } from '../../../components/controls/buttons';
 import ListFooter from '../../../components/controls/ListFooter';
 import Radio from '../../../components/controls/Radio';
index bdbcc5f93beee6576e2b5d08dbd43e2bb827f798..10719853aa50465175607d748d145f606563daf3 100644 (file)
  */
 import * as React from 'react';
 import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
 import { Button } from '../../../components/controls/buttons';
 import ListFooter from '../../../components/controls/ListFooter';
 import SearchBox from '../../../components/controls/SearchBox';
 import Tooltip from '../../../components/controls/Tooltip';
 import CheckIcon from '../../../components/icons/CheckIcon';
-import DetachIcon from '../../../components/icons/DetachIcon';
 import QualifierIcon from '../../../components/icons/QualifierIcon';
 import { Alert } from '../../../components/ui/Alert';
 import DeferredSpinner from '../../../components/ui/DeferredSpinner';
@@ -123,14 +122,12 @@ export default function GitlabProjectSelectionForm(props: GitlabProjectSelection
                   </Tooltip>
                 </td>
                 <td>
-                  <a
+                  <Link
                     className="display-inline-flex-center big-spacer-right"
-                    href={project.url}
-                    rel="noopener noreferrer"
+                    to={project.url}
                     target="_blank">
-                    <DetachIcon className="little-spacer-right" />
                     {translate('onboarding.create_project.gitlab.link')}
-                  </a>
+                  </Link>
                 </td>
                 {project.sqProjectKey ? (
                   <td>
index 821d2a1ed7fefe846034560fe7397b39b95c228b..296f7638bcc9acb3f513cbe5e1f488818fa02a2e 100644 (file)
@@ -19,7 +19,7 @@
  */
 import * as React from 'react';
 import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
 import { Alert } from '../../../components/ui/Alert';
 import { translate } from '../../../helpers/l10n';
 import { getGlobalSettingsUrl } from '../../../helpers/urls';
index 685eb640c7e5604f1f9e71316657decf2f18f702..0c3af3883bbf6b16292761717cbf116e3ba767f9 100644 (file)
@@ -18,19 +18,13 @@ exports[`should render correctly: default 1`] = `
         id="onboarding.create_project.pat_help.instructions"
         values={
           Object {
-            "link": <a
+            "link": <ForwardRef(Link)
               className="link-no-underline"
-              href="http://www.example.com/_usersSettings/tokens"
-              rel="noopener noreferrer"
               target="_blank"
+              to="http://www.example.com/_usersSettings/tokens"
             >
-              <DetachIcon
-                className="little-spacer-right"
-              />
-              <span>
-                onboarding.create_project.pat_help.instructions.link.azure
-              </span>
-            </a>,
+              onboarding.create_project.pat_help.instructions.link.azure
+            </ForwardRef(Link)>,
             "scope": <strong>
               <em>
                 Code (Read & Write)
@@ -94,19 +88,13 @@ exports[`should render correctly: submitting 1`] = `
         id="onboarding.create_project.pat_help.instructions"
         values={
           Object {
-            "link": <a
+            "link": <ForwardRef(Link)
               className="link-no-underline"
-              href="http://www.example.com/_usersSettings/tokens"
-              rel="noopener noreferrer"
               target="_blank"
+              to="http://www.example.com/_usersSettings/tokens"
             >
-              <DetachIcon
-                className="little-spacer-right"
-              />
-              <span>
-                onboarding.create_project.pat_help.instructions.link.azure
-              </span>
-            </a>,
+              onboarding.create_project.pat_help.instructions.link.azure
+            </ForwardRef(Link)>,
             "scope": <strong>
               <em>
                 Code (Read & Write)
@@ -170,19 +158,13 @@ exports[`should render correctly: validation failed 1`] = `
         id="onboarding.create_project.pat_help.instructions"
         values={
           Object {
-            "link": <a
+            "link": <ForwardRef(Link)
               className="link-no-underline"
-              href="http://www.example.com/_usersSettings/tokens"
-              rel="noopener noreferrer"
               target="_blank"
+              to="http://www.example.com/_usersSettings/tokens"
             >
-              <DetachIcon
-                className="little-spacer-right"
-              />
-              <span>
-                onboarding.create_project.pat_help.instructions.link.azure
-              </span>
-            </a>,
+              onboarding.create_project.pat_help.instructions.link.azure
+            </ForwardRef(Link)>,
             "scope": <strong>
               <em>
                 Code (Read & Write)
index 85fc0eecdd70287509944b947f33bd3d05272490..c717c261d3277c9f8cee31e796ba3282bfff2f6f 100644 (file)
@@ -150,7 +150,7 @@ exports[`should render correctly: search results 1`] = `
           <div
             className="little-spacer-bottom text-ellipsis"
           >
-            <Link
+            <ForwardRef(Link)
               title="SQ Name"
               to={
                 Object {
@@ -160,7 +160,7 @@ exports[`should render correctly: search results 1`] = `
               }
             >
               SQ Name
-            </Link>
+            </ForwardRef(Link)>
           </div>
           <em>
             onboarding.create_project.repository_imported
@@ -230,7 +230,7 @@ exports[`should render correctly: with repositories 1`] = `
           <div
             className="little-spacer-bottom text-ellipsis"
           >
-            <Link
+            <ForwardRef(Link)
               title="SQ Name"
               to={
                 Object {
@@ -240,7 +240,7 @@ exports[`should render correctly: with repositories 1`] = `
               }
             >
               SQ Name
-            </Link>
+            </ForwardRef(Link)>
           </div>
           <em>
             onboarding.create_project.repository_imported
index d39ae29d2d9e189255214326e00f4d44cfc7720a..7b95f10bdf83fab65e98363aa84c53b1d3b4d87c 100644 (file)
@@ -164,7 +164,7 @@ exports[`should render correctly: setting missing url, admin 1`] = `
       values={
         Object {
           "alm": "onboarding.alm.azure",
-          "url": <Link
+          "url": <ForwardRef(Link)
             to={
               Object {
                 "pathname": "/admin/settings",
@@ -173,7 +173,7 @@ exports[`should render correctly: setting missing url, admin 1`] = `
             }
           >
             settings.page
-          </Link>,
+          </ForwardRef(Link)>,
         }
       }
     />
index 9cfa749b9f646827e3386ce19c59eaf3e690614f..fa72ffea21bc258ac75a02b215195e5c6dd40ec1 100644 (file)
@@ -35,7 +35,7 @@ exports[`should render correctly: empty 1`] = `
     id="onboarding.create_project.azure.no_projects"
     values={
       Object {
-        "link": <Link
+        "link": <ForwardRef(Link)
           to={
             Object {
               "pathname": "/projects/create",
@@ -44,7 +44,7 @@ exports[`should render correctly: empty 1`] = `
           }
         >
           onboarding.create_project.update_your_token
-        </Link>,
+        </ForwardRef(Link)>,
       }
     }
   />
index bbaa30790007cfab712f4e264efb893c3b1687f6..a788d8585354e13ad430241b31ee8e3b2ce2a3f6 100644 (file)
@@ -10,7 +10,7 @@ exports[`Should render correctly 1`] = `
     id="onboarding.create_project.bitbucketcloud.no_projects"
     values={
       Object {
-        "link": <Link
+        "link": <ForwardRef(Link)
           to={
             Object {
               "pathname": "/projects/create",
@@ -19,7 +19,7 @@ exports[`Should render correctly 1`] = `
           }
         >
           onboarding.create_project.update_your_token
-        </Link>,
+        </ForwardRef(Link)>,
       }
     }
   />
@@ -67,17 +67,13 @@ exports[`Should render correctly: Importing 1`] = `
           </Tooltip>
         </td>
         <td>
-          <a
+          <ForwardRef(Link)
             className="display-inline-flex-center big-spacer-right"
-            href="https://bitbucket.org/worksapce/import-slug"
-            rel="noopener noreferrer"
             target="_blank"
+            to="https://bitbucket.org/worksapce/import-slug"
           >
-            <DetachIcon
-              className="little-spacer-right"
-            />
             onboarding.create_project.bitbucketcloud.link
-          </a>
+          </ForwardRef(Link)>
         </td>
         <td
           className="text-right"
@@ -103,7 +99,7 @@ exports[`Should render correctly: Importing 1`] = `
             <strong
               className="project-name display-inline-block text-ellipsis"
             >
-              <Link
+              <ForwardRef(Link)
                 to={
                   Object {
                     "pathname": "/dashboard",
@@ -116,7 +112,7 @@ exports[`Should render correctly: Importing 1`] = `
                   qualifier="TRK"
                 />
                 Repo
-              </Link>
+              </ForwardRef(Link)>
             </strong>
           </Tooltip>
           <br />
@@ -131,17 +127,13 @@ exports[`Should render correctly: Importing 1`] = `
           </Tooltip>
         </td>
         <td>
-          <a
+          <ForwardRef(Link)
             className="display-inline-flex-center big-spacer-right"
-            href="https://bitbucket.org/worksapce/project__repo"
-            rel="noopener noreferrer"
             target="_blank"
+            to="https://bitbucket.org/worksapce/project__repo"
           >
-            <DetachIcon
-              className="little-spacer-right"
-            />
             onboarding.create_project.bitbucketcloud.link
-          </a>
+          </ForwardRef(Link)>
         </td>
         <td>
           <span
@@ -213,17 +205,13 @@ exports[`Should render correctly: Loading more 1`] = `
           </Tooltip>
         </td>
         <td>
-          <a
+          <ForwardRef(Link)
             className="display-inline-flex-center big-spacer-right"
-            href="https://bitbucket.org/worksapce/project__repo"
-            rel="noopener noreferrer"
             target="_blank"
+            to="https://bitbucket.org/worksapce/project__repo"
           >
-            <DetachIcon
-              className="little-spacer-right"
-            />
             onboarding.create_project.bitbucketcloud.link
-          </a>
+          </ForwardRef(Link)>
         </td>
         <td
           className="text-right"
@@ -329,17 +317,13 @@ exports[`Should render correctly: Show more 1`] = `
           </Tooltip>
         </td>
         <td>
-          <a
+          <ForwardRef(Link)
             className="display-inline-flex-center big-spacer-right"
-            href="https://bitbucket.org/worksapce/project__repo"
-            rel="noopener noreferrer"
             target="_blank"
+            to="https://bitbucket.org/worksapce/project__repo"
           >
-            <DetachIcon
-              className="little-spacer-right"
-            />
             onboarding.create_project.bitbucketcloud.link
-          </a>
+          </ForwardRef(Link)>
         </td>
         <td
           className="text-right"
@@ -362,7 +346,7 @@ exports[`Should render correctly: Show more 1`] = `
             <strong
               className="project-name display-inline-block text-ellipsis"
             >
-              <Link
+              <ForwardRef(Link)
                 to={
                   Object {
                     "pathname": "/dashboard",
@@ -375,7 +359,7 @@ exports[`Should render correctly: Show more 1`] = `
                   qualifier="TRK"
                 />
                 Repo
-              </Link>
+              </ForwardRef(Link)>
             </strong>
           </Tooltip>
           <br />
@@ -390,17 +374,13 @@ exports[`Should render correctly: Show more 1`] = `
           </Tooltip>
         </td>
         <td>
-          <a
+          <ForwardRef(Link)
             className="display-inline-flex-center big-spacer-right"
-            href="https://bitbucket.org/worksapce/project__repo"
-            rel="noopener noreferrer"
             target="_blank"
+            to="https://bitbucket.org/worksapce/project__repo"
           >
-            <DetachIcon
-              className="little-spacer-right"
-            />
             onboarding.create_project.bitbucketcloud.link
-          </a>
+          </ForwardRef(Link)>
         </td>
         <td>
           <span
@@ -472,17 +452,13 @@ exports[`Should render correctly: Show no more 1`] = `
           </Tooltip>
         </td>
         <td>
-          <a
+          <ForwardRef(Link)
             className="display-inline-flex-center big-spacer-right"
-            href="https://bitbucket.org/worksapce/project__repo"
-            rel="noopener noreferrer"
             target="_blank"
+            to="https://bitbucket.org/worksapce/project__repo"
           >
-            <DetachIcon
-              className="little-spacer-right"
-            />
             onboarding.create_project.bitbucketcloud.link
-          </a>
+          </ForwardRef(Link)>
         </td>
         <td
           className="text-right"
index 171179efbaffa3048b7d3403aee80a554cd0656e..8292bfe2bba10c930960d12e137c0d0ef8dad575 100644 (file)
@@ -61,7 +61,7 @@ exports[`should render correctly: no projects 1`] = `
     id="onboarding.create_project.no_bbs_projects"
     values={
       Object {
-        "link": <Link
+        "link": <ForwardRef(Link)
           to={
             Object {
               "pathname": "/projects/create",
@@ -70,7 +70,7 @@ exports[`should render correctly: no projects 1`] = `
           }
         >
           onboarding.create_project.update_your_token
-        </Link>,
+        </ForwardRef(Link)>,
       }
     }
   />
index bbcf7b5ecbe1bcdaf6bdbd6684f26a69584e1312..65186535bcb5bc283b1466e074129a21a545ca60 100644 (file)
@@ -59,7 +59,7 @@ exports[`should render correctly: default 1`] = `
           <strong
             title="Bar"
           >
-            <Link
+            <ForwardRef(Link)
               to={
                 Object {
                   "pathname": "/dashboard",
@@ -68,7 +68,7 @@ exports[`should render correctly: default 1`] = `
               }
             >
               Bar
-            </Link>
+            </ForwardRef(Link)>
           </strong>
         </div>
         <em>
@@ -126,7 +126,7 @@ exports[`should render correctly: disable options 1`] = `
           <strong
             title="Bar"
           >
-            <Link
+            <ForwardRef(Link)
               to={
                 Object {
                   "pathname": "/dashboard",
@@ -135,7 +135,7 @@ exports[`should render correctly: disable options 1`] = `
               }
             >
               Bar
-            </Link>
+            </ForwardRef(Link)>
           </strong>
         </div>
         <em>
@@ -193,7 +193,7 @@ exports[`should render correctly: no click handler 1`] = `
           <strong
             title="Bar"
           >
-            <Link
+            <ForwardRef(Link)
               to={
                 Object {
                   "pathname": "/dashboard",
@@ -202,7 +202,7 @@ exports[`should render correctly: no click handler 1`] = `
               }
             >
               Bar
-            </Link>
+            </ForwardRef(Link)>
           </strong>
         </div>
         <em>
@@ -260,7 +260,7 @@ exports[`should render correctly: no project info 1`] = `
           <strong
             title="Bar"
           >
-            <Link
+            <ForwardRef(Link)
               to={
                 Object {
                   "pathname": "/dashboard",
@@ -269,7 +269,7 @@ exports[`should render correctly: no project info 1`] = `
               }
             >
               Bar
-            </Link>
+            </ForwardRef(Link)>
           </strong>
         </div>
         <em>
@@ -303,7 +303,7 @@ exports[`should render correctly: no repos 1`] = `
         id="onboarding.create_project.no_bbs_repos"
         values={
           Object {
-            "link": <Link
+            "link": <ForwardRef(Link)
               to={
                 Object {
                   "pathname": "/projects/create",
@@ -312,7 +312,7 @@ exports[`should render correctly: no repos 1`] = `
               }
             >
               onboarding.create_project.update_your_token
-            </Link>,
+            </ForwardRef(Link)>,
           }
         }
       />
@@ -367,7 +367,7 @@ exports[`should render correctly: not showing all repos 1`] = `
           <strong
             title="Bar"
           >
-            <Link
+            <ForwardRef(Link)
               to={
                 Object {
                   "pathname": "/dashboard",
@@ -376,7 +376,7 @@ exports[`should render correctly: not showing all repos 1`] = `
               }
             >
               Bar
-            </Link>
+            </ForwardRef(Link)>
           </strong>
         </div>
         <em>
@@ -439,7 +439,7 @@ exports[`should render correctly: selected repo 1`] = `
           <strong
             title="Bar"
           >
-            <Link
+            <ForwardRef(Link)
               to={
                 Object {
                   "pathname": "/dashboard",
@@ -448,7 +448,7 @@ exports[`should render correctly: selected repo 1`] = `
               }
             >
               Bar
-            </Link>
+            </ForwardRef(Link)>
           </strong>
         </div>
         <em>
index 8179e52896979225183a2cc3865096a7f62a1c5c..c47fef67a687bede41cb40f8615183343bbb1d0f 100644 (file)
@@ -111,11 +111,11 @@ exports[`should render correctly: error for admin 1`] = `
           id="onboarding.create_project.github.warning.message_admin"
           values={
             Object {
-              "link": <Link
+              "link": <ForwardRef(Link)
                 to="/admin/settings?category=almintegration"
               >
                 onboarding.create_project.github.warning.message_admin.link
-              </Link>,
+              </ForwardRef(Link)>,
             }
           }
         />
@@ -371,7 +371,7 @@ exports[`should render correctly: repositories 1`] = `
           <div
             className="display-flex-center max-width-100"
           >
-            <Link
+            <ForwardRef(Link)
               className="display-flex-center max-width-60"
               to={
                 Object {
@@ -389,7 +389,7 @@ exports[`should render correctly: repositories 1`] = `
               >
                 repository 1
               </span>
-            </Link>
+            </ForwardRef(Link)>
             <em
               className="display-flex-center small big-spacer-left flex-0"
             >
index daa8b66ab26ab2de7799299ec81d69e50fc0bf09..35a35f027d019de0642d7ffc2d8fab7089296ac9 100644 (file)
@@ -41,17 +41,13 @@ exports[`should render correctly: importing 1`] = `
           </Tooltip>
         </td>
         <td>
-          <a
+          <ForwardRef(Link)
             className="display-inline-flex-center big-spacer-right"
-            href="https://gitlab.company.com/best-projects/awesome-project-exclamation"
-            rel="noopener noreferrer"
             target="_blank"
+            to="https://gitlab.company.com/best-projects/awesome-project-exclamation"
           >
-            <DetachIcon
-              className="little-spacer-right"
-            />
             onboarding.create_project.gitlab.link
-          </a>
+          </ForwardRef(Link)>
         </td>
         <td
           className="text-right"
@@ -74,7 +70,7 @@ exports[`should render correctly: importing 1`] = `
             <strong
               className="project-name display-inline-block text-ellipsis"
             >
-              <Link
+              <ForwardRef(Link)
                 to={
                   Object {
                     "pathname": "/dashboard",
@@ -87,7 +83,7 @@ exports[`should render correctly: importing 1`] = `
                   qualifier="TRK"
                 />
                 Already Imported
-              </Link>
+              </ForwardRef(Link)>
             </strong>
           </Tooltip>
           <br />
@@ -102,17 +98,13 @@ exports[`should render correctly: importing 1`] = `
           </Tooltip>
         </td>
         <td>
-          <a
+          <ForwardRef(Link)
             className="display-inline-flex-center big-spacer-right"
-            href="https://gitlab.company.com/best-projects/awesome-project-exclamation"
-            rel="noopener noreferrer"
             target="_blank"
+            to="https://gitlab.company.com/best-projects/awesome-project-exclamation"
           >
-            <DetachIcon
-              className="little-spacer-right"
-            />
             onboarding.create_project.gitlab.link
-          </a>
+          </ForwardRef(Link)>
         </td>
         <td>
           <span
@@ -148,7 +140,7 @@ exports[`should render correctly: no projects 1`] = `
     id="onboarding.create_project.gitlab.no_projects"
     values={
       Object {
-        "link": <Link
+        "link": <ForwardRef(Link)
           to={
             Object {
               "pathname": "/projects/create",
@@ -157,7 +149,7 @@ exports[`should render correctly: no projects 1`] = `
           }
         >
           onboarding.create_project.update_your_token
-        </Link>,
+        </ForwardRef(Link)>,
       }
     }
   />
@@ -232,17 +224,13 @@ exports[`should render correctly: projects 1`] = `
           </Tooltip>
         </td>
         <td>
-          <a
+          <ForwardRef(Link)
             className="display-inline-flex-center big-spacer-right"
-            href="https://gitlab.company.com/best-projects/awesome-project-exclamation"
-            rel="noopener noreferrer"
             target="_blank"
+            to="https://gitlab.company.com/best-projects/awesome-project-exclamation"
           >
-            <DetachIcon
-              className="little-spacer-right"
-            />
             onboarding.create_project.gitlab.link
-          </a>
+          </ForwardRef(Link)>
         </td>
         <td
           className="text-right"
@@ -265,7 +253,7 @@ exports[`should render correctly: projects 1`] = `
             <strong
               className="project-name display-inline-block text-ellipsis"
             >
-              <Link
+              <ForwardRef(Link)
                 to={
                   Object {
                     "pathname": "/dashboard",
@@ -278,7 +266,7 @@ exports[`should render correctly: projects 1`] = `
                   qualifier="TRK"
                 />
                 Already Imported
-              </Link>
+              </ForwardRef(Link)>
             </strong>
           </Tooltip>
           <br />
@@ -293,17 +281,13 @@ exports[`should render correctly: projects 1`] = `
           </Tooltip>
         </td>
         <td>
-          <a
+          <ForwardRef(Link)
             className="display-inline-flex-center big-spacer-right"
-            href="https://gitlab.company.com/best-projects/awesome-project-exclamation"
-            rel="noopener noreferrer"
             target="_blank"
+            to="https://gitlab.company.com/best-projects/awesome-project-exclamation"
           >
-            <DetachIcon
-              className="little-spacer-right"
-            />
             onboarding.create_project.gitlab.link
-          </a>
+          </ForwardRef(Link)>
         </td>
         <td>
           <span
@@ -339,7 +323,7 @@ exports[`should render correctly: undefined projects 1`] = `
     id="onboarding.create_project.gitlab.no_projects"
     values={
       Object {
-        "link": <Link
+        "link": <ForwardRef(Link)
           to={
             Object {
               "pathname": "/projects/create",
@@ -348,7 +332,7 @@ exports[`should render correctly: undefined projects 1`] = `
           }
         >
           onboarding.create_project.update_your_token
-        </Link>,
+        </ForwardRef(Link)>,
       }
     }
   />
index 7dff8982253d4bd9debd9f0ca5e8db4084575f97..a1b89ceab0ec416639c183e044b81d0c06fd4405 100644 (file)
@@ -26,7 +26,7 @@ exports[`should render correctly: for admin 1`] = `
     values={
       Object {
         "alm": "onboarding.alm.bitbucket",
-        "url": <Link
+        "url": <ForwardRef(Link)
           to={
             Object {
               "pathname": "/admin/settings",
@@ -35,7 +35,7 @@ exports[`should render correctly: for admin 1`] = `
           }
         >
           settings.page
-        </Link>,
+        </ForwardRef(Link)>,
       }
     }
   />
index 05d14b82c1cb513b6cb68404ecc6cab3e6d0b964..7834ae8612ab3a420f436e1aaff1688a21e86736 100644 (file)
@@ -21,11 +21,12 @@ import * as navigationTreeSonarQube from 'Docs/../static/SonarQubeNavigationTree
 import { DocNavigationItem } from 'Docs/@types/types';
 import * as React from 'react';
 import { Helmet } from 'react-helmet-async';
-import { Link, useLocation, useParams } from 'react-router-dom';
+import { useLocation, useParams } from 'react-router-dom';
 import { getInstalledPlugins } from '../../../api/plugins';
 import { getPluginStaticFileContent } from '../../../api/static';
 import NotFound from '../../../app/components/NotFound';
 import A11ySkipTarget from '../../../components/a11y/A11ySkipTarget';
+import Link from '../../../components/common/Link';
 import ScreenPositionHelper from '../../../components/common/ScreenPositionHelper';
 import DocMarkdownBlock from '../../../components/docs/DocMarkdownBlock';
 import DeferredSpinner from '../../../components/ui/DeferredSpinner';
index 1e9245acbed0306aef7e0cea49210badfb659208..e3fcf7f5498a606ef99d440e2b8a3c52e381f3cb 100644 (file)
@@ -19,7 +19,7 @@
  */
 import classNames from 'classnames';
 import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
 import { testPathAgainstUrl } from '../navTreeUtils';
 import { DocumentationEntry } from '../utils';
 
index 6490f365a1645cf7308fea3588ad49286aacba9d..f563d5300aaaa99fbb1735e1c604bd953ad186fb 100644 (file)
@@ -19,7 +19,7 @@
  */
 import classNames from 'classnames';
 import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
 import { Dict } from '../../../types/types';
 import { cutWords, DocumentationEntry, highlightMarks } from '../utils';
 
index a27c118ffa24cefe0669547c7f96d95144d1823c..690037a28e2eb49567897b7ecb900778c78ce607 100644 (file)
@@ -68,13 +68,13 @@ exports[`should render correctly for SonarQube 2`] = `
           label="documentation.skip_to_nav"
           weight={10}
         />
-        <Link
+        <ForwardRef(Link)
           to="/documentation/"
         >
           <h1>
             documentation.page
           </h1>
-        </Link>
+        </ForwardRef(Link)>
       </div>
       <Sidebar
         navigation={
index 73eca5dd1524355ca4bd0ff26b11cd409c805df5..6eb967c4ed36ad9180572f4a2d599d4bbe11b940 100644 (file)
@@ -1,7 +1,7 @@
 // Jest Snapshot v1, https://goo.gl/fbAQLP
 
 exports[`should not render a high depth differently than a depth of 3 1`] = `
-<Link
+<ForwardRef(Link)
   className="list-group-item depth-3"
   key="/bar"
   to="/documentation/bar"
@@ -9,11 +9,11 @@ exports[`should not render a high depth differently than a depth of 3 1`] = `
   <h3
     className="list-group-item-heading"
   />
-</Link>
+</ForwardRef(Link)>
 `;
 
 exports[`should render correctly 1`] = `
-<Link
+<ForwardRef(Link)
   className="list-group-item"
   key="/bar"
   to="/documentation/bar"
@@ -21,11 +21,11 @@ exports[`should render correctly 1`] = `
   <h3
     className="list-group-item-heading"
   />
-</Link>
+</ForwardRef(Link)>
 `;
 
 exports[`should render correctly if the current node matches the splat 1`] = `
-<Link
+<ForwardRef(Link)
   className="list-group-item active"
   key="/bar"
   to="/documentation/bar"
@@ -33,5 +33,5 @@ exports[`should render correctly if the current node matches the splat 1`] = `
   <h3
     className="list-group-item-heading"
   />
-</Link>
+</ForwardRef(Link)>
 `;
index 2a50912a76b6902426dcf5cc00a6a762fd1ca7bb..9537e85112aa6bd75654b2970f3643c4aba10f98 100644 (file)
@@ -1,7 +1,7 @@
 // Jest Snapshot v1, https://goo.gl/fbAQLP
 
 exports[`SearchResultEntry should render 1`] = `
-<Link
+<ForwardRef(Link)
   className="list-group-item active"
   to="/documentation/foo/bar"
 >
@@ -39,7 +39,7 @@ exports[`SearchResultEntry should render 1`] = `
       }
     }
   />
-</Link>
+</ForwardRef(Link)>
 `;
 
 exports[`SearchResultText should correctly extract exact matches 1`] = `
index 630c044e89f6e4f79375e8e3166304319bcf09d0..f3fa73c80148f0a587aec3b3efef1d19f47959fe 100644 (file)
@@ -18,8 +18,8 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import * as React from 'react';
-import { Link } from 'react-router-dom';
 import { setIssueAssignee } from '../../../api/issues';
+import Link from '../../../components/common/Link';
 import LinkIcon from '../../../components/icons/LinkIcon';
 import { updateIssue } from '../../../components/issue/actions';
 import IssueActionsBar from '../../../components/issue/components/IssueActionsBar';
index 166722771085f8cd482f68b74bb886b88e4f72e3..e5695f6ec994341145f5d047b5c3cec0de3777ed 100644 (file)
@@ -19,7 +19,7 @@
  */
 import classNames from 'classnames';
 import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
 import { ButtonIcon } from '../../../components/controls/buttons';
 import { ClipboardIconButton } from '../../../components/controls/clipboard';
 import ExpandSnippetIcon from '../../../components/icons/ExpandSnippetIcon';
index db4633e96073ec40dd2bb14ac83a1f1c8238ee7b..da1a96235448afc1439aa33e9a0649f92fff1bde 100644 (file)
@@ -54,7 +54,7 @@ exports[`should render correctly 1`] = `
   <div
     className="flex-0 big-spacer-left"
   >
-    <Link
+    <ForwardRef(Link)
       to={
         Object {
           "hash": "",
@@ -64,7 +64,7 @@ exports[`should render correctly 1`] = `
       }
     >
       source_viewer.view_all_issues
-    </Link>
+    </ForwardRef(Link)>
   </div>
   <DeferredSpinner
     className="little-spacer-right"
@@ -132,7 +132,7 @@ exports[`should render correctly: no link to project 1`] = `
   <div
     className="flex-0 big-spacer-left"
   >
-    <Link
+    <ForwardRef(Link)
       to={
         Object {
           "hash": "",
@@ -142,7 +142,7 @@ exports[`should render correctly: no link to project 1`] = `
       }
     >
       source_viewer.view_all_issues
-    </Link>
+    </ForwardRef(Link)>
   </div>
   <DeferredSpinner
     className="little-spacer-right"
@@ -199,7 +199,7 @@ exports[`should render correctly: no project name 1`] = `
   <div
     className="flex-0 big-spacer-left"
   >
-    <Link
+    <ForwardRef(Link)
       to={
         Object {
           "hash": "",
@@ -209,7 +209,7 @@ exports[`should render correctly: no project name 1`] = `
       }
     >
       source_viewer.view_all_issues
-    </Link>
+    </ForwardRef(Link)>
   </div>
   <DeferredSpinner
     className="little-spacer-right"
index 447c8510fecf7b1e28d635eeda59a38bc78e49e9..7b943cf2000f71451b22286008af7f878ce48004 100644 (file)
@@ -23,6 +23,7 @@ import { Helmet } from 'react-helmet-async';
 import { FormattedMessage } from 'react-intl';
 import { getMigrationStatus, getSystemStatus, migrateDatabase } from '../../../api/system';
 import InstanceMessage from '../../../components/common/InstanceMessage';
+import Link from '../../../components/common/Link';
 import { Button } from '../../../components/controls/buttons';
 import DateFromNow from '../../../components/intl/DateFromNow';
 import TimeFormatter from '../../../components/intl/TimeFormatter';
@@ -163,7 +164,7 @@ export default class App extends React.PureComponent<Props, State> {
                   {translate('maintenance.all_systems_opetational')}
                 </p>
                 <p className="maintenance-text text-center">
-                  <a href={getBaseUrl() + '/'}>{translate('layout.home')}</a>
+                  <Link to={getBaseUrl() + '/'}>{translate('layout.home')}</Link>
                 </p>
               </>
             )}
@@ -204,12 +205,11 @@ export default class App extends React.PureComponent<Props, State> {
                     id="maintenance.sonarqube_is_under_maintenance.1"
                     values={{
                       link: (
-                        <a
-                          href="https://www.sonarlint.org/?referrer=sonarqube-maintenance"
-                          target="_blank"
-                          rel="noopener noreferrer">
+                        <Link
+                          to="https://www.sonarlint.org/?referrer=sonarqube-maintenance"
+                          target="_blank">
                           {translate('maintenance.sonarqube_is_under_maintenance_link.1')}
-                        </a>
+                        </Link>
                       )
                     }}
                   />
@@ -220,12 +220,11 @@ export default class App extends React.PureComponent<Props, State> {
                     id="maintenance.sonarqube_is_under_maintenance.2"
                     values={{
                       link: (
-                        <a
-                          href="https://redirect.sonarsource.com/doc/upgrading.html"
-                          target="_blank"
-                          rel="noopener noreferrer">
+                        <Link
+                          to="https://redirect.sonarsource.com/doc/upgrading.html"
+                          target="_blank">
                           {translate('maintenance.sonarqube_is_under_maintenance_link.2')}
-                        </a>
+                        </Link>
                       )
                     }}
                   />
@@ -239,7 +238,7 @@ export default class App extends React.PureComponent<Props, State> {
                   {translate('maintenance.database_is_up_to_date')}
                 </h1>
                 <p className="maintenance-text text-center">
-                  <a href={getBaseUrl() + '/'}>{translate('layout.home')}</a>
+                  <Link to={getBaseUrl() + '/'}>{translate('layout.home')}</Link>
                 </p>
               </>
             )}
@@ -295,7 +294,7 @@ export default class App extends React.PureComponent<Props, State> {
                   {translate('maintenance.database_is_up_to_date')}
                 </h1>
                 <p className="maintenance-text text-center">
-                  <a href={getBaseUrl() + '/'}>{translate('layout.home')}</a>
+                  <Link to={getBaseUrl() + '/'}>{translate('layout.home')}</Link>
                 </p>
               </>
             )}
index 478c483d9a4890c878ef12bc566be8be01f31410..0dc87dd0165b72eba4e65aedb4e2e56274db8b6d 100644 (file)
@@ -31,13 +31,12 @@ exports[`Maintenance Page should render DB_MIGRATION_NEEDED status 1`] = `
           id="maintenance.sonarqube_is_under_maintenance.1"
           values={
             Object {
-              "link": <a
-                href="https://www.sonarlint.org/?referrer=sonarqube-maintenance"
-                rel="noopener noreferrer"
+              "link": <ForwardRef(Link)
                 target="_blank"
+                to="https://www.sonarlint.org/?referrer=sonarqube-maintenance"
               >
                 maintenance.sonarqube_is_under_maintenance_link.1
-              </a>,
+              </ForwardRef(Link)>,
             }
           }
         />
@@ -50,13 +49,12 @@ exports[`Maintenance Page should render DB_MIGRATION_NEEDED status 1`] = `
           id="maintenance.sonarqube_is_under_maintenance.2"
           values={
             Object {
-              "link": <a
-                href="https://redirect.sonarsource.com/doc/upgrading.html"
-                rel="noopener noreferrer"
+              "link": <ForwardRef(Link)
                 target="_blank"
+                to="https://redirect.sonarsource.com/doc/upgrading.html"
               >
                 maintenance.sonarqube_is_under_maintenance_link.2
-              </a>,
+              </ForwardRef(Link)>,
             }
           }
         />
@@ -97,13 +95,12 @@ exports[`Maintenance Page should render DB_MIGRATION_RUNNING status 1`] = `
           id="maintenance.sonarqube_is_under_maintenance.1"
           values={
             Object {
-              "link": <a
-                href="https://www.sonarlint.org/?referrer=sonarqube-maintenance"
-                rel="noopener noreferrer"
+              "link": <ForwardRef(Link)
                 target="_blank"
+                to="https://www.sonarlint.org/?referrer=sonarqube-maintenance"
               >
                 maintenance.sonarqube_is_under_maintenance_link.1
-              </a>,
+              </ForwardRef(Link)>,
             }
           }
         />
@@ -116,13 +113,12 @@ exports[`Maintenance Page should render DB_MIGRATION_RUNNING status 1`] = `
           id="maintenance.sonarqube_is_under_maintenance.2"
           values={
             Object {
-              "link": <a
-                href="https://redirect.sonarsource.com/doc/upgrading.html"
-                rel="noopener noreferrer"
+              "link": <ForwardRef(Link)
                 target="_blank"
+                to="https://redirect.sonarsource.com/doc/upgrading.html"
               >
                 maintenance.sonarqube_is_under_maintenance_link.2
-              </a>,
+              </ForwardRef(Link)>,
             }
           }
         />
@@ -282,11 +278,11 @@ exports[`Maintenance Page should render UP status 1`] = `
       <p
         className="maintenance-text text-center"
       >
-        <a
-          href="/"
+        <ForwardRef(Link)
+          to="/"
         >
           layout.home
-        </a>
+        </ForwardRef(Link)>
       </p>
     </div>
   </div>
@@ -348,11 +344,11 @@ exports[`Setup Page should render MIGRATION_SUCCEEDED state 1`] = `
       <p
         className="maintenance-text text-center"
       >
-        <a
-          href="/"
+        <ForwardRef(Link)
+          to="/"
         >
           layout.home
-        </a>
+        </ForwardRef(Link)>
       </p>
     </div>
   </div>
@@ -383,11 +379,11 @@ exports[`Setup Page should render NO_MIGRATION state 1`] = `
       <p
         className="maintenance-text text-center"
       >
-        <a
-          href="/"
+        <ForwardRef(Link)
+          to="/"
         >
           layout.home
-        </a>
+        </ForwardRef(Link)>
       </p>
     </div>
   </div>
index debe1da43a77e4c5cd5fd065e68f2c365a311c11..2ce22d60b0ab818ed449ffad5d613a88b71d9b29 100644 (file)
@@ -21,7 +21,6 @@ import { sortBy, uniqBy } from 'lodash';
 import * as React from 'react';
 import { Helmet } from 'react-helmet-async';
 import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
 import {
   getAvailablePlugins,
   getInstalledPlugins,
@@ -29,6 +28,7 @@ import {
   getPluginUpdates
 } from '../../api/plugins';
 import { getValues, setSimpleSettingValue } from '../../api/settings';
+import Link from '../../components/common/Link';
 import Suggestions from '../../components/embed-docs-modal/Suggestions';
 import { Location, Router, withRouter } from '../../components/hoc/withRouter';
 import { Alert } from '../../components/ui/Alert';
index f839316faffd67f93aee51b8b85c4e296fc88ed0..dfe9f4507b0b89408bf8d7ef51329a7d3b3aaa92 100644 (file)
@@ -43,12 +43,12 @@ exports[`should render correctly: loaded 1`] = `
           id="marketplace.page.plugins.description2"
           values={
             Object {
-              "link": <Link
+              "link": <ForwardRef(Link)
                 target="_blank"
                 to="/documentation/instance-administration/marketplace/"
               >
                 marketplace.page.plugins.description2.link
-              </Link>,
+              </ForwardRef(Link)>,
             }
           }
         />
@@ -141,12 +141,12 @@ exports[`should render correctly: loading 1`] = `
           id="marketplace.page.plugins.description2"
           values={
             Object {
-              "link": <Link
+              "link": <ForwardRef(Link)
                 target="_blank"
                 to="/documentation/instance-administration/marketplace/"
               >
                 marketplace.page.plugins.description2.link
-              </Link>,
+              </ForwardRef(Link)>,
             }
           }
         />
index 56882029a15b11f9c71195311b98dcec4125477a..4336f3090f4c97da7e541632ea4eda8f9d01ea61 100644 (file)
@@ -19,7 +19,7 @@
  */
 import * as React from 'react';
 import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
 import { ResetButtonLink } from '../../../components/controls/buttons';
 import Modal from '../../../components/controls/Modal';
 import { translate } from '../../../helpers/l10n';
index 4ced6763e33dbf9fbeaa11bd6d07d5df6da861be..19f4ce99a1bdc7f15a8f34916dc9c1c26290c5b2 100644 (file)
@@ -19,6 +19,7 @@
  */
 import * as React from 'react';
 import { installPlugin, uninstallPlugin, updatePlugin } from '../../../api/plugins';
+import Link from '../../../components/common/Link';
 import { Button } from '../../../components/controls/buttons';
 import Checkbox from '../../../components/controls/Checkbox';
 import Tooltip from '../../../components/controls/Tooltip';
@@ -81,9 +82,11 @@ export default class PluginActions extends React.PureComponent<Props, State> {
             <p className="little-spacer-bottom">
               {translate('marketplace.available_under_commercial_license')}
             </p>
-            <a href={plugin.homepageUrl} target="_blank" rel="noopener noreferrer">
-              {translate('marketplace.learn_more')}
-            </a>
+            {plugin.homepageUrl && (
+              <Link to={plugin.homepageUrl} target="_blank">
+                {translate('marketplace.learn_more')}
+              </Link>
+            )}
           </div>
         )}
         {isInstalledPlugin(plugin) && (
index d5a6548367e6fa0adb82947eed298973a3944b23..15853674d26ee6cbe823a9142b33cf7866e90ffa 100644 (file)
@@ -54,12 +54,6 @@ exports[`should render available plugin correctly 2`] = `
     >
       marketplace.available_under_commercial_license
     </p>
-    <a
-      rel="noopener noreferrer"
-      target="_blank"
-    >
-      marketplace.learn_more
-    </a>
   </div>
 </div>
 `;
index cbb88c814473f5077fe26dfc4a92b08ab98d8c15..cde368eb107738c518440e2544c2a51efec6ef2c 100644 (file)
@@ -19,8 +19,8 @@
  */
 import * as React from 'react';
 import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
 import withCurrentUserContext from '../../../app/components/current-user/withCurrentUserContext';
+import Link from '../../../components/common/Link';
 import DismissableAlert from '../../../components/ui/DismissableAlert';
 import { translate } from '../../../helpers/l10n';
 import { queryToSearch } from '../../../helpers/urls';
index 7e58f6487039852649973d8c802fbe9064c58abe..b377671d51fd23cf259ec3f2973b504ac386c4b5 100644 (file)
@@ -19,7 +19,7 @@
  */
 import * as React from 'react';
 import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
 import { getBranchLikeQuery } from '../../../helpers/branch-like';
 import { translate } from '../../../helpers/l10n';
 import { getBaseUrl } from '../../../helpers/system';
index 959649c2057a272b4a40363b621816e88a55394b..76e9ea22aa159edcaadbf57276bd14e61b4617f1 100644 (file)
@@ -60,11 +60,11 @@ it('should render the default message', () => {
           id="overview.measures.empty_link"
           values={
             Object {
-              "learn_more_link": <Link
+              "learn_more_link": <ForwardRef(Link)
                 to="/documentation/user-guide/clean-as-you-code/"
               >
                 learn_more
-              </Link>,
+              </ForwardRef(Link)>,
             }
           }
         />
index c16bf79e93d69f2bc393b7b1c269329f4dbb9aec..76e429a85c88cd6ad391066b4e4a9f4644959ea4 100644 (file)
@@ -10,7 +10,7 @@ exports[`should render correctly: show prompt to configure CI 1`] = `
     id="overview.project.next_steps.set_up_ci"
     values={
       Object {
-        "link": <Link
+        "link": <ForwardRef(Link)
           to={
             Object {
               "pathname": "/tutorials",
@@ -19,7 +19,7 @@ exports[`should render correctly: show prompt to configure CI 1`] = `
           }
         >
           overview.project.next_steps.links.set_up_ci
-        </Link>,
+        </ForwardRef(Link)>,
       }
     }
   />
@@ -36,7 +36,7 @@ exports[`should render correctly: show prompt to configure PR decoration + CI, p
     id="overview.project.next_steps.set_up_pr_deco_and_ci.admin"
     values={
       Object {
-        "link_ci": <Link
+        "link_ci": <ForwardRef(Link)
           to={
             Object {
               "pathname": "/tutorials",
@@ -45,8 +45,8 @@ exports[`should render correctly: show prompt to configure PR decoration + CI, p
           }
         >
           overview.project.next_steps.links.set_up_ci
-        </Link>,
-        "link_project_settings": <Link
+        </ForwardRef(Link)>,
+        "link_project_settings": <ForwardRef(Link)
           to={
             Object {
               "pathname": "/project/settings",
@@ -55,7 +55,7 @@ exports[`should render correctly: show prompt to configure PR decoration + CI, p
           }
         >
           overview.project.next_steps.links.project_settings
-        </Link>,
+        </ForwardRef(Link)>,
       }
     }
   />
@@ -72,7 +72,7 @@ exports[`should render correctly: show prompt to configure PR decoration + CI, r
     id="overview.project.next_steps.set_up_pr_deco_and_ci"
     values={
       Object {
-        "link_ci": <Link
+        "link_ci": <ForwardRef(Link)
           to={
             Object {
               "pathname": "/tutorials",
@@ -81,7 +81,7 @@ exports[`should render correctly: show prompt to configure PR decoration + CI, r
           }
         >
           overview.project.next_steps.links.set_up_ci
-        </Link>,
+        </ForwardRef(Link)>,
       }
     }
   />
@@ -98,7 +98,7 @@ exports[`should render correctly: show prompt to configure PR decoration, projec
     id="overview.project.next_steps.set_up_pr_deco.admin"
     values={
       Object {
-        "link_project_settings": <Link
+        "link_project_settings": <ForwardRef(Link)
           to={
             Object {
               "pathname": "/project/settings",
@@ -107,7 +107,7 @@ exports[`should render correctly: show prompt to configure PR decoration, projec
           }
         >
           overview.project.next_steps.links.project_settings
-        </Link>,
+        </ForwardRef(Link)>,
       }
     }
   />
index 17a5cf7abccad2dc9b946eb43519019d7349004f..7929a93002405047e95dcfe1a205b6cf5726a85c 100644 (file)
@@ -34,11 +34,11 @@ exports[`should render "bad code setting" explanation: no link 1`] = `
         id="overview.measures.empty_link"
         values={
           Object {
-            "learn_more_link": <Link
+            "learn_more_link": <ForwardRef(Link)
               to="/documentation/user-guide/clean-as-you-code/"
             >
               learn_more
-            </Link>,
+            </ForwardRef(Link)>,
           }
         }
       />
@@ -81,11 +81,11 @@ exports[`should render "bad code setting" explanation: with link 1`] = `
         id="overview.measures.empty_link"
         values={
           Object {
-            "learn_more_link": <Link
+            "learn_more_link": <ForwardRef(Link)
               to="/documentation/user-guide/clean-as-you-code/"
             >
               learn_more
-            </Link>,
+            </ForwardRef(Link)>,
           }
         }
       />
@@ -160,11 +160,11 @@ exports[`should render the default message 6`] = `
         id="overview.measures.empty_link"
         values={
           Object {
-            "learn_more_link": <Link
+            "learn_more_link": <ForwardRef(Link)
               to="/documentation/user-guide/clean-as-you-code/"
             >
               learn_more
-            </Link>,
+            </ForwardRef(Link)>,
           }
         }
       />
index 0c47a3e1e572aba94d879f12fede2b2e1ecee8c9..fecd47bd0f5c4f4fa1d43c20b80f60fd177fe6a0 100644 (file)
@@ -18,7 +18,7 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
 import HelpTooltip from '../../../components/controls/HelpTooltip';
 import { getLeakValue } from '../../../components/measure/utils';
 import { getBranchLikeQuery } from '../../../helpers/branch-like';
index b62b5fa043feaddd5816b694ca0ee299debfdaab..d9335143d604d677074426aa1f9c52107bd48365 100644 (file)
@@ -19,7 +19,8 @@
  */
 import classNames from 'classnames';
 import * as React from 'react';
-import { Link, Path } from 'react-router-dom';
+import { Path } from 'react-router-dom';
+import Link from '../../../components/common/Link';
 import IssueTypeIcon from '../../../components/icons/IssueTypeIcon';
 import Measure from '../../../components/measure/Measure';
 import DrilldownLink from '../../../components/shared/DrilldownLink';
index ebba3879584c032d840fec644b6405be9f48751a..335b5497f4b6be52ba9a0ecc343113f360a2cbe3 100644 (file)
@@ -2,7 +2,7 @@
 
 exports[`should render correctly for bugs 1`] = `
 <Fragment>
-  <Link
+  <ForwardRef(Link)
     aria-label="overview.see_list_of_x_y_issues.1.0.metric.bugs.name"
     className="overview-measures-value text-light"
     to={
@@ -14,7 +14,7 @@ exports[`should render correctly for bugs 1`] = `
     }
   >
     1
-  </Link>
+  </ForwardRef(Link)>
   <BugIcon
     className="big-spacer-left little-spacer-right"
   />
@@ -24,7 +24,7 @@ exports[`should render correctly for bugs 1`] = `
 
 exports[`should render correctly for bugs 2`] = `
 <Fragment>
-  <Link
+  <ForwardRef(Link)
     aria-label="overview.see_list_of_x_y_issues.1.0.metric.new_bugs.name"
     className="overview-measures-value text-light"
     to={
@@ -36,7 +36,7 @@ exports[`should render correctly for bugs 2`] = `
     }
   >
     1
-  </Link>
+  </ForwardRef(Link)>
   <BugIcon
     className="big-spacer-left little-spacer-right"
   />
@@ -46,7 +46,7 @@ exports[`should render correctly for bugs 2`] = `
 
 exports[`should render correctly for code smells 1`] = `
 <Fragment>
-  <Link
+  <ForwardRef(Link)
     aria-label="overview.see_list_of_x_y_issues.1.0.metric.code_smells.name"
     className="overview-measures-value text-light"
     to={
@@ -58,7 +58,7 @@ exports[`should render correctly for code smells 1`] = `
     }
   >
     1
-  </Link>
+  </ForwardRef(Link)>
   <CodeSmellIcon
     className="big-spacer-left little-spacer-right"
   />
@@ -68,7 +68,7 @@ exports[`should render correctly for code smells 1`] = `
 
 exports[`should render correctly for code smells 2`] = `
 <Fragment>
-  <Link
+  <ForwardRef(Link)
     aria-label="overview.see_list_of_x_y_issues.1.0.metric.new_code_smells.name"
     className="overview-measures-value text-light"
     to={
@@ -80,7 +80,7 @@ exports[`should render correctly for code smells 2`] = `
     }
   >
     1
-  </Link>
+  </ForwardRef(Link)>
   <CodeSmellIcon
     className="big-spacer-left little-spacer-right"
   />
@@ -90,7 +90,7 @@ exports[`should render correctly for code smells 2`] = `
 
 exports[`should render correctly for hotspots 1`] = `
 <Fragment>
-  <Link
+  <ForwardRef(Link)
     aria-label="overview.see_list_of_x_y_issues.1.0.metric.security_hotspots.name"
     className="overview-measures-value text-light"
     to={
@@ -102,7 +102,7 @@ exports[`should render correctly for hotspots 1`] = `
     }
   >
     1
-  </Link>
+  </ForwardRef(Link)>
   <SecurityHotspotIcon
     className="big-spacer-left little-spacer-right"
   />
@@ -116,7 +116,7 @@ exports[`should render correctly for hotspots 1`] = `
 
 exports[`should render correctly for hotspots 2`] = `
 <Fragment>
-  <Link
+  <ForwardRef(Link)
     aria-label="overview.see_list_of_x_y_issues.1.0.metric.new_security_hotspots.name"
     className="overview-measures-value text-light"
     to={
@@ -128,7 +128,7 @@ exports[`should render correctly for hotspots 2`] = `
     }
   >
     1
-  </Link>
+  </ForwardRef(Link)>
   <SecurityHotspotIcon
     className="big-spacer-left little-spacer-right"
   />
@@ -142,7 +142,7 @@ exports[`should render correctly for hotspots 2`] = `
 
 exports[`should render correctly for vulnerabilities 1`] = `
 <Fragment>
-  <Link
+  <ForwardRef(Link)
     aria-label="overview.see_list_of_x_y_issues.1.0.metric.vulnerabilities.name"
     className="overview-measures-value text-light"
     to={
@@ -154,7 +154,7 @@ exports[`should render correctly for vulnerabilities 1`] = `
     }
   >
     1
-  </Link>
+  </ForwardRef(Link)>
   <VulnerabilityIcon
     className="big-spacer-left little-spacer-right"
   />
@@ -164,7 +164,7 @@ exports[`should render correctly for vulnerabilities 1`] = `
 
 exports[`should render correctly for vulnerabilities 2`] = `
 <Fragment>
-  <Link
+  <ForwardRef(Link)
     aria-label="overview.see_list_of_x_y_issues.1.0.metric.new_vulnerabilities.name"
     className="overview-measures-value text-light"
     to={
@@ -176,7 +176,7 @@ exports[`should render correctly for vulnerabilities 2`] = `
     }
   >
     1
-  </Link>
+  </ForwardRef(Link)>
   <VulnerabilityIcon
     className="big-spacer-left little-spacer-right"
   />
index 34fc6ff397dd6a6a362bdbaea8b3a355fead7a64..70ea3e3876950b9a7a671c607f35ec141ac41f45 100644 (file)
@@ -46,7 +46,7 @@ exports[`should render correclty 1`] = `
 
 exports[`should render correclty 2`] = `
 <li>
-  <Link
+  <ForwardRef(Link)
     className="overview-quality-gate-condition overview-quality-gate-condition-error"
     to={
       Object {
@@ -88,13 +88,13 @@ exports[`should render correclty 2`] = `
         </span>
       </div>
     </div>
-  </Link>
+  </ForwardRef(Link)>
 </li>
 `;
 
 exports[`should render correclty 3`] = `
 <li>
-  <Link
+  <ForwardRef(Link)
     className="overview-quality-gate-condition overview-quality-gate-condition-error"
     to={
       Object {
@@ -136,13 +136,13 @@ exports[`should render correclty 3`] = `
         </span>
       </div>
     </div>
-  </Link>
+  </ForwardRef(Link)>
 </li>
 `;
 
 exports[`should render correclty 4`] = `
 <li>
-  <Link
+  <ForwardRef(Link)
     className="overview-quality-gate-condition overview-quality-gate-condition-error"
     to={
       Object {
@@ -184,13 +184,13 @@ exports[`should render correclty 4`] = `
         </span>
       </div>
     </div>
-  </Link>
+  </ForwardRef(Link)>
 </li>
 `;
 
 exports[`should render correclty 5`] = `
 <li>
-  <Link
+  <ForwardRef(Link)
     className="overview-quality-gate-condition overview-quality-gate-condition-error"
     to={
       Object {
@@ -232,13 +232,13 @@ exports[`should render correclty 5`] = `
         </span>
       </div>
     </div>
-  </Link>
+  </ForwardRef(Link)>
 </li>
 `;
 
 exports[`should render correclty 6`] = `
 <li>
-  <Link
+  <ForwardRef(Link)
     className="overview-quality-gate-condition overview-quality-gate-condition-error"
     to={
       Object {
@@ -280,13 +280,13 @@ exports[`should render correclty 6`] = `
         </span>
       </div>
     </div>
-  </Link>
+  </ForwardRef(Link)>
 </li>
 `;
 
 exports[`should render correclty 7`] = `
 <li>
-  <Link
+  <ForwardRef(Link)
     className="overview-quality-gate-condition overview-quality-gate-condition-error"
     to={
       Object {
@@ -328,13 +328,13 @@ exports[`should render correclty 7`] = `
         </span>
       </div>
     </div>
-  </Link>
+  </ForwardRef(Link)>
 </li>
 `;
 
 exports[`should render correclty 8`] = `
 <li>
-  <Link
+  <ForwardRef(Link)
     className="overview-quality-gate-condition overview-quality-gate-condition-error"
     to={
       Object {
@@ -376,13 +376,13 @@ exports[`should render correclty 8`] = `
         </span>
       </div>
     </div>
-  </Link>
+  </ForwardRef(Link)>
 </li>
 `;
 
 exports[`should render correclty 9`] = `
 <li>
-  <Link
+  <ForwardRef(Link)
     className="overview-quality-gate-condition overview-quality-gate-condition-error"
     to={
       Object {
@@ -424,13 +424,13 @@ exports[`should render correclty 9`] = `
         </span>
       </div>
     </div>
-  </Link>
+  </ForwardRef(Link)>
 </li>
 `;
 
 exports[`should work with branch 1`] = `
 <li>
-  <Link
+  <ForwardRef(Link)
     className="overview-quality-gate-condition overview-quality-gate-condition-error"
     to={
       Object {
@@ -472,6 +472,6 @@ exports[`should work with branch 1`] = `
         </span>
       </div>
     </div>
-  </Link>
+  </ForwardRef(Link)>
 </li>
 `;
index 5346003387519c2e85fd2ef758e633d5882b8f0a..46c3f448280ee93466920d8e647a10020bc44217 100644 (file)
@@ -20,8 +20,8 @@
 import classNames from 'classnames';
 import * as React from 'react';
 import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
 import { colors } from '../../../app/theme';
+import Link from '../../../components/common/Link';
 import HelpTooltip from '../../../components/controls/HelpTooltip';
 import HelpIcon from '../../../components/icons/HelpIcon';
 import { translate } from '../../../helpers/l10n';
index 527e390ba6b9b2f3e02cde26b5011295ab6a06b9..6777ccaaccaa92b67d9ce5f71f8321bbf5a04cbd 100644 (file)
@@ -18,7 +18,7 @@ exports[`should render correctly for SQ 1`] = `
           id="overview.quality_gate.conditions_on_new_code"
           values={
             Object {
-              "link": <Link
+              "link": <ForwardRef(Link)
                 to={
                   Object {
                     "pathname": "/quality_gates/show/30",
@@ -26,7 +26,7 @@ exports[`should render correctly for SQ 1`] = `
                 }
               >
                 overview.quality_gate
-              </Link>,
+              </ForwardRef(Link)>,
             }
           }
         />
@@ -64,7 +64,7 @@ exports[`should render correctly for SQ 2`] = `
           id="overview.quality_gate.conditions_on_new_code"
           values={
             Object {
-              "link": <Link
+              "link": <ForwardRef(Link)
                 to={
                   Object {
                     "pathname": "/quality_gates/show/30",
@@ -72,7 +72,7 @@ exports[`should render correctly for SQ 2`] = `
                 }
               >
                 overview.quality_gate
-              </Link>,
+              </ForwardRef(Link)>,
             }
           }
         />
index 02ead1cf2a284591898b56f19457418ea453fee3..ef790e83f4d0fa5e47da904693385ac2eed89ec2 100644 (file)
@@ -18,7 +18,7 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
 import { queryToSearch } from '../../../helpers/urls';
 import { PermissionTemplate } from '../../../types/types';
 import { PERMISSION_TEMPLATES_PATH } from '../utils';
index 09eca7b0f1cfb9cb005d747aa256ca1d373161ae..bc9277e882c9be241d44549d80fa2f435300b901 100644 (file)
@@ -18,7 +18,7 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
 import { translate } from '../../../helpers/l10n';
 import { PermissionTemplate } from '../../../types/types';
 import { PERMISSION_TEMPLATES_PATH } from '../utils';
index f4b305b47fa4c5b208fdde5db297c459dc3cd48e..a6c24bb7e16cb1fcf8183e554f8513537a4193b4 100644 (file)
@@ -4,7 +4,7 @@ exports[`render correctly 1`] = `
 <td
   className="little-padded-left little-padded-right"
 >
-  <Link
+  <ForwardRef(Link)
     to={
       Object {
         "pathname": "/admin/permission_templates",
@@ -17,7 +17,7 @@ exports[`render correctly 1`] = `
     >
       test
     </strong>
-  </Link>
+  </ForwardRef(Link)>
   <div
     className="spacer-top js-defaults"
   >
index 7d3b7dc09dbff127396d5ed2a9671e1a6a4c9112..41c393a3b3f117cf839844bb281f3e0b0d10f22f 100644 (file)
@@ -19,7 +19,7 @@
  */
 import * as React from 'react';
 import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
 import { ButtonLink } from '../../../components/controls/buttons';
 import BranchIcon from '../../../components/icons/BranchIcon';
 import DropdownIcon from '../../../components/icons/DropdownIcon';
index 542540066fbefb4d3f8618bb30727bf0d0ef3a07..37c6333c3a73ecf5b4bc980c931635f8ac033b56 100644 (file)
@@ -19,7 +19,7 @@
  */
 import * as React from 'react';
 import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
 import { ResetButtonLink } from '../../../components/controls/buttons';
 import DropdownIcon from '../../../components/icons/DropdownIcon';
 import Level from '../../../components/ui/Level';
index d2384be643a7ff512d8216aa33668b488d96692f..ce770c6fcd3717704e5dc62f03d22cd9fe5ccb1b 100644 (file)
@@ -69,7 +69,7 @@ exports[`should render 2`] = `
                 />
                 master
               </span>,
-              "project": <Link
+              "project": <ForwardRef(Link)
                 onClick={[Function]}
                 title="Foo"
                 to={
@@ -80,7 +80,7 @@ exports[`should render 2`] = `
                 }
               >
                 Foo
-              </Link>,
+              </ForwardRef(Link)>,
             }
           }
         />
@@ -107,7 +107,7 @@ exports[`should render 2`] = `
                 />
                 master
               </span>,
-              "project": <Link
+              "project": <ForwardRef(Link)
                 onClick={[Function]}
                 title="Bar"
                 to={
@@ -118,7 +118,7 @@ exports[`should render 2`] = `
                 }
               >
                 Bar
-              </Link>,
+              </ForwardRef(Link)>,
             }
           }
         />
@@ -173,7 +173,7 @@ exports[`should render for a branch 1`] = `
                 />
                 feature-x
               </span>,
-              "project": <Link
+              "project": <ForwardRef(Link)
                 onClick={[Function]}
                 title="Foo"
                 to={
@@ -184,7 +184,7 @@ exports[`should render for a branch 1`] = `
                 }
               >
                 Foo
-              </Link>,
+              </ForwardRef(Link)>,
             }
           }
         />
@@ -217,7 +217,7 @@ exports[`should render for a branch 1`] = `
               />
               master
             </span>,
-            "project": <Link
+            "project": <ForwardRef(Link)
               onClick={[Function]}
               title="Bar"
               to={
@@ -228,7 +228,7 @@ exports[`should render for a branch 1`] = `
               }
             >
               Bar
-            </Link>,
+            </ForwardRef(Link)>,
           }
         }
       />
index c263d815f9cb22c18a88e6890d0ac7ca3fa7c622..cd9373673f2544195a61d16d76b46b913f999567 100644 (file)
@@ -85,7 +85,7 @@ exports[`should render 2`] = `
       <div
         className="flex-1 text-ellipsis"
       >
-        <Link
+        <ForwardRef(Link)
           onClick={[Function]}
           title="Foo"
           to={
@@ -100,7 +100,7 @@ exports[`should render 2`] = `
           >
             Foo
           </span>
-        </Link>
+        </ForwardRef(Link)>
       </div>
     </li>
     <li
@@ -116,7 +116,7 @@ exports[`should render 2`] = `
       <div
         className="flex-1 text-ellipsis"
       >
-        <Link
+        <ForwardRef(Link)
           onClick={[Function]}
           title="Bar"
           to={
@@ -131,7 +131,7 @@ exports[`should render 2`] = `
           >
             Bar
           </span>
-        </Link>
+        </ForwardRef(Link)>
       </div>
     </li>
   </ul>
index 6adb10558065e0e9ce912d4c3d37782c8ec7c474..634306b49fb3199dd539d461fbcca78591b4b777 100644 (file)
@@ -19,7 +19,7 @@
  */
 import * as React from 'react';
 import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
 import { translate } from '../../../helpers/l10n';
 
 export interface AppHeaderProps {
index f411099adfa9e5fe77de312dc7fcaf6413b5e5e7..8ff79641274c5f0a01f05c9bf37071314eeed670 100644 (file)
@@ -17,11 +17,11 @@ exports[`should render correctly: can admin 1`] = `
       id="project_baseline.page.description"
       values={
         Object {
-          "link": <Link
+          "link": <ForwardRef(Link)
             to="/documentation/project-administration/new-code-period/"
           >
             project_baseline.page.description.link
-          </Link>,
+          </ForwardRef(Link)>,
         }
       }
     />
@@ -31,11 +31,11 @@ exports[`should render correctly: can admin 1`] = `
       id="project_baseline.page.description2"
       values={
         Object {
-          "link": <Link
+          "link": <ForwardRef(Link)
             to="/admin/settings?category=new_code_period"
           >
             project_baseline.page.description2.link
-          </Link>,
+          </ForwardRef(Link)>,
         }
       }
     />
@@ -60,11 +60,11 @@ exports[`should render correctly: cannot admin 1`] = `
       id="project_baseline.page.description"
       values={
         Object {
-          "link": <Link
+          "link": <ForwardRef(Link)
             to="/documentation/project-administration/new-code-period/"
           >
             project_baseline.page.description.link
-          </Link>,
+          </ForwardRef(Link)>,
         }
       }
     />
index 42c6826000eb38ec634d8a651d994822a6964d92..efda55587f42346124c254e851add2d46865dfc0 100644 (file)
@@ -19,7 +19,7 @@
  */
 import * as React from 'react';
 import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
 import DeferredSpinner from '../../../components/ui/DeferredSpinner';
 import { translate } from '../../../helpers/l10n';
 import { formatMeasure } from '../../../helpers/measures';
index 810c4081524d4fbde05093aaf1e8440ff381a26d..1020ddc9890dc41b08cb40ccdc0341745645e6e7 100644 (file)
@@ -47,11 +47,11 @@ exports[`should render correctly when user is admin 1`] = `
       id="project_branch_pull_request.lifetime_information.admin"
       values={
         Object {
-          "settings": <Link
+          "settings": <ForwardRef(Link)
             to="/admin/settings"
           >
             settings.page
-          </Link>,
+          </ForwardRef(Link)>,
         }
       }
     />
index 37d4a78600becfa1637eefaf05d789ec73f7a974..473e17fbaece36a3339c9e1ed207524cd07cb857 100644 (file)
@@ -19,6 +19,7 @@
  */
 import * as React from 'react';
 import { doExport } from '../../../api/project-dump';
+import Link from '../../../components/common/Link';
 import { Button } from '../../../components/controls/buttons';
 import DateFromNow from '../../../components/intl/DateFromNow';
 import DateTimeFormatter from '../../../components/intl/DateTimeFormatter';
@@ -110,9 +111,9 @@ export default class Export extends React.Component<Props> {
         <div className="boxed-group-inner">
           <Alert id="export-in-progress" variant="error">
             {translate('project_dump.failed_export')}
-            <a className="spacer-left" href={detailsUrl}>
+            <Link className="spacer-left" to={detailsUrl}>
               {translate('project_dump.see_details')}
-            </a>
+            </Link>
           </Alert>
 
           {this.renderExport()}
index 39a28c846efc28062b4a63c4b73257ff275751a3..39c61a03b3702c372afdaecaa701e4d621e5832a 100644 (file)
@@ -19,8 +19,8 @@
  */
 import classNames from 'classnames';
 import * as React from 'react';
-import { Link } from 'react-router-dom';
 import { doImport } from '../../../api/project-dump';
+import Link from '../../../components/common/Link';
 import { Button } from '../../../components/controls/buttons';
 import DateFromNow from '../../../components/intl/DateFromNow';
 import DateTimeFormatter from '../../../components/intl/DateTimeFormatter';
index 788257b21d03f597213e787fb2aa54b0183c8bee..8e02d72a15c54733d739329e01c9d928967b670d 100644 (file)
@@ -126,12 +126,12 @@ exports[`should render correctly: task failed 1`] = `
       variant="error"
     >
       project_dump.failed_export
-      <a
+      <ForwardRef(Link)
         className="spacer-left"
-        href="/project/background_tasks?id=key&status=FAILED&taskType=PROJECT_EXPORT"
+        to="/project/background_tasks?id=key&status=FAILED&taskType=PROJECT_EXPORT"
       >
         project_dump.see_details
-      </a>
+      </ForwardRef(Link)>
     </Alert>
     <div>
       <div
index 0c62310f98da20a6c2a831f94f22f19b9cba9022..7c3c0bd960b1457f5c2118dbe66cd87811416ec8 100644 (file)
@@ -41,7 +41,7 @@ exports[`should render correctly: failed 1`] = `
       variant="error"
     >
       project_dump.failed_import
-      <Link
+      <ForwardRef(Link)
         className="spacer-left"
         to={
           Object {
@@ -52,7 +52,7 @@ exports[`should render correctly: failed 1`] = `
         }
       >
         project_dump.see_details
-      </Link>
+      </ForwardRef(Link)>
     </Alert>
     <div>
       <div
index 49df2cc3647fff7eedf4826b59b123db5d9b4249..92ffdfe5690e74ac96c5e8b12d0213464726debf 100644 (file)
@@ -19,6 +19,7 @@
  */
 import * as React from 'react';
 import isValidUri from '../../app/utils/isValidUri';
+import Link from '../../components/common/Link';
 import { Button } from '../../components/controls/buttons';
 import ConfirmButton from '../../components/controls/ConfirmButton';
 import ProjectLinkIcon from '../../components/icons/ProjectLinkIcon';
@@ -93,9 +94,9 @@ export default class LinkRow extends React.PureComponent<Props> {
         <td className="nowrap">{this.renderName(link)}</td>
         <td className="nowrap js-url">
           {isValidUri(link.url) ? (
-            <a href={link.url} rel="nofollow noreferrer noopener" target="_blank">
+            <Link to={link.url} target="_blank">
               {link.url}
-            </a>
+            </Link>
           ) : (
             link.url
           )}
index e05b8f94f914a536146e86db5037e4e6290bfa0e..1d479fdfb1a7b265c9f4c59a890192af901d9d3b 100644 (file)
@@ -26,13 +26,12 @@ exports[`should render custom link 1`] = `
   <td
     className="nowrap js-url"
   >
-    <a
-      href="http://example.com"
-      rel="nofollow noreferrer noopener"
+    <ForwardRef(Link)
       target="_blank"
+      to="http://example.com"
     >
       http://example.com
-    </a>
+    </ForwardRef(Link)>
   </td>
   <td
     className="thin nowrap"
@@ -131,13 +130,12 @@ exports[`should render provided link 1`] = `
   <td
     className="nowrap js-url"
   >
-    <a
-      href="http://example.com"
-      rel="nofollow noreferrer noopener"
+    <ForwardRef(Link)
       target="_blank"
+      to="http://example.com"
     >
       http://example.com
-    </a>
+    </ForwardRef(Link)>
   </td>
   <td
     className="thin nowrap"
index 3cae609049786b7f645c94ebbe4ff5ebb2e514cf..cc6ef7da0067ce0bc26bdeb474928534bd0ce813 100644 (file)
 import * as React from 'react';
 import { Helmet } from 'react-helmet-async';
 import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
 import { components, OptionProps } from 'react-select';
 import A11ySkipTarget from '../../components/a11y/A11ySkipTarget';
 import DisableableSelectOption from '../../components/common/DisableableSelectOption';
+import Link from '../../components/common/Link';
 import { SubmitButton } from '../../components/controls/buttons';
 import HelpTooltip from '../../components/controls/HelpTooltip';
 import Radio from '../../components/controls/Radio';
index d46f48ec678dcbc64e36d7721e3ce571f4a44811..e05fd68d052506d4b70845dbd248cb51a0de8722 100644 (file)
@@ -478,7 +478,7 @@ exports[`should render correctly: show new code warning 1`] = `
             id="project_quality_gate.no_condition_on_new_code"
             values={
               Object {
-                "link": <Link
+                "link": <ForwardRef(Link)
                   to={
                     Object {
                       "pathname": "/quality_gates/show/3",
@@ -486,7 +486,7 @@ exports[`should render correctly: show new code warning 1`] = `
                   }
                 >
                   project_quality_gate.no_condition.link
-                </Link>,
+                </ForwardRef(Link)>,
               }
             }
           />
index 8fd0186beae126e52ca6d833355aac40e5d5d4b5..2a8e33b2671b27822235f37bcf912228f16c3024 100644 (file)
@@ -20,9 +20,9 @@
 import { groupBy, orderBy } from 'lodash';
 import * as React from 'react';
 import { Helmet } from 'react-helmet-async';
-import { Link } from 'react-router-dom';
 import { Profile } from '../../api/quality-profiles';
 import A11ySkipTarget from '../../components/a11y/A11ySkipTarget';
+import Link from '../../components/common/Link';
 import { Button } from '../../components/controls/buttons';
 import HelpTooltip from '../../components/controls/HelpTooltip';
 import Suggestions from '../../components/embed-docs-modal/Suggestions';
index 08e1b4414072d99263beb3ad3510bc19e57a5ce5..7bffb8aadc5421caec03d393d31c9d8679eb25de 100644 (file)
@@ -99,7 +99,7 @@ exports[`should render correctly: add language 1`] = `
             <td
               className="nowrap text-right"
             >
-              <Link
+              <ForwardRef(Link)
                 to={
                   Object {
                     "pathname": "/coding_rules",
@@ -108,7 +108,7 @@ exports[`should render correctly: add language 1`] = `
                 }
               >
                 10
-              </Link>
+              </ForwardRef(Link)>
             </td>
             <td
               className="text-right"
@@ -141,7 +141,7 @@ exports[`should render correctly: add language 1`] = `
             <td
               className="nowrap text-right"
             >
-              <Link
+              <ForwardRef(Link)
                 to={
                   Object {
                     "pathname": "/coding_rules",
@@ -150,7 +150,7 @@ exports[`should render correctly: add language 1`] = `
                 }
               >
                 10
-              </Link>
+              </ForwardRef(Link)>
             </td>
             <td
               className="text-right"
@@ -185,7 +185,7 @@ exports[`should render correctly: add language 1`] = `
             <td
               className="nowrap text-right"
             >
-              <Link
+              <ForwardRef(Link)
                 to={
                   Object {
                     "pathname": "/coding_rules",
@@ -194,7 +194,7 @@ exports[`should render correctly: add language 1`] = `
                 }
               >
                 10
-              </Link>
+              </ForwardRef(Link)>
             </td>
             <td
               className="text-right"
@@ -399,7 +399,7 @@ exports[`should render correctly: default 1`] = `
             <td
               className="nowrap text-right"
             >
-              <Link
+              <ForwardRef(Link)
                 to={
                   Object {
                     "pathname": "/coding_rules",
@@ -408,7 +408,7 @@ exports[`should render correctly: default 1`] = `
                 }
               >
                 10
-              </Link>
+              </ForwardRef(Link)>
             </td>
             <td
               className="text-right"
@@ -441,7 +441,7 @@ exports[`should render correctly: default 1`] = `
             <td
               className="nowrap text-right"
             >
-              <Link
+              <ForwardRef(Link)
                 to={
                   Object {
                     "pathname": "/coding_rules",
@@ -450,7 +450,7 @@ exports[`should render correctly: default 1`] = `
                 }
               >
                 10
-              </Link>
+              </ForwardRef(Link)>
             </td>
             <td
               className="text-right"
@@ -485,7 +485,7 @@ exports[`should render correctly: default 1`] = `
             <td
               className="nowrap text-right"
             >
-              <Link
+              <ForwardRef(Link)
                 to={
                   Object {
                     "pathname": "/coding_rules",
@@ -494,7 +494,7 @@ exports[`should render correctly: default 1`] = `
                 }
               >
                 10
-              </Link>
+              </ForwardRef(Link)>
             </td>
             <td
               className="text-right"
@@ -720,7 +720,7 @@ exports[`should render correctly: open profile 1`] = `
             <td
               className="nowrap text-right"
             >
-              <Link
+              <ForwardRef(Link)
                 to={
                   Object {
                     "pathname": "/coding_rules",
@@ -729,7 +729,7 @@ exports[`should render correctly: open profile 1`] = `
                 }
               >
                 10
-              </Link>
+              </ForwardRef(Link)>
             </td>
             <td
               className="text-right"
@@ -762,7 +762,7 @@ exports[`should render correctly: open profile 1`] = `
             <td
               className="nowrap text-right"
             >
-              <Link
+              <ForwardRef(Link)
                 to={
                   Object {
                     "pathname": "/coding_rules",
@@ -771,7 +771,7 @@ exports[`should render correctly: open profile 1`] = `
                 }
               >
                 10
-              </Link>
+              </ForwardRef(Link)>
             </td>
             <td
               className="text-right"
@@ -806,7 +806,7 @@ exports[`should render correctly: open profile 1`] = `
             <td
               className="nowrap text-right"
             >
-              <Link
+              <ForwardRef(Link)
                 to={
                   Object {
                     "pathname": "/coding_rules",
@@ -815,7 +815,7 @@ exports[`should render correctly: open profile 1`] = `
                 }
               >
                 10
-              </Link>
+              </ForwardRef(Link)>
             </td>
             <td
               className="text-right"
index b506a93878e889b8fa1679ddf44433d797079553..ca55cf7dabf41d0783f714e4f5b935a847d667cd 100644 (file)
@@ -18,9 +18,9 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import * as React from 'react';
-import { Link } from 'react-router-dom';
 import { components, OptionProps } from 'react-select';
 import DisableableSelectOption from '../../../components/common/DisableableSelectOption';
+import Link from '../../../components/common/Link';
 import { BasicSelectOption } from '../../../components/controls/Select';
 import { translate } from '../../../helpers/l10n';
 import { getQualityProfileUrl } from '../../../helpers/urls';
index 534f179f976149fcd74532f0f316a59103ea6840..a9f9fb0c776394a71b79f6794e92b33224503b21 100644 (file)
@@ -33,7 +33,7 @@ exports[`tooltip should render correctly: default 1`] = `
   <p>
     project_quality_profile.add_language_modal.profile_unavailable_no_active_rules
   </p>
-  <Link
+  <ForwardRef(Link)
     to={
       Object {
         "pathname": "/profiles/show",
@@ -42,7 +42,7 @@ exports[`tooltip should render correctly: default 1`] = `
     }
   >
     project_quality_profile.add_language_modal.go_to_profile
-  </Link>
+  </ForwardRef(Link)>
 </React.Fragment>
 `;
 
index 11530510c6f85e059098c2ef58715821bbf84522..f6007a6681f3b7228b9d054b048b0efdf52b9ce4 100644 (file)
@@ -19,8 +19,8 @@
  */
 import * as React from 'react';
 import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
 import '../../../components/common/EmptySearch.css';
+import Link from '../../../components/common/Link';
 import { translate } from '../../../helpers/l10n';
 import { queryToSearch } from '../../../helpers/urls';
 import { Dict } from '../../../types/types';
index 1cf78b4a9974156bc010b64da287c9218ec78cc4..b020a4bb64c5279ae1f2e281d8b568a76ed70ab9 100644 (file)
@@ -18,7 +18,7 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
 import { translate } from '../../../helpers/l10n';
 
 export default function NoFavoriteProjects() {
index 3fa8a85e11d66bdb3626bf39dabbbe1d9276e20e..2b3db1c30bbd46beec02f9e0361716c0947fe029 100644 (file)
@@ -18,9 +18,9 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import * as React from 'react';
-import { Link } from 'react-router-dom';
 import { getAlmSettings } from '../../../api/alm-settings';
 import withCurrentUserContext from '../../../app/components/current-user/withCurrentUserContext';
+import Link from '../../../components/common/Link';
 import { Button } from '../../../components/controls/buttons';
 import Dropdown from '../../../components/controls/Dropdown';
 import DropdownIcon from '../../../components/icons/DropdownIcon';
index 7d933de7d9de22bbbc92310e39345573d26c58bb..f53122f6ab04020d9326e6ff8429b8c60d4aca22 100644 (file)
@@ -18,7 +18,7 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
 import ChevronsIcon from '../../../components/icons/ChevronsIcon';
 import { translate } from '../../../helpers/l10n';
 import { getBaseUrl } from '../../../helpers/system';
index 9c59832d3e6481e250a7d3527faef54e4ba99fbf..f52b6888166b9f8f596ebbd03e48b8c507251256 100644 (file)
@@ -16,12 +16,12 @@ exports[`renders 1`] = `
     <p
       className="big-spacer-top"
     >
-      <Link
+      <ForwardRef(Link)
         className="button"
         to="/projects/all"
       >
         projects.explore_projects
-      </Link>
+      </ForwardRef(Link)>
     </p>
   </div>
 </div>
index c2eea8f86d0b2846a48935fe49d4b9051c53a046..1f8eda4e83a5e0e7e53c61a9a9bb6aa0feaa0989 100644 (file)
@@ -17,7 +17,7 @@ exports[`should render correctly: default 1`] = `
       <li
         className="bordered-top little-padded-top"
       >
-        <Link
+        <ForwardRef(Link)
           className="display-flex-center"
           to={
             Object {
@@ -30,7 +30,7 @@ exports[`should render correctly: default 1`] = `
             size={16}
           />
           more
-        </Link>
+        </ForwardRef(Link)>
       </li>
     </ul>
   }
index b4e778a2161d0079371f7ca77fc0c477e779767a..209d4eee7e146a586ef6cb4e607fa9c612c916da 100644 (file)
@@ -1,7 +1,7 @@
 // Jest Snapshot v1, https://goo.gl/fbAQLP
 
 exports[`should render correctly: bitbucket 1`] = `
-<Link
+<ForwardRef(Link)
   className="display-flex-center"
   to={
     Object {
@@ -17,11 +17,11 @@ exports[`should render correctly: bitbucket 1`] = `
     width={16}
   />
   my_account.add_project.bitbucket
-</Link>
+</ForwardRef(Link)>
 `;
 
 exports[`should render correctly: manual 1`] = `
-<Link
+<ForwardRef(Link)
   className="display-flex-center"
   to={
     Object {
@@ -34,5 +34,5 @@ exports[`should render correctly: manual 1`] = `
     className="spacer-right"
   />
   my_account.add_project.manual
-</Link>
+</ForwardRef(Link)>
 `;
index 7b06cc6385de78af4cb7979e385f3d4cc701b624..6a1f90701d9c1e4460409d5fe10def3fb499619a 100644 (file)
@@ -20,7 +20,7 @@
 import classNames from 'classnames';
 import * as React from 'react';
 import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
+import Link from '../../../../components/common/Link';
 import PrivacyBadgeContainer from '../../../../components/common/PrivacyBadgeContainer';
 import Favorite from '../../../../components/controls/Favorite';
 import Tooltip from '../../../../components/controls/Tooltip';
index af69b9a3c92d01daa4ec09a31ebc9fadfe377b9a..8a83a9687766a7fbee1ddcdabc370cf7e6acb620 100644 (file)
@@ -36,7 +36,7 @@ exports[`should display applications 1`] = `
         className="h2 project-card-name text-ellipsis"
         title="Foo"
       >
-        <Link
+        <ForwardRef(Link)
           to={
             Object {
               "pathname": "/dashboard",
@@ -45,7 +45,7 @@ exports[`should display applications 1`] = `
           }
         >
           Foo
-        </Link>
+        </ForwardRef(Link)>
       </h3>
       <ProjectCardQualityGate
         status="OK"
@@ -139,7 +139,7 @@ exports[`should display applications: with project count 1`] = `
         className="h2 project-card-name text-ellipsis"
         title="Foo"
       >
-        <Link
+        <ForwardRef(Link)
           to={
             Object {
               "pathname": "/dashboard",
@@ -148,7 +148,7 @@ exports[`should display applications: with project count 1`] = `
           }
         >
           Foo
-        </Link>
+        </ForwardRef(Link)>
       </h3>
       <ProjectCardQualityGate
         status="OK"
@@ -223,7 +223,7 @@ exports[`should display configure analysis button for logged in user: default 1`
         className="h2 project-card-name text-ellipsis"
         title="Foo"
       >
-        <Link
+        <ForwardRef(Link)
           to={
             Object {
               "pathname": "/dashboard",
@@ -232,7 +232,7 @@ exports[`should display configure analysis button for logged in user: default 1`
           }
         >
           Foo
-        </Link>
+        </ForwardRef(Link)>
       </h3>
     </div>
     <div
@@ -263,7 +263,7 @@ exports[`should display configure analysis button for logged in user: default 1`
         >
           projects.not_analyzed.TRK
         </span>
-        <Link
+        <ForwardRef(Link)
           className="button spacer-left"
           to={
             Object {
@@ -273,7 +273,7 @@ exports[`should display configure analysis button for logged in user: default 1`
           }
         >
           projects.configure_analysis
-        </Link>
+        </ForwardRef(Link)>
       </div>
     </div>
     <div
@@ -437,7 +437,7 @@ exports[`should display not analyzed yet 1`] = `
         className="h2 project-card-name text-ellipsis"
         title="Foo"
       >
-        <Link
+        <ForwardRef(Link)
           to={
             Object {
               "pathname": "/dashboard",
@@ -446,7 +446,7 @@ exports[`should display not analyzed yet 1`] = `
           }
         >
           Foo
-        </Link>
+        </ForwardRef(Link)>
       </h3>
     </div>
     <div
@@ -506,7 +506,7 @@ exports[`should display the overall measures and quality gate 1`] = `
         className="h2 project-card-name text-ellipsis"
         title="Foo"
       >
-        <Link
+        <ForwardRef(Link)
           to={
             Object {
               "pathname": "/dashboard",
@@ -515,7 +515,7 @@ exports[`should display the overall measures and quality gate 1`] = `
           }
         >
           Foo
-        </Link>
+        </ForwardRef(Link)>
       </h3>
       <ProjectCardQualityGate
         status="OK"
index 622329fc95453fa71e8629ecd7e977aede7c3842..c25cdf0455e7f3abd20771edc425957777839870 100644 (file)
@@ -19,8 +19,8 @@
  */
 import * as React from 'react';
 import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
 import { createProject } from '../../api/components';
+import Link from '../../components/common/Link';
 import VisibilitySelector from '../../components/common/VisibilitySelector';
 import { ResetButtonLink, SubmitButton } from '../../components/controls/buttons';
 import Modal from '../../components/controls/Modal';
index 5178b23c91906cd38a79d9b28e6fcf15b2e16594..0c0752f811d95b2a350134da4e4973a8f3f3faea 100644 (file)
@@ -18,8 +18,8 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import * as React from 'react';
-import { Link } from 'react-router-dom';
 import { Project } from '../../api/components';
+import Link from '../../components/common/Link';
 import PrivacyBadgeContainer from '../../components/common/PrivacyBadgeContainer';
 import Checkbox from '../../components/controls/Checkbox';
 import Tooltip from '../../components/controls/Tooltip';
index 6e3daf3a9bff8df6f888d32b4b9105a567c63e9d..1a4fc2524bd542073384e129dca441b8b6a225ac 100644 (file)
@@ -312,7 +312,7 @@ exports[`creates project 4`] = `
           id="projects_management.project_has_been_successfully_created"
           values={
             Object {
-              "project": <Link
+              "project": <ForwardRef(Link)
                 to={
                   Object {
                     "pathname": "/dashboard",
@@ -321,7 +321,7 @@ exports[`creates project 4`] = `
                 }
               >
                 name
-              </Link>,
+              </ForwardRef(Link)>,
             }
           }
         />
index 19273a75709f6041f21b49223d4787d8b194e678..3b90b7f657ced4beb23d2758cb183998e3bcca54 100644 (file)
@@ -16,7 +16,7 @@ exports[`renders 1`] = `
   <td
     className="nowrap hide-overflow project-row-text-cell"
   >
-    <Link
+    <ForwardRef(Link)
       className="link-no-underline"
       to={
         Object {
@@ -37,7 +37,7 @@ exports[`renders 1`] = `
           Project
         </span>
       </Tooltip>
-    </Link>
+    </ForwardRef(Link)>
   </td>
   <td
     className="thin nowrap"
@@ -108,7 +108,7 @@ exports[`renders: portfolio 1`] = `
   <td
     className="nowrap hide-overflow project-row-text-cell"
   >
-    <Link
+    <ForwardRef(Link)
       className="link-no-underline"
       to={
         Object {
@@ -129,7 +129,7 @@ exports[`renders: portfolio 1`] = `
           Project
         </span>
       </Tooltip>
-    </Link>
+    </ForwardRef(Link)>
   </td>
   <td
     className="thin nowrap"
@@ -200,7 +200,7 @@ exports[`renders: with lastAnalysisDate 1`] = `
   <td
     className="nowrap hide-overflow project-row-text-cell"
   >
-    <Link
+    <ForwardRef(Link)
       className="link-no-underline"
       to={
         Object {
@@ -221,7 +221,7 @@ exports[`renders: with lastAnalysisDate 1`] = `
           Project
         </span>
       </Tooltip>
-    </Link>
+    </ForwardRef(Link)>
   </td>
   <td
     className="thin nowrap"
index 367ee4be80bfe8447e208d1eb22bb1828e4de550..da8a8f24414d4201d15a3064c28d2345e4c49a51 100644 (file)
@@ -20,7 +20,7 @@
 import { isSameMinute } from 'date-fns';
 import { sortBy } from 'lodash';
 import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
 import DateTimeFormatter from '../../../components/intl/DateTimeFormatter';
 import { parseDate } from '../../../helpers/dates';
 import { translate } from '../../../helpers/l10n';
index 0aa89d41eec5885d2af2cb957e712bf62d10e65d..3e6999ecc14735c5d3a0eef772447bcd23351b35 100644 (file)
@@ -19,6 +19,7 @@
  */
 import { shallow } from 'enzyme';
 import * as React from 'react';
+import Link from '../../../../components/common/Link';
 import { ProfileChangelogEvent } from '../../types';
 import Changelog from '../Changelog';
 import ChangesList from '../ChangesList';
@@ -68,7 +69,7 @@ it('should render action', () => {
 it('should render rule', () => {
   const events = [createEvent()];
   const changelog = shallow(<Changelog events={events} />);
-  expect(changelog.find('Link').prop('to')).toHaveProperty('search', '?rule_key=squid1234');
+  expect(changelog.find(Link).prop('to')).toHaveProperty('search', '?rule_key=squid1234');
 });
 
 it('should render ChangesList', () => {
index 4ced3242a18ec1f69ba398c3ac9e046dc6fa4cee..538e9b0874167670e3f4ec860318e8f36e6a9979 100644 (file)
@@ -18,8 +18,8 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import * as React from 'react';
-import { Link } from 'react-router-dom';
 import { CompareResponse, Profile } from '../../../api/quality-profiles';
+import Link from '../../../components/common/Link';
 import ChevronLeftIcon from '../../../components/icons/ChevronLeftIcon';
 import ChevronRightIcon from '../../../components/icons/ChevronRightIcon';
 import SeverityIcon from '../../../components/icons/SeverityIcon';
index bfab84c2975ca1b7fb616d57d4052ee3b249eecc..8a477b618e12ea6464114196b98dad3e34ec1236 100644 (file)
@@ -19,8 +19,8 @@
  */
 import { shallow } from 'enzyme';
 import * as React from 'react';
-import { Link } from 'react-router-dom';
 import { Profile } from '../../../../api/quality-profiles';
+import Link from '../../../../components/common/Link';
 import ComparisonEmpty from '../ComparisonEmpty';
 import ComparisonResults from '../ComparisonResults';
 
index a855c7917078a3950c608327b19f1d0893f9399b..782747c04512540e1dd34e91e626cbe086cedcec 100644 (file)
@@ -19,6 +19,7 @@
  */
 import * as React from 'react';
 import { getQualityProfileExporterUrl } from '../../../api/quality-profiles';
+import Link from '../../../components/common/Link';
 import { Alert } from '../../../components/ui/Alert';
 import { translate } from '../../../helpers/l10n';
 import { getBaseUrl } from '../../../helpers/system';
@@ -56,9 +57,9 @@ export default class ProfileExporters extends React.PureComponent<Props> {
                 className={index > 0 ? 'spacer-top' : undefined}
                 data-key={exporter.key}
                 key={exporter.key}>
-                <a href={this.getExportUrl(exporter)} rel="noopener noreferrer" target="_blank">
+                <Link to={this.getExportUrl(exporter)} target="_blank">
                   {exporter.name}
-                </a>
+                </Link>
               </li>
             ))}
           </ul>
index 5e147feec6b63bbbba77230ae474110a46a8d04f..9fe78d963f79b99fb819e77238bcf0ddf4022f34 100644 (file)
@@ -18,7 +18,8 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import * as React from 'react';
-import { Link, NavLink } from 'react-router-dom';
+import { NavLink } from 'react-router-dom';
+import Link from '../../../components/common/Link';
 import Tooltip from '../../../components/controls/Tooltip';
 import DateFromNow from '../../../components/intl/DateFromNow';
 import { translate } from '../../../helpers/l10n';
index a5ad08c1fb64014d0bdadf71548a47d23258f0ba..bf9bc63f3f340de10f772c944dd90fccd2966874 100644 (file)
@@ -18,8 +18,8 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import * as React from 'react';
-import { Link } from 'react-router-dom';
 import { getProfileProjects } from '../../../api/quality-profiles';
+import Link from '../../../components/common/Link';
 import { Button } from '../../../components/controls/buttons';
 import ListFooter from '../../../components/controls/ListFooter';
 import Tooltip from '../../../components/controls/Tooltip';
index cd5113bf17c324692b3eff0055bd8145d506ea72..9e60f069a5beed654ac63137eaaeab3479711bdd 100644 (file)
@@ -19,9 +19,9 @@
  */
 import { keyBy } from 'lodash';
 import * as React from 'react';
-import { Link } from 'react-router-dom';
 import { getQualityProfile } from '../../../api/quality-profiles';
 import { searchRules, takeFacet } from '../../../api/rules';
+import Link from '../../../components/common/Link';
 import { Button } from '../../../components/controls/buttons';
 import Tooltip from '../../../components/controls/Tooltip';
 import { translate } from '../../../helpers/l10n';
index bde0c6a01f462efad6ea08e5b7058752545162e5..a146feeb17529593524e1d11dc693ac3e3a9b47f 100644 (file)
@@ -18,7 +18,7 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
 import HelpTooltip from '../../../components/controls/HelpTooltip';
 import { translate } from '../../../helpers/l10n';
 import { getDeprecatedActiveRulesUrl } from '../../../helpers/urls';
index 3f813408c04f426107ff7f70921d1cfabd3a7318..f4c69eaee6f33bf15e680f6706119ba4fccc067f 100644 (file)
@@ -18,7 +18,7 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
 import IssueTypeIcon from '../../../components/icons/IssueTypeIcon';
 import { translate } from '../../../helpers/l10n';
 import { formatMeasure } from '../../../helpers/measures';
index 621566422379134da40003a7037def02d60cb4d1..2d4c8911b9c086e7365f53d02b18e9f95ad0bd83 100644 (file)
@@ -18,7 +18,7 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
 import { translate } from '../../../helpers/l10n';
 import { formatMeasure } from '../../../helpers/measures';
 import { getRulesUrl } from '../../../helpers/urls';
index 94831180faa2943b307105164c1ce37622576840..ff96db6669ee65b6cafb3a72ac4fae9480de6cdf 100644 (file)
@@ -18,7 +18,7 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
 import HelpTooltip from '../../../components/controls/HelpTooltip';
 import { translate } from '../../../helpers/l10n';
 import { getRulesUrl } from '../../../helpers/urls';
index b225bede9e017469dbfffeb2ff4658e9a7f036cd..1f5eff13f09062093bf0ec7e5b03c4b35d251bce 100644 (file)
@@ -21,13 +21,12 @@ exports[`should render correctly 1`] = `
         data-key="exporter-key"
         key="exporter-key"
       >
-        <a
-          href="/api/qualityprofiles/export?exporterKey=exporter-key&language=js&qualityProfile=name"
-          rel="noopener noreferrer"
+        <ForwardRef(Link)
           target="_blank"
+          to="/api/qualityprofiles/export?exporterKey=exporter-key&language=js&qualityProfile=name"
         >
           exporter-name
-        </a>
+        </ForwardRef(Link)>
       </li>
     </ul>
   </div>
index 8b99596ac3852d1f3d86707153580f603af065eb..f181062d432e65caf3960361c63433688b47be35 100644 (file)
@@ -14,7 +14,7 @@ exports[`should render correctly 1`] = `
       quality_profiles.page
     </NavLink>
      / 
-    <Link
+    <ForwardRef(Link)
       to={
         Object {
           "pathname": "/profiles",
@@ -23,7 +23,7 @@ exports[`should render correctly 1`] = `
       }
     >
       JavaScript
-    </Link>
+    </ForwardRef(Link)>
   </div>
   <h1
     className="page-title"
@@ -63,7 +63,7 @@ exports[`should render correctly 1`] = `
         <DateFromNow />
       </li>
       <li>
-        <Link
+        <ForwardRef(Link)
           className="button"
           to={
             Object {
@@ -73,7 +73,7 @@ exports[`should render correctly 1`] = `
           }
         >
           changelog
-        </Link>
+        </ForwardRef(Link)>
       </li>
       <li>
         <withRouter(ProfileActions)
@@ -116,7 +116,7 @@ exports[`should render correctly: for default profile 1`] = `
       quality_profiles.page
     </NavLink>
      / 
-    <Link
+    <ForwardRef(Link)
       to={
         Object {
           "pathname": "/profiles",
@@ -125,7 +125,7 @@ exports[`should render correctly: for default profile 1`] = `
       }
     >
       JavaScript
-    </Link>
+    </ForwardRef(Link)>
   </div>
   <h1
     className="page-title"
@@ -174,7 +174,7 @@ exports[`should render correctly: for default profile 1`] = `
         <DateFromNow />
       </li>
       <li>
-        <Link
+        <ForwardRef(Link)
           className="button"
           to={
             Object {
@@ -184,7 +184,7 @@ exports[`should render correctly: for default profile 1`] = `
           }
         >
           changelog
-        </Link>
+        </ForwardRef(Link)>
       </li>
       <li>
         <withRouter(ProfileActions)
index cfb7b753c4699dcc299846cd2004715ff232cc09..860ed7074e86d9c98579adb42557835b8ce5854c 100644 (file)
@@ -35,7 +35,7 @@ exports[`should render correctly: default 1`] = `
         data-key="org.sonarsource.xml:xml"
         key="org.sonarsource.xml:xml"
       >
-        <Link
+        <ForwardRef(Link)
           to={
             Object {
               "pathname": "/dashboard",
@@ -50,7 +50,7 @@ exports[`should render correctly: default 1`] = `
           <span>
             SonarXML
           </span>
-        </Link>
+        </ForwardRef(Link)>
       </li>
     </ul>
     <ListFooter
@@ -134,7 +134,7 @@ exports[`should render correctly: no active rules, but associated projects 1`] =
         data-key="org.sonarsource.xml:xml"
         key="org.sonarsource.xml:xml"
       >
-        <Link
+        <ForwardRef(Link)
           to={
             Object {
               "pathname": "/dashboard",
@@ -149,7 +149,7 @@ exports[`should render correctly: no active rules, but associated projects 1`] =
           <span>
             SonarXML
           </span>
-        </Link>
+        </ForwardRef(Link)>
       </li>
     </ul>
     <ListFooter
@@ -218,7 +218,7 @@ exports[`should render correctly: no rights 1`] = `
         data-key="org.sonarsource.xml:xml"
         key="org.sonarsource.xml:xml"
       >
-        <Link
+        <ForwardRef(Link)
           to={
             Object {
               "pathname": "/dashboard",
@@ -233,7 +233,7 @@ exports[`should render correctly: no rights 1`] = `
           <span>
             SonarXML
           </span>
-        </Link>
+        </ForwardRef(Link)>
       </li>
     </ul>
     <ListFooter
index 2bfdc44d1311285d3c5d2a8a913ba099cce2b358..7e2cbee1080af44f88b748459b3fde4437d7df99 100644 (file)
@@ -72,7 +72,7 @@ exports[`should render the quality profiles rules with sonarway comparison 1`] =
 `;
 
 exports[`should show a button to activate more rules for admins 1`] = `
-<Link
+<ForwardRef(Link)
   className="button js-activate-rules"
   to={
     Object {
@@ -82,7 +82,7 @@ exports[`should show a button to activate more rules for admins 1`] = `
   }
 >
   quality_profiles.activate_more
-</Link>
+</ForwardRef(Link)>
 `;
 
 exports[`should show a deprecated rules warning message 1`] = `
index 9b9d0902b5ff2db39faa3299d4419af571625314..675f9dedb4fbfce5ce8c5438f7d08c7257298a41 100644 (file)
@@ -17,7 +17,7 @@ exports[`should render correctly 1`] = `
       overlay="quality_profiles.deprecated_rules_description"
     />
   </span>
-  <Link
+  <ForwardRef(Link)
     className="pull-right"
     to={
       Object {
@@ -27,6 +27,6 @@ exports[`should render correctly 1`] = `
     }
   >
     18
-  </Link>
+  </ForwardRef(Link)>
 </div>
 `;
index a1eb150e99613338128688b86b1be667edc907ff..5779c1a9925d303a2ab1be4ef16cfcf5162665cc 100644 (file)
@@ -14,7 +14,7 @@ exports[`should render correctly 1`] = `
   <td
     className="thin nowrap text-right"
   >
-    <Link
+    <ForwardRef(Link)
       to={
         Object {
           "pathname": "/coding_rules",
@@ -23,12 +23,12 @@ exports[`should render correctly 1`] = `
       }
     >
       3
-    </Link>
+    </ForwardRef(Link)>
   </td>
   <td
     className="thin nowrap text-right"
   >
-    <Link
+    <ForwardRef(Link)
       className="small"
       to={
         Object {
@@ -38,7 +38,7 @@ exports[`should render correctly 1`] = `
       }
     >
       7
-    </Link>
+    </ForwardRef(Link)>
   </td>
 </tr>
 `;
@@ -57,7 +57,7 @@ exports[`should render correctly if there is 0 rules 1`] = `
   <td
     className="thin nowrap text-right"
   >
-    <Link
+    <ForwardRef(Link)
       to={
         Object {
           "pathname": "/coding_rules",
@@ -66,7 +66,7 @@ exports[`should render correctly if there is 0 rules 1`] = `
       }
     >
       0
-    </Link>
+    </ForwardRef(Link)>
   </td>
   <td
     className="thin nowrap text-right"
@@ -94,7 +94,7 @@ exports[`should render correctly if there is missing data 1`] = `
   <td
     className="thin nowrap text-right"
   >
-    <Link
+    <ForwardRef(Link)
       to={
         Object {
           "pathname": "/coding_rules",
@@ -103,7 +103,7 @@ exports[`should render correctly if there is missing data 1`] = `
       }
     >
       5
-    </Link>
+    </ForwardRef(Link)>
   </td>
   <td
     className="thin nowrap text-right"
index 695b3fbe04487eca58213c189d56cd0ea0fcf9e8..64f405142ec55edef5d0d6fe823fe32a8b8e4214 100644 (file)
@@ -10,7 +10,7 @@ exports[`should render correctly 1`] = `
   <td
     className="thin nowrap text-right"
   >
-    <Link
+    <ForwardRef(Link)
       to={
         Object {
           "pathname": "/coding_rules",
@@ -21,12 +21,12 @@ exports[`should render correctly 1`] = `
       <strong>
         3
       </strong>
-    </Link>
+    </ForwardRef(Link)>
   </td>
   <td
     className="thin nowrap text-right"
   >
-    <Link
+    <ForwardRef(Link)
       className="small"
       to={
         Object {
@@ -38,7 +38,7 @@ exports[`should render correctly 1`] = `
       <strong>
         7
       </strong>
-    </Link>
+    </ForwardRef(Link)>
   </td>
 </tr>
 `;
@@ -53,7 +53,7 @@ exports[`should render correctly if there is 0 rules 1`] = `
   <td
     className="thin nowrap text-right"
   >
-    <Link
+    <ForwardRef(Link)
       to={
         Object {
           "pathname": "/coding_rules",
@@ -64,7 +64,7 @@ exports[`should render correctly if there is 0 rules 1`] = `
       <strong>
         0
       </strong>
-    </Link>
+    </ForwardRef(Link)>
   </td>
   <td
     className="thin nowrap text-right"
@@ -88,7 +88,7 @@ exports[`should render correctly if there is missing data 1`] = `
   <td
     className="thin nowrap text-right"
   >
-    <Link
+    <ForwardRef(Link)
       to={
         Object {
           "pathname": "/coding_rules",
@@ -99,7 +99,7 @@ exports[`should render correctly if there is missing data 1`] = `
       <strong>
         5
       </strong>
-    </Link>
+    </ForwardRef(Link)>
   </td>
   <td
     className="thin nowrap text-right"
index 83633732e7b8a2f660b296fdc6c467bce206a207..f388e66edbc6a4e8224e4e21fcb46e435296548e 100644 (file)
@@ -17,7 +17,7 @@ exports[`should render correctly 1`] = `
       overlay="quality_profiles.sonarway_missing_rules_description"
     />
   </span>
-  <Link
+  <ForwardRef(Link)
     className="pull-right"
     data-test="rules"
     to={
@@ -28,6 +28,6 @@ exports[`should render correctly 1`] = `
     }
   >
     158
-  </Link>
+  </ForwardRef(Link)>
 </div>
 `;
index 3c7ce567769e29de0c13438dc6f078902b69c401..74052a2e3f59e349bbc09ed0c7c3d404a81249e2 100644 (file)
@@ -19,7 +19,7 @@
  */
 import { sortBy } from 'lodash';
 import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
 import { translate, translateWithParameters } from '../../../helpers/l10n';
 import { getDeprecatedActiveRulesUrl } from '../../../helpers/urls';
 import ProfileLink from '../components/ProfileLink';
index 155543ad1b0773a08840bd3a01e64f15fae97344..0d7c300fdcec47c55827010ab706918cc067bd48 100644 (file)
@@ -19,8 +19,8 @@
  */
 import { sortBy } from 'lodash';
 import * as React from 'react';
-import { Link } from 'react-router-dom';
 import { searchRules } from '../../../api/rules';
+import Link from '../../../components/common/Link';
 import { toShortNotSoISOString } from '../../../helpers/dates';
 import { translate, translateWithParameters } from '../../../helpers/l10n';
 import { formatMeasure } from '../../../helpers/measures';
index 006b70a34902d9c4545c204066656e46413ca81c..0280b5b11d20a0ba5ef37bcbea82d982cb0d0bfd 100644 (file)
@@ -18,8 +18,8 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import * as React from 'react';
-import { Link } from 'react-router-dom';
 import { Actions } from '../../../api/quality-profiles';
+import Link from '../../../components/common/Link';
 import { Button } from '../../../components/controls/buttons';
 import { Location, Router, withRouter } from '../../../components/hoc/withRouter';
 import { Alert } from '../../../components/ui/Alert';
index 72408e1905e2e47fb1f294237c71c4777de3fd9d..094bc9ef4b878cc27a2bfbec47eda509aee035c5 100644 (file)
@@ -18,7 +18,7 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
 import Tooltip from '../../../components/controls/Tooltip';
 import DateFromNow from '../../../components/intl/DateFromNow';
 import { translate } from '../../../helpers/l10n';
index 9166e4285ddf945791f94430266168145de91782..2aa055dd0091b39d4a4eccb64e4214982bbd9453 100644 (file)
@@ -36,7 +36,7 @@ exports[`should render correctly 1`] = `
       >
         JavaScript
         , 
-        <Link
+        <ForwardRef(Link)
           className="link-no-underline"
           to={
             Object {
@@ -46,7 +46,7 @@ exports[`should render correctly 1`] = `
           }
         >
           quality_profile.x_rules.4
-        </Link>
+        </ForwardRef(Link)>
         <div
           className="muted"
           key="qp-2"
@@ -82,7 +82,7 @@ exports[`should render correctly 1`] = `
       >
         JavaScript
         , 
-        <Link
+        <ForwardRef(Link)
           className="link-no-underline"
           to={
             Object {
@@ -92,7 +92,7 @@ exports[`should render correctly 1`] = `
           }
         >
           quality_profile.x_rules.3
-        </Link>
+        </ForwardRef(Link)>
         <div
           className="muted"
           key="qp-2"
@@ -121,7 +121,7 @@ exports[`should render correctly 1`] = `
       >
         JavaScript
         , 
-        <Link
+        <ForwardRef(Link)
           className="link-no-underline"
           to={
             Object {
@@ -131,7 +131,7 @@ exports[`should render correctly 1`] = `
           }
         >
           quality_profile.x_rules.2
-        </Link>
+        </ForwardRef(Link)>
       </div>
     </li>
     <li
@@ -153,7 +153,7 @@ exports[`should render correctly 1`] = `
       >
         JavaScript
         , 
-        <Link
+        <ForwardRef(Link)
           className="link-no-underline"
           to={
             Object {
@@ -163,7 +163,7 @@ exports[`should render correctly 1`] = `
           }
         >
           quality_profile.x_rules.2
-        </Link>
+        </ForwardRef(Link)>
         <div
           className="muted"
           key="qp-2"
index 4cabe302e26df51ff6ba9a4491f050e9f34f6681..b56ff86f8370f03d25075be054eba90fb05a181e 100644 (file)
@@ -15,7 +15,7 @@ exports[`should render correctly 1`] = `
     quality_profiles.intro1
     <br />
     quality_profiles.intro2
-    <Link
+    <ForwardRef(Link)
       className="spacer-left"
       target="_blank"
       to={
@@ -25,7 +25,7 @@ exports[`should render correctly 1`] = `
       }
     >
       learn_more
-    </Link>
+    </ForwardRef(Link)>
   </div>
 </header>
 `;
@@ -63,7 +63,7 @@ exports[`should render correctly 2`] = `
     quality_profiles.intro1
     <br />
     quality_profiles.intro2
-    <Link
+    <ForwardRef(Link)
       className="spacer-left"
       target="_blank"
       to={
@@ -73,7 +73,7 @@ exports[`should render correctly 2`] = `
       }
     >
       learn_more
-    </Link>
+    </ForwardRef(Link)>
   </div>
 </header>
 `;
@@ -117,7 +117,7 @@ exports[`should render correctly 3`] = `
     quality_profiles.intro1
     <br />
     quality_profiles.intro2
-    <Link
+    <ForwardRef(Link)
       className="spacer-left"
       target="_blank"
       to={
@@ -127,7 +127,7 @@ exports[`should render correctly 3`] = `
       }
     >
       learn_more
-    </Link>
+    </ForwardRef(Link)>
   </div>
 </header>
 `;
@@ -165,7 +165,7 @@ exports[`should show a create form 1`] = `
     quality_profiles.intro1
     <br />
     quality_profiles.intro2
-    <Link
+    <ForwardRef(Link)
       className="spacer-left"
       target="_blank"
       to={
@@ -175,7 +175,7 @@ exports[`should show a create form 1`] = `
       }
     >
       learn_more
-    </Link>
+    </ForwardRef(Link)>
   </div>
   <CreateProfileForm
     languages={
@@ -253,7 +253,7 @@ exports[`should show a restore form 1`] = `
     quality_profiles.intro1
     <br />
     quality_profiles.intro2
-    <Link
+    <ForwardRef(Link)
       className="spacer-left"
       target="_blank"
       to={
@@ -263,7 +263,7 @@ exports[`should show a restore form 1`] = `
       }
     >
       learn_more
-    </Link>
+    </ForwardRef(Link)>
   </div>
   <RestoreProfileForm
     onClose={[Function]}
index 85d7ef07a136ef434c9968a72fca5086c4f7bf29..90c5fc4af4e2e20c260b81002cfee6a1ff1c02d0 100644 (file)
@@ -47,7 +47,7 @@ exports[`should render correctly: built-in profile 1`] = `
         <Tooltip
           overlay="quality_profiles.deprecated_rules"
         >
-          <Link
+          <ForwardRef(Link)
             className="badge badge-error"
             to={
               Object {
@@ -57,10 +57,10 @@ exports[`should render correctly: built-in profile 1`] = `
             }
           >
             2
-          </Link>
+          </ForwardRef(Link)>
         </Tooltip>
       </span>
-      <Link
+      <ForwardRef(Link)
         to={
           Object {
             "pathname": "/coding_rules",
@@ -69,7 +69,7 @@ exports[`should render correctly: built-in profile 1`] = `
         }
       >
         10
-      </Link>
+      </ForwardRef(Link)>
     </div>
   </td>
   <td
@@ -146,7 +146,7 @@ exports[`should render correctly: default 1`] = `
     className="quality-profiles-table-rules thin nowrap text-middle text-right"
   >
     <div>
-      <Link
+      <ForwardRef(Link)
         to={
           Object {
             "pathname": "/coding_rules",
@@ -155,7 +155,7 @@ exports[`should render correctly: default 1`] = `
         }
       >
         10
-      </Link>
+      </ForwardRef(Link)>
     </div>
   </td>
   <td
@@ -244,7 +244,7 @@ exports[`should render correctly: default profile 1`] = `
         <Tooltip
           overlay="quality_profiles.deprecated_rules"
         >
-          <Link
+          <ForwardRef(Link)
             className="badge badge-error"
             to={
               Object {
@@ -254,10 +254,10 @@ exports[`should render correctly: default profile 1`] = `
             }
           >
             2
-          </Link>
+          </ForwardRef(Link)>
         </Tooltip>
       </span>
-      <Link
+      <ForwardRef(Link)
         to={
           Object {
             "pathname": "/coding_rules",
@@ -266,7 +266,7 @@ exports[`should render correctly: default profile 1`] = `
         }
       >
         10
-      </Link>
+      </ForwardRef(Link)>
     </div>
   </td>
   <td
@@ -349,7 +349,7 @@ exports[`should render correctly: with deprecated rules 1`] = `
         <Tooltip
           overlay="quality_profiles.deprecated_rules"
         >
-          <Link
+          <ForwardRef(Link)
             className="badge badge-error"
             to={
               Object {
@@ -359,10 +359,10 @@ exports[`should render correctly: with deprecated rules 1`] = `
             }
           >
             10
-          </Link>
+          </ForwardRef(Link)>
         </Tooltip>
       </span>
-      <Link
+      <ForwardRef(Link)
         to={
           Object {
             "pathname": "/coding_rules",
@@ -371,7 +371,7 @@ exports[`should render correctly: with deprecated rules 1`] = `
         }
       >
         10
-      </Link>
+      </ForwardRef(Link)>
     </div>
   </td>
   <td
index 92c6afdd267f42b39cc02306849e0f05a06c1696..05096cc74a48b4ea62ba36155b5a7d9d736a8b28 100644 (file)
@@ -18,7 +18,7 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
 import { translate } from '../../../helpers/l10n';
 import { getBaseUrl } from '../../../helpers/system';
 
index 7dd943896f60bec6b83ec49292ed271fb97ddc15..d9402440b4cea9186af719b505ec756cede585fd 100644 (file)
@@ -19,7 +19,7 @@
  */
 
 import React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
 import { translate } from '../../../helpers/l10n';
 import { getRuleUrl } from '../../../helpers/urls';
 import { Hotspot, HotspotStatusOption } from '../../../types/security-hotspots';
index 5ca002b074fd351518e8963c0a184bb81389411b..440d4a6e8ae3d6f2d5c7017815ec0652894dc1b7 100644 (file)
@@ -20,7 +20,7 @@ exports[`should render correctly 1`] = `
   >
     hotspots.no_hotspots.description
   </div>
-  <Link
+  <ForwardRef(Link)
     className="big-spacer-top"
     target="_blank"
     to={
@@ -30,7 +30,7 @@ exports[`should render correctly 1`] = `
     }
   >
     hotspots.learn_more
-  </Link>
+  </ForwardRef(Link)>
 </div>
 `;
 
@@ -54,7 +54,7 @@ exports[`should render correctly: file 1`] = `
   >
     hotspots.no_hotspots_for_file.description
   </div>
-  <Link
+  <ForwardRef(Link)
     className="big-spacer-top"
     target="_blank"
     to={
@@ -64,7 +64,7 @@ exports[`should render correctly: file 1`] = `
     }
   >
     hotspots.learn_more
-  </Link>
+  </ForwardRef(Link)>
 </div>
 `;
 
index e261772684f3011f547ae30b39f30472c36b969e..a5d2957ac548bdd7c330460ed4ae283329acd5a0 100644 (file)
@@ -20,7 +20,7 @@ exports[`should render correctly 1`] = `
       >
         That rule
       </span>
-      <Link
+      <ForwardRef(Link)
         className="small"
         target="_blank"
         to={
@@ -31,7 +31,7 @@ exports[`should render correctly 1`] = `
         }
       >
         squid:S2077
-      </Link>
+      </ForwardRef(Link)>
     </div>
   </div>
   <div
index c395c1f80d0b384f70be7c104d47708c47100f98..ee96583d8239d74836de46f79329a55b4880c280 100644 (file)
@@ -18,6 +18,7 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import * as React from 'react';
+import Link from '../../../components/common/Link';
 import { ButtonLink, SubmitButton } from '../../../components/controls/buttons';
 import DeferredSpinner from '../../../components/ui/DeferredSpinner';
 import { translate } from '../../../helpers/l10n';
@@ -124,9 +125,9 @@ export default class LoginForm extends React.PureComponent<Props, State> {
             <SubmitButton disabled={this.state.loading}>
               {translate('sessions.log_in')}
             </SubmitButton>
-            <a className="spacer-left" href={`${getBaseUrl()}/`}>
+            <Link className="spacer-left" to={`${getBaseUrl()}/`}>
               {translate('cancel')}
-            </a>
+            </Link>
           </div>
         </div>
       </form>
index 704944e48fd0da713cd9f464f543a50213e249b2..df989d43cf92d8beccb5cd6843f77c219b58c9e0 100644 (file)
@@ -18,6 +18,7 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import * as React from 'react';
+import Link from '../../../components/common/Link';
 import { getCookie } from '../../../helpers/cookies';
 import { translate } from '../../../helpers/l10n';
 import { getBaseUrl } from '../../../helpers/system';
@@ -37,7 +38,7 @@ export default function Unauthorized() {
           )}
 
           <div className="big-spacer-top">
-            <a href={getBaseUrl() + '/'}>{translate('layout.home')}</a>
+            <Link to={getBaseUrl() + '/'}>{translate('layout.home')}</Link>
           </div>
         </div>
       </div>
index 3d97ba42e31096953165a9c4e889d4ac27a5f187..10720b42939862e94a8ac4add7f87b2659f4e3e3 100644 (file)
@@ -74,12 +74,12 @@ exports[`expands more options 2`] = `
       >
         sessions.log_in
       </SubmitButton>
-      <a
+      <ForwardRef(Link)
         className="spacer-left"
-        href="/"
+        to="/"
       >
         cancel
-      </a>
+      </ForwardRef(Link)>
     </div>
   </div>
 </form>
@@ -145,12 +145,12 @@ exports[`logs in with simple credentials 1`] = `
       >
         sessions.log_in
       </SubmitButton>
-      <a
+      <ForwardRef(Link)
         className="spacer-left"
-        href="/"
+        to="/"
       >
         cancel
-      </a>
+      </ForwardRef(Link)>
     </div>
   </div>
 </form>
@@ -216,12 +216,12 @@ exports[`should display a spinner and disabled button while loading 1`] = `
       >
         sessions.log_in
       </SubmitButton>
-      <a
+      <ForwardRef(Link)
         className="spacer-left"
-        href="/"
+        to="/"
       >
         cancel
-      </a>
+      </ForwardRef(Link)>
     </div>
   </div>
 </form>
index 5c538ff3ad3fe8e6a3cdbca2e21381f1472bd73b..2e4e329391bd680b6eb02eac34ed6b7c2b50fe0a 100644 (file)
@@ -27,11 +27,11 @@ exports[`render 1`] = `
       <div
         className="big-spacer-top"
       >
-        <a
-          href="/"
+        <ForwardRef(Link)
+          to="/"
         >
           layout.home
-        </a>
+        </ForwardRef(Link)>
       </div>
     </div>
   </div>
index 0fc1f42e352540881a9d06d5ac9e6523e4f71e23..0421c0a8528f6ecea1e365b8cbe5c32aa7bd1f10 100644 (file)
@@ -18,7 +18,7 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
 import { translate } from '../../../helpers/l10n';
 import { AdditionalCategoryComponentProps } from './AdditionalCategories';
 import CategoryDefinitionsList from './CategoryDefinitionsList';
index 22068cf074bb4fe4a90a79986a6224a6a8c44429..1fc628761ea59aec71025e2e5d48fe4f153d717f 100644 (file)
@@ -19,8 +19,8 @@
  */
 import * as React from 'react';
 import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
 import { getNewCodePeriod, setNewCodePeriod } from '../../../api/newCodePeriod';
+import Link from '../../../components/common/Link';
 import { ResetButtonLink, SubmitButton } from '../../../components/controls/buttons';
 import AlertSuccessIcon from '../../../components/icons/AlertSuccessIcon';
 import DeferredSpinner from '../../../components/ui/DeferredSpinner';
index fa9dac8fb3820dc38faee16ef010508fd1f76a29..ffe222aee7dcfe91428b1f7144b983c4df16362c 100644 (file)
@@ -19,7 +19,7 @@
  */
 import classNames from 'classnames';
 import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
 import { DropdownOverlay } from '../../../components/controls/Dropdown';
 import OutsideClickHandler from '../../../components/controls/OutsideClickHandler';
 import SearchBox from '../../../components/controls/SearchBox';
index 7fccfe01e2f3fa5d3ec588f293a4aa10b13f45bf..8f3c70f574022dcc35abca9975527a24a3e55ec1 100644 (file)
@@ -6,12 +6,12 @@ exports[`should render correctly 1`] = `
     className="spacer-bottom"
   >
     settings.analysis_scope.wildcards.introduction
-    <Link
+    <ForwardRef(Link)
       className="spacer-left"
       to="/documentation/project-administration/narrowing-the-focus/"
     >
       learn_more
-    </Link>
+    </ForwardRef(Link)>
   </p>
   <table
     className="data spacer-bottom"
index d5aaaf819a75abbe68d1ba1ac1293eee19ffbadb..80f68b5aa3e8c3c3e9aab8f0e24c07fdded2566e 100644 (file)
@@ -29,11 +29,11 @@ exports[`should render correctly 1`] = `
                 id="settings.new_code_period.description"
                 values={
                   Object {
-                    "link": <Link
+                    "link": <ForwardRef(Link)
                       to="/documentation/project-administration/new-code-period/"
                     >
                       learn_more
-                    </Link>,
+                    </ForwardRef(Link)>,
                   }
                 }
               />
index 334d84a3098f8373f6e675f6bba375681f89b785..5ef2dff598001b65484ddc27d86c6425abdbf797 100644 (file)
@@ -73,7 +73,7 @@ exports[`should render correctly when open: results 1`] = `
           className="spacer-bottom spacer-top"
           key="foo"
         >
-          <Link
+          <ForwardRef(Link)
             onClick={[MockFunction]}
             onMouseEnter={[Function]}
             to={
@@ -96,13 +96,13 @@ exports[`should render correctly when open: results 1`] = `
             >
               settings.key_x.foo
             </div>
-          </Link>
+          </ForwardRef(Link)>
         </li>
         <li
           className="spacer-bottom spacer-top active"
           key="bar"
         >
-          <Link
+          <ForwardRef(Link)
             onClick={[MockFunction]}
             onMouseEnter={[Function]}
             to={
@@ -125,7 +125,7 @@ exports[`should render correctly when open: results 1`] = `
             >
               settings.key_x.bar
             </div>
-          </Link>
+          </ForwardRef(Link)>
         </li>
       </ul>
     </DropdownOverlay>
index 1e5cd961d7d7adc1b95118f2f4c9891b72d9cb8d..e13e9a0a94647d8fe4ae200b827a360ebd7b3e50 100644 (file)
@@ -19,7 +19,7 @@
  */
 import * as React from 'react';
 import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
+import Link from '../../../../components/common/Link';
 import { Button } from '../../../../components/controls/buttons';
 import HelpTooltip from '../../../../components/controls/HelpTooltip';
 import Tooltip from '../../../../components/controls/Tooltip';
index 0fdefb5e2dcf16729a14095e9cf45438f094daed..be83d609cbe1504ec82937a38477c1612fa26126 100644 (file)
@@ -19,7 +19,7 @@
  */
 import * as React from 'react';
 import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
+import Link from '../../../../components/common/Link';
 import { ButtonLink } from '../../../../components/controls/buttons';
 import ValidationInput, {
   ValidationInputErrorPlacement
index 9405d10f639f6786903fc71c29a76195d740c130..102dead85c2332a98526281e6560cca4f68ed3f0 100644 (file)
@@ -19,7 +19,7 @@
  */
 import * as React from 'react';
 import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
+import Link from '../../../../components/common/Link';
 import { Button } from '../../../../components/controls/buttons';
 import { Alert } from '../../../../components/ui/Alert';
 import DeferredSpinner from '../../../../components/ui/DeferredSpinner';
index 3751017ab6ac09534f9655631140ddb0a3fa982b..8cee4e30d84f87718e66ed1f92e188163448c4f5 100644 (file)
@@ -19,7 +19,7 @@
  */
 import * as React from 'react';
 import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
+import Link from '../../../../components/common/Link';
 import { ALM_DOCUMENTATION_PATHS } from '../../../../helpers/constants';
 import { translate } from '../../../../helpers/l10n';
 import { AlmKeys, AzureBindingDefinition } from '../../../../types/alm-settings';
@@ -72,12 +72,11 @@ export default function AzureForm(props: AzureFormProps) {
             id="settings.almintegration.form.personal_access_token.azure.help"
             values={{
               pat: (
-                <a
-                  href="https://docs.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate"
-                  rel="noopener noreferrer"
+                <Link
+                  to="https://docs.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate"
                   target="_blank">
                   {translate('settings.almintegration.form.personal_access_token.azure.help.url')}
-                </a>
+                </Link>
               ),
               permission: <strong>{'Code > Read & Write'}</strong>,
               doc_link: (
index e281ea2f1675842544e17ee9a0c90e72e5bbb076..075775bc4c0d14127a816a32df3ed0e3a23bf333 100644 (file)
@@ -19,7 +19,7 @@
  */
 import * as React from 'react';
 import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
+import Link from '../../../../components/common/Link';
 import { Alert } from '../../../../components/ui/Alert';
 import { ALM_DOCUMENTATION_PATHS } from '../../../../helpers/constants';
 import { translate } from '../../../../helpers/l10n';
@@ -83,12 +83,11 @@ export default function BitbucketCloudForm(props: BitbucketCloudFormProps) {
           id="settings.almintegration.bitbucketcloud.info"
           values={{
             oauth: (
-              <a
-                href="https://support.atlassian.com/bitbucket-cloud/docs/use-oauth-on-bitbucket-cloud/"
-                rel="noopener noreferrer"
+              <Link
+                to="https://support.atlassian.com/bitbucket-cloud/docs/use-oauth-on-bitbucket-cloud/"
                 target="_blank">
                 {translate('settings.almintegration.bitbucketcloud.oauth')}
-              </a>
+              </Link>
             ),
             permission: <strong>Pull Requests: Read</strong>,
             doc_link: (
index cf472ab7740d14285a6be560281fa825cd79a653..2920a0d03d640bad6276a9fc39873d7b9ce8dd49 100644 (file)
@@ -19,7 +19,7 @@
  */
 import * as React from 'react';
 import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
+import Link from '../../../../components/common/Link';
 import { ALM_DOCUMENTATION_PATHS } from '../../../../helpers/constants';
 import { translate } from '../../../../helpers/l10n';
 import { AlmKeys, BitbucketServerBindingDefinition } from '../../../../types/alm-settings';
@@ -68,14 +68,13 @@ export default function BitbucketServerForm(props: BitbucketServerFormProps) {
             id="settings.almintegration.form.personal_access_token.bitbucket.help"
             values={{
               pat: (
-                <a
-                  href="https://confluence.atlassian.com/bitbucketserver0515/personal-access-tokens-961275199.html"
-                  rel="noopener noreferrer"
+                <Link
+                  to="https://confluence.atlassian.com/bitbucketserver0515/personal-access-tokens-961275199.html"
                   target="_blank">
                   {translate(
                     'settings.almintegration.form.personal_access_token.bitbucket.help.url'
                   )}
-                </a>
+                </Link>
               ),
               permission: <strong>Read</strong>,
               doc_link: (
index 4aacacfba9d19672da795d6b6a847e75373aff05..73b4f4e070eaa41721c1dcfdb5e867671c6dbb6e 100644 (file)
@@ -19,7 +19,7 @@
  */
 import * as React from 'react';
 import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
+import Link from '../../../../components/common/Link';
 import { Alert } from '../../../../components/ui/Alert';
 import { ALM_DOCUMENTATION_PATHS } from '../../../../helpers/constants';
 import { translate } from '../../../../helpers/l10n';
index ac2ab98c35d9e60be5448f924c78195994429a84..e0e8f4b5b11a4de53b9e5b390be62a0ed9c5791f 100644 (file)
@@ -19,7 +19,7 @@
  */
 import * as React from 'react';
 import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
+import Link from '../../../../components/common/Link';
 import { ALM_DOCUMENTATION_PATHS } from '../../../../helpers/constants';
 import { translate } from '../../../../helpers/l10n';
 import { AlmKeys, GitlabBindingDefinition } from '../../../../types/alm-settings';
@@ -67,12 +67,11 @@ export default function GitlabForm(props: GitlabFormProps) {
             id="settings.almintegration.form.personal_access_token.gitlab.help"
             values={{
               pat: (
-                <a
-                  href="https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html"
-                  rel="noopener noreferrer"
+                <Link
+                  to="https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html"
                   target="_blank">
                   {translate('settings.almintegration.form.personal_access_token.gitlab.help.url')}
-                </a>
+                </Link>
               ),
               permission: <strong>Reporter</strong>,
               scope: <strong>api</strong>,
index 6ea758b9ec2514388ee83ed605e3c4d4948166bb..188b67245c74cebda03a8a0dae1a2fb6079b3719 100644 (file)
@@ -522,12 +522,12 @@ exports[`should render correctly: success with alert 1`] = `
         id="settings.almintegration.github.additional_permission"
         values={
           Object {
-            "link": <Link
+            "link": <ForwardRef(Link)
               target="_blank"
               to="/documentation/analysis/github-integration/"
             >
               learn_more
-            </Link>,
+            </ForwardRef(Link)>,
           }
         }
       />
@@ -649,12 +649,12 @@ exports[`should render correctly: success with branches disabled 1`] = `
         id="settings.almintegration.github.additional_permission"
         values={
           Object {
-            "link": <Link
+            "link": <ForwardRef(Link)
               target="_blank"
               to="/documentation/analysis/github-integration/"
             >
               learn_more
-            </Link>,
+            </ForwardRef(Link)>,
           }
         }
       />
index 0b37d9683d22da3cb65ad9ed2ec8c21d025d58e1..8928255a0de997b4004c2c65d5b2e1c6819799e0 100644 (file)
@@ -81,7 +81,7 @@ exports[`should render correctly: encryptable 1`] = `
         id="settings.almintegration.form.secret.can_encrypt"
         values={
           Object {
-            "learn_more": <Link
+            "learn_more": <ForwardRef(Link)
               target="_blank"
               to={
                 Object {
@@ -90,7 +90,7 @@ exports[`should render correctly: encryptable 1`] = `
               }
             >
               learn_more
-            </Link>,
+            </ForwardRef(Link)>,
           }
         }
       />
index 5061a09cc58e3907905d6a723e11311b0aa6f30d..f6ea40b3c1c7fa17920041418bff2680a1bcc637 100644 (file)
@@ -548,7 +548,7 @@ exports[`should render correctly with validation: pass the correct key for bitbu
       id="settings.almintegration.tabs.authentication-moved"
       values={
         Object {
-          "link": <Link
+          "link": <ForwardRef(Link)
             to={
               Object {
                 "pathname": "/admin/settings",
@@ -557,7 +557,7 @@ exports[`should render correctly with validation: pass the correct key for bitbu
             }
           >
             property.category.authentication
-          </Link>,
+          </ForwardRef(Link)>,
         }
       }
     />
index cade0289c9e56880a9950ff28898fefdd3e4176f..fb5e0271cef5f231aea3dbba3559207f2a745be2 100644 (file)
@@ -41,19 +41,18 @@ exports[`should render correctly: create 1`] = `
         id="settings.almintegration.form.personal_access_token.azure.help"
         values={
           Object {
-            "doc_link": <Link
+            "doc_link": <ForwardRef(Link)
               target="_blank"
               to="/documentation/analysis/azuredevops-integration/"
             >
               learn_more
-            </Link>,
-            "pat": <a
-              href="https://docs.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate"
-              rel="noopener noreferrer"
+            </ForwardRef(Link)>,
+            "pat": <ForwardRef(Link)
               target="_blank"
+              to="https://docs.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate"
             >
               settings.almintegration.form.personal_access_token.azure.help.url
-            </a>,
+            </ForwardRef(Link)>,
             "permission": <strong>
               Code &gt; Read & Write
             </strong>,
@@ -114,19 +113,18 @@ exports[`should render correctly: edit 1`] = `
         id="settings.almintegration.form.personal_access_token.azure.help"
         values={
           Object {
-            "doc_link": <Link
+            "doc_link": <ForwardRef(Link)
               target="_blank"
               to="/documentation/analysis/azuredevops-integration/"
             >
               learn_more
-            </Link>,
-            "pat": <a
-              href="https://docs.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate"
-              rel="noopener noreferrer"
+            </ForwardRef(Link)>,
+            "pat": <ForwardRef(Link)
               target="_blank"
+              to="https://docs.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate"
             >
               settings.almintegration.form.personal_access_token.azure.help.url
-            </a>,
+            </ForwardRef(Link)>,
             "permission": <strong>
               Code &gt; Read & Write
             </strong>,
index 9d990ce41b2ddac1f96684fad506272e585dfa73..62a4d83d38f28f9bbf63c14917fc14f18cd12b29 100644 (file)
@@ -45,19 +45,18 @@ exports[`should render correctly: default 1`] = `
       id="settings.almintegration.bitbucketcloud.info"
       values={
         Object {
-          "doc_link": <Link
+          "doc_link": <ForwardRef(Link)
             target="_blank"
             to="/documentation/analysis/bitbucket-cloud-integration/"
           >
             learn_more
-          </Link>,
-          "oauth": <a
-            href="https://support.atlassian.com/bitbucket-cloud/docs/use-oauth-on-bitbucket-cloud/"
-            rel="noopener noreferrer"
+          </ForwardRef(Link)>,
+          "oauth": <ForwardRef(Link)
             target="_blank"
+            to="https://support.atlassian.com/bitbucket-cloud/docs/use-oauth-on-bitbucket-cloud/"
           >
             settings.almintegration.bitbucketcloud.oauth
-          </a>,
+          </ForwardRef(Link)>,
           "permission": <strong>
             Pull Requests: Read
           </strong>,
@@ -132,19 +131,18 @@ exports[`should render correctly: invalid workspace ID 1`] = `
       id="settings.almintegration.bitbucketcloud.info"
       values={
         Object {
-          "doc_link": <Link
+          "doc_link": <ForwardRef(Link)
             target="_blank"
             to="/documentation/analysis/bitbucket-cloud-integration/"
           >
             learn_more
-          </Link>,
-          "oauth": <a
-            href="https://support.atlassian.com/bitbucket-cloud/docs/use-oauth-on-bitbucket-cloud/"
-            rel="noopener noreferrer"
+          </ForwardRef(Link)>,
+          "oauth": <ForwardRef(Link)
             target="_blank"
+            to="https://support.atlassian.com/bitbucket-cloud/docs/use-oauth-on-bitbucket-cloud/"
           >
             settings.almintegration.bitbucketcloud.oauth
-          </a>,
+          </ForwardRef(Link)>,
           "permission": <strong>
             Pull Requests: Read
           </strong>,
index ff7ec2649b4e7e12090454025305f02231f087c6..f428bc72620298100c48bc8f543df7486ab6686d 100644 (file)
@@ -36,19 +36,18 @@ exports[`should render correctly 1`] = `
         id="settings.almintegration.form.personal_access_token.bitbucket.help"
         values={
           Object {
-            "doc_link": <Link
+            "doc_link": <ForwardRef(Link)
               target="_blank"
               to="/documentation/analysis/bitbucket-integration/"
             >
               learn_more
-            </Link>,
-            "pat": <a
-              href="https://confluence.atlassian.com/bitbucketserver0515/personal-access-tokens-961275199.html"
-              rel="noopener noreferrer"
+            </ForwardRef(Link)>,
+            "pat": <ForwardRef(Link)
               target="_blank"
+              to="https://confluence.atlassian.com/bitbucketserver0515/personal-access-tokens-961275199.html"
             >
               settings.almintegration.form.personal_access_token.bitbucket.help.url
-            </a>,
+            </ForwardRef(Link)>,
             "permission": <strong>
               Read
             </strong>,
index 2945edf3857a33623512770b82a3606bceb3ebf4..dc5b1dc32fd2ea9f7f82eed0d7dbc453d8bff611 100644 (file)
@@ -43,12 +43,12 @@ exports[`should render correctly 1`] = `
       id="settings.almintegration.github.info"
       values={
         Object {
-          "link": <Link
+          "link": <ForwardRef(Link)
             target="_blank"
             to="/documentation/analysis/github-integration/"
           >
             learn_more
-          </Link>,
+          </ForwardRef(Link)>,
         }
       }
     />
@@ -136,12 +136,12 @@ exports[`should render correctly 2`] = `
       id="settings.almintegration.github.info"
       values={
         Object {
-          "link": <Link
+          "link": <ForwardRef(Link)
             target="_blank"
             to="/documentation/analysis/github-integration/"
           >
             learn_more
-          </Link>,
+          </ForwardRef(Link)>,
         }
       }
     />
index cec311aa194ae079a7657c6c6ed8d3dedaa6441c..3b034da6c5a2f68814135717554b6da147b85c84 100644 (file)
@@ -34,19 +34,18 @@ exports[`should render correctly 1`] = `
         id="settings.almintegration.form.personal_access_token.gitlab.help"
         values={
           Object {
-            "doc_link": <Link
+            "doc_link": <ForwardRef(Link)
               target="_blank"
               to="/documentation/analysis/gitlab-integration/"
             >
               learn_more
-            </Link>,
-            "pat": <a
-              href="https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html"
-              rel="noopener noreferrer"
+            </ForwardRef(Link)>,
+            "pat": <ForwardRef(Link)
               target="_blank"
+              to="https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html"
             >
               settings.almintegration.form.personal_access_token.gitlab.help.url
-            </a>,
+            </ForwardRef(Link)>,
             "permission": <strong>
               Reporter
             </strong>,
@@ -103,19 +102,18 @@ exports[`should render correctly 2`] = `
         id="settings.almintegration.form.personal_access_token.gitlab.help"
         values={
           Object {
-            "doc_link": <Link
+            "doc_link": <ForwardRef(Link)
               target="_blank"
               to="/documentation/analysis/gitlab-integration/"
             >
               learn_more
-            </Link>,
-            "pat": <a
-              href="https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html"
-              rel="noopener noreferrer"
+            </ForwardRef(Link)>,
+            "pat": <ForwardRef(Link)
               target="_blank"
+              to="https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html"
             >
               settings.almintegration.form.personal_access_token.gitlab.help.url
-            </a>,
+            </ForwardRef(Link)>,
             "permission": <strong>
               Reporter
             </strong>,
index e6bd3a16618258ee3e58966f6897827286437de6..1dc541cf5721a06117a7a4cae803eac8e39df947 100644 (file)
@@ -19,7 +19,8 @@
  */
 import * as React from 'react';
 import { FormattedMessage } from 'react-intl';
-import { Link, useSearchParams } from 'react-router-dom';
+import { useSearchParams } from 'react-router-dom';
+import Link from '../../../../components/common/Link';
 import ScreenPositionHelper from '../../../../components/common/ScreenPositionHelper';
 import BoxedTabs from '../../../../components/controls/BoxedTabs';
 import { Alert } from '../../../../components/ui/Alert';
index 29376b1af9f48273a8a86ae706a1eb420cceeb46..ad01fa26e18bf9b4bef1d5fd29f773311ebb2755 100644 (file)
  */
 import * as React from 'react';
 import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
 import withAvailableFeatures, {
   WithAvailableFeaturesProps
 } from '../../../../app/components/available-features/withAvailableFeatures';
+import Link from '../../../../components/common/Link';
 import Toggle from '../../../../components/controls/Toggle';
 import { Alert } from '../../../../components/ui/Alert';
 import MandatoryFieldMarker from '../../../../components/ui/MandatoryFieldMarker';
index cf65a0a9d5eaf3d58b749e7a27d1e7af7cc6d11c..ff4d0528a6d6d91ffa2866f97d0e3a8979f7b14f 100644 (file)
@@ -19,8 +19,8 @@
  */
 import * as React from 'react';
 import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
 import { components, OptionProps, SingleValueProps } from 'react-select';
+import Link from '../../../../components/common/Link';
 import { Button, SubmitButton } from '../../../../components/controls/buttons';
 import Select from '../../../../components/controls/Select';
 import AlertSuccessIcon from '../../../../components/icons/AlertSuccessIcon';
index 82c1f025f6561b3f0afa53ca82a19271f435f7c0..84d74c3840f33267936f983ee9fbe6c903e7fb28 100644 (file)
@@ -818,12 +818,12 @@ exports[`should render the monorepo field when the feature is supported 1`] = `
           id="settings.pr_decoration.binding.form.monorepo.help"
           values={
             Object {
-              "doc_link": <Link
+              "doc_link": <ForwardRef(Link)
                 target="_blank"
                 to="/documentation/analysis/azuredevops-integration/"
               >
                 learn_more
-              </Link>,
+              </ForwardRef(Link)>,
             }
           }
         />
index 4a1dbfb63b8f21cfd2822c072db3c4e452b0869b..8e6dce1629531dc7eac1261c17b1bd898188b4c9 100644 (file)
@@ -264,7 +264,7 @@ exports[`should render correctly: when there are configuration errors (admin use
           id="settings.pr_decoration.binding.check_configuration.failure.check_global_settings"
           values={
             Object {
-              "link": <Link
+              "link": <ForwardRef(Link)
                 to={
                   Object {
                     "pathname": "/admin/settings",
@@ -273,7 +273,7 @@ exports[`should render correctly: when there are configuration errors (admin use
                 }
               >
                 settings.pr_decoration.binding.check_configuration.failure.check_global_settings.link
-              </Link>,
+              </ForwardRef(Link)>,
             }
           }
         />
@@ -905,7 +905,7 @@ exports[`should render correctly: with no ALM instances (admin user) 1`] = `
       id="settings.pr_decoration.binding.no_bindings.admin"
       values={
         Object {
-          "link": <Link
+          "link": <ForwardRef(Link)
             to={
               Object {
                 "pathname": "/admin/settings",
@@ -914,7 +914,7 @@ exports[`should render correctly: with no ALM instances (admin user) 1`] = `
             }
           >
             settings.pr_decoration.binding.no_bindings.link
-          </Link>,
+          </ForwardRef(Link)>,
         }
       }
     />
index 381a843057b7a95c3bbabbb47709b4588a700ab9..af24bb91804a9ebca0879e3d5b18638b7e7ff447 100644 (file)
@@ -19,8 +19,8 @@
  */
 import * as React from 'react';
 import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
 import { encryptValue } from '../../../api/settings';
+import Link from '../../../components/common/Link';
 import { SubmitButton } from '../../../components/controls/buttons';
 import { ClipboardButton } from '../../../components/controls/clipboard';
 import DeferredSpinner from '../../../components/ui/DeferredSpinner';
index 6874d6563b73bc086d0d560b69febfcfa8554cf7..66c6ecfb3fd53cd8f45b1f45c7238f7e77c7ace8 100644 (file)
@@ -19,7 +19,7 @@
  */
 import * as React from 'react';
 import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
 import { SubmitButton } from '../../../components/controls/buttons';
 import { ClipboardButton } from '../../../components/controls/clipboard';
 import DeferredSpinner from '../../../components/ui/DeferredSpinner';
index c6af518e5fb516ac460627069582dfc93a7dce01..4f79df0e425e970231670ccf4d60784425350a47 100644 (file)
@@ -50,12 +50,12 @@ exports[`should render correctly 1`] = `
         id="encryption.form_note"
         values={
           Object {
-            "moreInformationLink": <Link
+            "moreInformationLink": <ForwardRef(Link)
               target="_blank"
               to="/documentation/instance-administration/security/"
             >
               more_information
-            </Link>,
+            </ForwardRef(Link)>,
           }
         }
       />
index 4eed71722b265fa96fbd84ab8e8d98dc0c6f6d70..6073e39503a59b59310f28c65087aec27c15a3c1 100644 (file)
@@ -16,12 +16,12 @@ exports[`should render correctly 1`] = `
         id="encryption.secret_key_description"
         values={
           Object {
-            "moreInformationLink": <Link
+            "moreInformationLink": <ForwardRef(Link)
               target="_blank"
               to="/documentation/instance-administration/security/"
             >
               more_information
-            </Link>,
+            </ForwardRef(Link)>,
           }
         }
       />
index 1b7cfafa7ff06686dc599c53a59f3ab1384a8c64..621a0a624b2b993424e6fc8d4e57617d07d160b8 100644 (file)
@@ -19,7 +19,7 @@
  */
 import classNames from 'classnames';
 import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
 import LinkIcon from '../../../components/icons/LinkIcon';
 import { translate, translateWithParameters } from '../../../helpers/l10n';
 import { queryToSearch } from '../../../helpers/urls';
index 8cf0c9623ff093fc37854a54f1219ba25925e4b3..997f5b3c05b9c11bacee3a3ba31bcbb45fe2d7ba 100644 (file)
@@ -19,7 +19,7 @@
  */
 import classNames from 'classnames';
 import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
 import { queryToSearch } from '../../../helpers/urls';
 import { WebApi } from '../../../types/types';
 import { actionsFilter, isDomainPathActive, Query, serializeQuery } from '../utils';
index b872548ae657bc14021085aa522a761721e751cb..ce56fd9101dc7a854b520b0ecdc961496631271f 100644 (file)
 import { maxBy } from 'lodash';
 import * as React from 'react';
 import { Helmet } from 'react-helmet-async';
-import { Link, Params, useParams } from 'react-router-dom';
+import { Params, useParams } from 'react-router-dom';
 import { fetchWebApi } from '../../../api/web-api';
 import A11ySkipTarget from '../../../components/a11y/A11ySkipTarget';
+import Link from '../../../components/common/Link';
 import ScreenPositionHelper from '../../../components/common/ScreenPositionHelper';
 import Suggestions from '../../../components/embed-docs-modal/Suggestions';
 import { Location, Router, withRouter } from '../../../components/hoc/withRouter';
index af905ee7f55a7055db9efe56003f5dea711b2990..c01b5c6181db77000315f92b663d47ba7335cb04 100644 (file)
@@ -97,7 +97,7 @@ exports[`should render correctly 1`] = `
   <header
     className="web-api-action-header boxed-group-header"
   >
-    <Link
+    <ForwardRef(Link)
       className="spacer-right link-no-underline"
       to={
         Object {
@@ -107,7 +107,7 @@ exports[`should render correctly 1`] = `
       }
     >
       <LinkIcon />
-    </Link>
+    </ForwardRef(Link)>
     <h3
       className="web-api-action-title"
     >
index 629742ef9188693ea8ad17904bc5d2a136a140d4..784c7812d74c2ad96ee0b4b47a25962a24065962 100644 (file)
@@ -7,7 +7,7 @@ exports[`should also render domains with an actions description matching the que
   <div
     className="list-group"
   >
-    <Link
+    <ForwardRef(Link)
       className="list-group-item"
       key="bar"
       to={
@@ -22,8 +22,8 @@ exports[`should also render domains with an actions description matching the que
       >
         bar
       </h3>
-    </Link>
-    <Link
+    </ForwardRef(Link)>
+    <ForwardRef(Link)
       className="list-group-item"
       key="baz"
       to={
@@ -38,7 +38,7 @@ exports[`should also render domains with an actions description matching the que
       >
         baz
       </h3>
-    </Link>
+    </ForwardRef(Link)>
   </div>
 </div>
 `;
@@ -50,7 +50,7 @@ exports[`should not render deprecated domains 1`] = `
   <div
     className="list-group"
   >
-    <Link
+    <ForwardRef(Link)
       className="list-group-item"
       key="foo"
       to={
@@ -65,7 +65,7 @@ exports[`should not render deprecated domains 1`] = `
       >
         foo
       </h3>
-    </Link>
+    </ForwardRef(Link)>
   </div>
 </div>
 `;
@@ -77,7 +77,7 @@ exports[`should not render internal domains 1`] = `
   <div
     className="list-group"
   >
-    <Link
+    <ForwardRef(Link)
       className="list-group-item"
       key="foo"
       to={
@@ -92,7 +92,7 @@ exports[`should not render internal domains 1`] = `
       >
         foo
       </h3>
-    </Link>
+    </ForwardRef(Link)>
   </div>
 </div>
 `;
@@ -104,7 +104,7 @@ exports[`should render deprecated domains 1`] = `
   <div
     className="list-group"
   >
-    <Link
+    <ForwardRef(Link)
       className="list-group-item"
       key="foo"
       to={
@@ -119,8 +119,8 @@ exports[`should render deprecated domains 1`] = `
       >
         foo
       </h3>
-    </Link>
-    <Link
+    </ForwardRef(Link)>
+    <ForwardRef(Link)
       className="list-group-item"
       key="bar"
       to={
@@ -138,7 +138,7 @@ exports[`should render deprecated domains 1`] = `
           since="5.0"
         />
       </h3>
-    </Link>
+    </ForwardRef(Link)>
   </div>
 </div>
 `;
@@ -150,7 +150,7 @@ exports[`should render internal domains 1`] = `
   <div
     className="list-group"
   >
-    <Link
+    <ForwardRef(Link)
       className="list-group-item"
       key="foo"
       to={
@@ -165,8 +165,8 @@ exports[`should render internal domains 1`] = `
       >
         foo
       </h3>
-    </Link>
-    <Link
+    </ForwardRef(Link)>
+    <ForwardRef(Link)
       className="list-group-item"
       key="bar"
       to={
@@ -182,7 +182,7 @@ exports[`should render internal domains 1`] = `
         bar
         <InternalBadge />
       </h3>
-    </Link>
+    </ForwardRef(Link)>
   </div>
 </div>
 `;
@@ -194,7 +194,7 @@ exports[`should render only domains with an action matching the query 1`] = `
   <div
     className="list-group"
   >
-    <Link
+    <ForwardRef(Link)
       className="list-group-item"
       key="foo"
       to={
@@ -209,7 +209,7 @@ exports[`should render only domains with an action matching the query 1`] = `
       >
         foo
       </h3>
-    </Link>
+    </ForwardRef(Link)>
   </div>
 </div>
 `;
index 1fc0062503f08b2180546e627d94a5e43c163ce2..7fea4a5eca37ba75977800187cc28ce8c040cd4c 100644 (file)
@@ -70,13 +70,13 @@ exports[`should render correctly 2`] = `
       <div
         className="web-api-page-header"
       >
-        <Link
+        <ForwardRef(Link)
           to="/web_api/"
         >
           <h1>
             api_documentation.page
           </h1>
-        </Link>
+        </ForwardRef(Link)>
       </div>
       <Search
         onSearch={[Function]}
index aa994d2db648b6a348cca5814c5d50ba25b0c9e1..e581653e527b1f5c55e3e37fb68b7a8c0dfa1d54 100644 (file)
@@ -19,7 +19,7 @@
  */
 import * as React from 'react';
 import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
 import { translate } from '../../../helpers/l10n';
 
 interface Props {
index 62a0abeeed9673f7c655a4ce3bfb2163abfa189c..b1cbc315ff3392b3f8176200292f7cade193f528 100644 (file)
@@ -21,11 +21,11 @@ exports[`should render correctly 1`] = `
       id="webhooks.description"
       values={
         Object {
-          "url": <Link
+          "url": <ForwardRef(Link)
             to="/documentation/project-administration/webhooks/"
           >
             webhooks.documentation_link
-          </Link>,
+          </ForwardRef(Link)>,
         }
       }
     />
index 7343f6a84208dd542cc51f0fd06718456f5a5377..eed5622d773cdf56e03ef57d6dc5dac5ede1207d 100644 (file)
@@ -18,7 +18,6 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import * as React from 'react';
-import { Link } from 'react-router-dom';
 import { ButtonIcon } from '../../components/controls/buttons';
 import { ClipboardIconButton } from '../../components/controls/clipboard';
 import Dropdown from '../../components/controls/Dropdown';
@@ -42,6 +41,7 @@ import {
 import { BranchLike } from '../../types/branch-like';
 import { ComponentQualifier } from '../../types/component';
 import { IssueType, Measure, SourceViewerFile } from '../../types/types';
+import Link from '../common/Link';
 import { WorkspaceContextShape } from '../workspace/context';
 import MeasuresOverlay from './components/MeasuresOverlay';
 
index 1aa0e65f921cc630562dff3b2c89ec42ed028449..db63a2fa2b589d718b4ff195b3ffc55678c99bea 100644 (file)
@@ -69,7 +69,7 @@ exports[`should render correctly for a regular file 1`] = `
           </a>
         </li>
         <li>
-          <Link
+          <ForwardRef(Link)
             className="js-new-window"
             rel="noopener noreferrer"
             target="_blank"
@@ -81,7 +81,7 @@ exports[`should render correctly for a regular file 1`] = `
             }
           >
             component_viewer.new_window
-          </Link>
+          </ForwardRef(Link)>
         </li>
         <li>
           <a
@@ -202,7 +202,7 @@ exports[`should render correctly for a unit test 1`] = `
           </a>
         </li>
         <li>
-          <Link
+          <ForwardRef(Link)
             className="js-new-window"
             rel="noopener noreferrer"
             target="_blank"
@@ -214,7 +214,7 @@ exports[`should render correctly for a unit test 1`] = `
             }
           >
             component_viewer.new_window
-          </Link>
+          </ForwardRef(Link)>
         </li>
         <li>
           <a
@@ -361,7 +361,7 @@ exports[`should render correctly if issue details are passed 1`] = `
       <span
         className="source-viewer-header-measure-value"
       >
-        <Link
+        <ForwardRef(Link)
           to={
             Object {
               "hash": "",
@@ -371,7 +371,7 @@ exports[`should render correctly if issue details are passed 1`] = `
           }
         >
           0
-        </Link>
+        </ForwardRef(Link)>
       </span>
     </div>
     <div
@@ -386,7 +386,7 @@ exports[`should render correctly if issue details are passed 1`] = `
       <span
         className="source-viewer-header-measure-value"
       >
-        <Link
+        <ForwardRef(Link)
           to={
             Object {
               "hash": "",
@@ -396,7 +396,7 @@ exports[`should render correctly if issue details are passed 1`] = `
           }
         >
           2
-        </Link>
+        </ForwardRef(Link)>
       </span>
     </div>
     <div
@@ -411,7 +411,7 @@ exports[`should render correctly if issue details are passed 1`] = `
       <span
         className="source-viewer-header-measure-value"
       >
-        <Link
+        <ForwardRef(Link)
           to={
             Object {
               "hash": "",
@@ -421,7 +421,7 @@ exports[`should render correctly if issue details are passed 1`] = `
           }
         >
           1
-        </Link>
+        </ForwardRef(Link)>
       </span>
     </div>
     <div
@@ -436,7 +436,7 @@ exports[`should render correctly if issue details are passed 1`] = `
       <span
         className="source-viewer-header-measure-value"
       >
-        <Link
+        <ForwardRef(Link)
           to={
             Object {
               "hash": "",
@@ -446,7 +446,7 @@ exports[`should render correctly if issue details are passed 1`] = `
           }
         >
           2
-        </Link>
+        </ForwardRef(Link)>
       </span>
     </div>
   </div>
@@ -466,7 +466,7 @@ exports[`should render correctly if issue details are passed 1`] = `
           </a>
         </li>
         <li>
-          <Link
+          <ForwardRef(Link)
             className="js-new-window"
             rel="noopener noreferrer"
             target="_blank"
@@ -478,7 +478,7 @@ exports[`should render correctly if issue details are passed 1`] = `
             }
           >
             component_viewer.new_window
-          </Link>
+          </ForwardRef(Link)>
         </li>
         <li>
           <a
index 2716924b6c208534e6549032915353a1b17c05c2..1b392a2cb99e1ff8f5ba6571076c5ffc0c7a7747 100644 (file)
@@ -19,7 +19,7 @@
  */
 import { groupBy, sortBy } from 'lodash';
 import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
 import QualifierIcon from '../../../components/icons/QualifierIcon';
 import { Alert } from '../../../components/ui/Alert';
 import { isPullRequest } from '../../../helpers/branch-like';
index 86c8a90e4fdb3ac6631a5bce10bf9c8602ac999e..aba809cc6b64542c6523e3aaedbd7cdc455ad47f 100644 (file)
  */
 import { groupBy, keyBy, sortBy } from 'lodash';
 import * as React from 'react';
-import { Link } from 'react-router-dom';
 import { getFacets } from '../../../api/issues';
 import { getMeasures } from '../../../api/measures';
 import { getAllMetrics } from '../../../api/metrics';
+import Link from '../../../components/common/Link';
 import { ResetButtonLink } from '../../../components/controls/buttons';
 import Modal from '../../../components/controls/Modal';
 import IssueTypeIcon from '../../../components/icons/IssueTypeIcon';
index 6b09bf1ea0be071473ff36ab79efde28ad4fd055..3327c902762b70f1d82e9e852981fb5261352de4 100644 (file)
@@ -24,7 +24,7 @@ exports[`should render source file 1`] = `
           className="little-spacer-right"
           qualifier="TRK"
         />
-        <Link
+        <ForwardRef(Link)
           to={
             Object {
               "pathname": "/dashboard",
@@ -33,7 +33,7 @@ exports[`should render source file 1`] = `
           }
         >
           Project Name
-        </Link>
+        </ForwardRef(Link)>
       </div>
       <div
         className="display-flex-center little-spacer-top"
@@ -588,7 +588,7 @@ exports[`should render source file 2`] = `
           className="little-spacer-right"
           qualifier="TRK"
         />
-        <Link
+        <ForwardRef(Link)
           to={
             Object {
               "pathname": "/dashboard",
@@ -597,7 +597,7 @@ exports[`should render source file 2`] = `
           }
         >
           Project Name
-        </Link>
+        </ForwardRef(Link)>
       </div>
       <div
         className="display-flex-center little-spacer-top"
@@ -1735,7 +1735,7 @@ exports[`should render test file 1`] = `
           className="little-spacer-right"
           qualifier="TRK"
         />
-        <Link
+        <ForwardRef(Link)
           to={
             Object {
               "pathname": "/dashboard",
@@ -1744,7 +1744,7 @@ exports[`should render test file 1`] = `
           }
         >
           Project Name
-        </Link>
+        </ForwardRef(Link)>
       </div>
       <div
         className="display-flex-center little-spacer-top"
index e1b083003ef3005c92782ca2bf0034c054383e77..f1bc4005a10e6b5c48e5f654eff8a6e493e2359c 100644 (file)
@@ -24,9 +24,9 @@ import { event, select } from 'd3-selection';
 import { zoom, ZoomBehavior, zoomIdentity } from 'd3-zoom';
 import { sortBy, uniq } from 'lodash';
 import * as React from 'react';
-import { Link } from 'react-router-dom';
 import { AutoSizer } from 'react-virtualized/dist/commonjs/AutoSizer';
 import { translate } from '../../helpers/l10n';
+import Link from '../common/Link';
 import Tooltip from '../controls/Tooltip';
 import './BubbleChart.css';
 
index 3e10e369ac0f7be81dec739d080dadb8f3beafbc..40ac38666fa8a5e52e64fd42c80117f519255e2e 100644 (file)
@@ -20,8 +20,8 @@
 import classNames from 'classnames';
 import { scaleLinear } from 'd3-scale';
 import * as React from 'react';
-import { Link } from 'react-router-dom';
 import { convertToTo, Location } from '../../helpers/urls';
+import Link from '../common/Link';
 import Tooltip, { Placement } from '../controls/Tooltip';
 import LinkIcon from '../icons/LinkIcon';
 
index 4b31a6002920201bb3b3174f012b88d3cc96ebda..a42768183aba31274a7853c3e506bec47b8ee4f2 100644 (file)
@@ -21,8 +21,8 @@ import { select } from 'd3-selection';
 import { zoom } from 'd3-zoom';
 import { shallow } from 'enzyme';
 import * as React from 'react';
-import { Link } from 'react-router-dom';
 import { AutoSizer, AutoSizerProps } from 'react-virtualized/dist/commonjs/AutoSizer';
+import Link from '../../../components/common/Link';
 import { mockComponentMeasureEnhanced } from '../../../helpers/mocks/component';
 import { mockHtmlElement } from '../../../helpers/mocks/dom';
 import { click, mockEvent } from '../../../helpers/testUtils';
index 0a4f8fc8698f287ab7e6ff6fb81ed21ae60663c0..4bccbb4f0e3557277d190f381bf2d0c8e1f8a085 100644 (file)
@@ -18,7 +18,6 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import * as React from 'react';
-import { Link } from 'react-router-dom';
 import HistoryIcon from '../../components/icons/HistoryIcon';
 import { translate } from '../../helpers/l10n';
 import { getActivityUrl, getMeasureHistoryUrl } from '../../helpers/urls';
@@ -26,6 +25,7 @@ import { BranchLike } from '../../types/branch-like';
 import { GraphType } from '../../types/project-activity';
 import { isCustomGraph } from '../activity-graph/utils';
 import './ActivityLink.css';
+import Link from './Link';
 
 export interface ActivityLinkProps {
   branchLike?: BranchLike;
index b1e6b85ee7f4e97022dbc2a68d3dba5cf8a26c75..953f5fa6b04c8330aba73dc2787692e1eec443d3 100644 (file)
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import * as React from 'react';
-import { Link } from 'react-router-dom';
-import { isWebUri } from 'valid-url';
 import HelpTooltip from '../../components/controls/HelpTooltip';
-import DetachIcon from '../../components/icons/DetachIcon';
+import Link from './Link';
 
 export interface DocumentationTooltipProps {
   children?: React.ReactNode;
@@ -60,20 +58,9 @@ export default function DocumentationTooltip(props: DocumentationTooltipProps) {
                   // they won't be "clickable"), we hide the whole links section.
                   // See https://sarahmhigley.com/writing/tooltips-in-wcag-21/
                   aria-hidden={true}>
-                  {inPlace ? (
-                    <Link to={href}>
-                      <span>{label}</span>
-                    </Link>
-                  ) : (
-                    <Link
-                      className="display-inline-flex-center"
-                      to={href}
-                      rel="noopener noreferrer"
-                      target="_blank">
-                      {isWebUri(href) && <DetachIcon size={14} className="spacer-right" />}
-                      <span>{label}</span>
-                    </Link>
-                  )}
+                  <Link to={href} target={inPlace ? undefined : '_blank'}>
+                    {label}
+                  </Link>
                 </div>
               ))}
             </>
diff --git a/server/sonar-web/src/main/js/components/common/Link.tsx b/server/sonar-web/src/main/js/components/common/Link.tsx
new file mode 100644 (file)
index 0000000..527673c
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2022 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+import * as React from 'react';
+import { Link as ReactRouterDomLink, LinkProps as ReactRouterDomLinkProps } from 'react-router-dom';
+import { isWebUri } from 'valid-url';
+import { translate } from '../../helpers/l10n';
+import DetachIcon from '../icons/DetachIcon';
+
+type OriginalLinkProps = ReactRouterDomLinkProps & React.RefAttributes<HTMLAnchorElement>;
+
+export interface LinkProps extends OriginalLinkProps {
+  size?: number;
+}
+
+const DEFAULT_ICON_SIZE = 14;
+
+function Link({ children, size, ...props }: LinkProps, ref: React.ForwardedRef<HTMLAnchorElement>) {
+  if (typeof props.to === 'string' && isWebUri(props.to)) {
+    // The new React Router DOM's <Link> component no longer supports external links.
+    // We have to use the <a> element instead.
+    const { to, ...anchorProps } = props;
+    return (
+      <a
+        ref={ref}
+        href={to}
+        rel={anchorProps.target === '_blank' ? 'noopener noreferrer' : undefined}
+        {...anchorProps}>
+        {anchorProps.target === '_blank' && (
+          <DetachIcon
+            ariaLabel={translate('opens_in_new_window')}
+            size={size || DEFAULT_ICON_SIZE}
+            className="little-spacer-right"
+          />
+        )}
+        {children}
+      </a>
+    );
+  }
+
+  return (
+    <ReactRouterDomLink
+      ref={ref}
+      rel={props.target === '_blank' ? 'noopener noreferrer' : undefined}
+      {...props}>
+      {children}
+    </ReactRouterDomLink>
+  );
+}
+
+export default React.forwardRef(Link);
index c3515fc8bfa5e8eeec82d3dc34fc93ed5882fdcf..b2a1f71b1c77ea22b0144da237b6de09208a2f41 100644 (file)
  */
 import classNames from 'classnames';
 import * as React from 'react';
-import { Link } from 'react-router-dom';
 import MeasuresIcon from '../../components/icons/MeasuresIcon';
 import { translate } from '../../helpers/l10n';
 import { getComponentDrilldownUrl } from '../../helpers/urls';
 import { BranchLike } from '../../types/branch-like';
+import Link from './Link';
 import './MeasuresLink.css';
 
 export interface MeasuresLinkProps {
diff --git a/server/sonar-web/src/main/js/components/common/__tests__/Link-test.tsx b/server/sonar-web/src/main/js/components/common/__tests__/Link-test.tsx
new file mode 100644 (file)
index 0000000..2de4d6f
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2022 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+import { screen } from '@testing-library/react';
+import * as React from 'react';
+import { renderComponent } from '../../../helpers/testReactTestingUtils';
+import Link, { LinkProps } from '../Link';
+
+it('should correctly render an internal link', () => {
+  renderLink();
+  expect(screen.getByRole('link').getAttribute('rel')).not.toBe('noopener noreferrer');
+  expect(screen.queryByLabelText('opens_in_new_window')).not.toBeInTheDocument();
+});
+
+it('should correctly render a link that opens in a new window, but is not considered external', () => {
+  renderLink({ target: '_blank', to: '/path' });
+  expect(screen.getByRole('link').getAttribute('rel')).toBe('noopener noreferrer');
+});
+
+it('should correctly render an external link', () => {
+  renderLink({ target: '_blank', to: 'http://example.com' });
+  expect(screen.getByRole('link').getAttribute('rel')).toBe('noopener noreferrer');
+  expect(screen.getByLabelText('opens_in_new_window')).toBeInTheDocument();
+});
+
+function renderLink(props: Partial<LinkProps> = {}) {
+  return renderComponent(
+    <Link to={{ pathname: 'to' }} {...props}>
+      click me
+    </Link>
+  );
+}
index 3a792609d9259c50a275490d1b75af6f79706b54..be6e137c027f2894f4802230727e8ce5735df9ec 100644 (file)
@@ -1,7 +1,7 @@
 // Jest Snapshot v1, https://goo.gl/fbAQLP
 
 exports[`renders correctly 1`] = `
-<Link
+<ForwardRef(Link)
   className="activity-link"
   to={
     Object {
@@ -17,11 +17,11 @@ exports[`renders correctly 1`] = `
   <span>
     portfolio.activity_link
   </span>
-</Link>
+</ForwardRef(Link)>
 `;
 
 exports[`renders correctly 2`] = `
-<Link
+<ForwardRef(Link)
   className="activity-link"
   to={
     Object {
@@ -37,11 +37,11 @@ exports[`renders correctly 2`] = `
   <span>
     Foo
   </span>
-</Link>
+</ForwardRef(Link)>
 `;
 
 exports[`renders correctly 3`] = `
-<Link
+<ForwardRef(Link)
   className="activity-link"
   to={
     Object {
@@ -57,11 +57,11 @@ exports[`renders correctly 3`] = `
   <span>
     portfolio.activity_link
   </span>
-</Link>
+</ForwardRef(Link)>
 `;
 
 exports[`renders correctly 4`] = `
-<Link
+<ForwardRef(Link)
   className="activity-link"
   to={
     Object {
@@ -77,5 +77,5 @@ exports[`renders correctly 4`] = `
   <span>
     portfolio.activity_link
   </span>
-</Link>
+</ForwardRef(Link)>
 `;
index 5c6a804f4e00e39354403d46ac8d068db0eca3d4..88d7984d8e35d2c75183cc774f988ba780bdb452 100644 (file)
@@ -77,47 +77,33 @@ exports[`renders correctly: with links 1`] = `
           aria-hidden={true}
           className="little-spacer-bottom"
         >
-          <Link
-            className="display-inline-flex-center"
-            rel="noopener noreferrer"
+          <ForwardRef(Link)
             target="_blank"
             to="http://link.tosome.place"
           >
-            <DetachIcon
-              className="spacer-right"
-              size={14}
-            />
-            <span>
-              external link
-            </span>
-          </Link>
+            external link
+          </ForwardRef(Link)>
         </div>
         <div
           aria-hidden={true}
           className="little-spacer-bottom"
         >
-          <Link
-            className="display-inline-flex-center"
-            rel="noopener noreferrer"
+          <ForwardRef(Link)
             target="_blank"
             to="/documentation/guide"
           >
-            <span>
-              internal link
-            </span>
-          </Link>
+            internal link
+          </ForwardRef(Link)>
         </div>
         <div
           aria-hidden={true}
           className="little-spacer-bottom"
         >
-          <Link
+          <ForwardRef(Link)
             to="/projects"
           >
-            <span>
-              in place
-            </span>
-          </Link>
+            in place
+          </ForwardRef(Link)>
         </div>
       </React.Fragment>
     </div>
index 80224fda5a43d7da5c19faa88a9c8c327d652272..bf85f7d6c3f5126cfcee052a5299e386fcda41c5 100644 (file)
@@ -1,7 +1,7 @@
 // Jest Snapshot v1, https://goo.gl/fbAQLP
 
 exports[`renders 1`] = `
-<Link
+<ForwardRef(Link)
   className="measures-link"
   to={
     Object {
@@ -17,11 +17,11 @@ exports[`renders 1`] = `
   <span>
     portfolio.measures_link
   </span>
-</Link>
+</ForwardRef(Link)>
 `;
 
 exports[`renders 2`] = `
-<Link
+<ForwardRef(Link)
   className="measures-link"
   to={
     Object {
@@ -37,11 +37,11 @@ exports[`renders 2`] = `
   <span>
     Foo
   </span>
-</Link>
+</ForwardRef(Link)>
 `;
 
 exports[`renders 3`] = `
-<Link
+<ForwardRef(Link)
   className="measures-link"
   to={
     Object {
@@ -57,5 +57,5 @@ exports[`renders 3`] = `
   <span>
     portfolio.measures_link
   </span>
-</Link>
+</ForwardRef(Link)>
 `;
index e0184dcb0f169b960bdf8a152dbb1d0ddb5f2ac9..371f5c28f3b27452455f2bb82be95f492e3d82d5 100644 (file)
@@ -19,7 +19,8 @@
  */
 import classNames from 'classnames';
 import * as React from 'react';
-import { Link, To } from 'react-router-dom';
+import { To } from 'react-router-dom';
+import Link from '../common/Link';
 import DropdownIcon from '../icons/DropdownIcon';
 import SettingsIcon from '../icons/SettingsIcon';
 import { PopupPlacement } from '../ui/popups';
index 2ebe48a75c0ebcbf18540d61f2fba235ba2ed18d..cb4b9c934d803be277c005d64f2ba4bcbad0be6e 100644 (file)
@@ -78,7 +78,7 @@ exports[`ActionsDropdownItem should render correctly 1`] = `
 
 exports[`ActionsDropdownItem should render correctly 2`] = `
 <li>
-  <Link
+  <ForwardRef(Link)
     className="foo text-danger"
     id="baz"
     to="path/name"
@@ -86,7 +86,7 @@ exports[`ActionsDropdownItem should render correctly 2`] = `
     <span>
       Hello world
     </span>
-  </Link>
+  </ForwardRef(Link)>
 </li>
 `;
 
index 493a652f0fc156b1171c451140f06adb70a6a710..78c3228bb92c2e0f5f492fcf4a7666b2dfa99ec2 100644 (file)
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import * as React from 'react';
-import { Link } from 'react-router-dom';
 import withAppStateContext from '../../app/components/app-state/withAppStateContext';
-import DetachIcon from '../../components/icons/DetachIcon';
 import { AppState } from '../../types/appstate';
+import Link from '../common/Link';
 
 interface OwnProps {
   appState: AppState;
@@ -71,17 +70,11 @@ export class DocLink extends React.PureComponent<Props> {
       );
     }
 
-    return (
-      <>
-        <a href={href} rel="noopener noreferrer" target="_blank" {...other}>
-          {children}
-        </a>
-        <DetachIcon
-          className="text-muted little-spacer-left little-spacer-right text-baseline"
-          size={12}
-        />
-      </>
-    );
+    return href ? (
+      <Link to={href} target="_blank" size={12} {...other}>
+        {children}
+      </Link>
+    ) : null;
   }
 }
 
index 4074ac970aa5f51fc58a50183b19082774b59a4a..daf1c8c4662f4676975b4311c138207d8a0c08ca 100644 (file)
@@ -19,9 +19,8 @@
  */
 import { forEach } from 'lodash';
 import * as React from 'react';
-import { Link } from 'react-router-dom';
-import DetachIcon from '../../components/icons/DetachIcon';
 import { Dict } from '../../types/types';
+import Link from '../common/Link';
 
 interface OwnProps {
   customProps?: Dict<string>;
@@ -42,18 +41,15 @@ export default function DocTooltipLink({ children, customProps, href, ...other }
     href = `/documentation/${href.substr(1)}`;
 
     return (
-      <Link rel="noopener noreferrer" target="_blank" to={href} {...other}>
+      <Link target="_blank" to={href} {...other}>
         {children}
       </Link>
     );
   }
 
-  return (
-    <>
-      <a href={href} rel="noopener noreferrer" target="_blank" {...other}>
-        {children}
-      </a>
-      <DetachIcon className="little-spacer-left little-spacer-right text-baseline" size={12} />
-    </>
-  );
+  return href ? (
+    <Link size={12} to={href} target="_blank" {...other}>
+      {children}
+    </Link>
+  ) : null;
 }
index 2ec3dbe8289154a17dff6fd345de29b3bd0d58ea..48b6223cb293442e6b7e930df62f5b5b184a10ac 100644 (file)
@@ -16,27 +16,21 @@ exports[`should render documentation anchor 1`] = `
 `;
 
 exports[`should render documentation link 1`] = `
-<Link
+<ForwardRef(Link)
   to="/documentation/foo/bar"
 >
   link text
-</Link>
+</ForwardRef(Link)>
 `;
 
 exports[`should render simple link 1`] = `
-<Fragment>
-  <a
-    href="http://sample.com"
-    rel="noopener noreferrer"
-    target="_blank"
-  >
-    link text
-  </a>
-  <DetachIcon
-    className="text-muted little-spacer-left little-spacer-right text-baseline"
-    size={12}
-  />
-</Fragment>
+<ForwardRef(Link)
+  size={12}
+  target="_blank"
+  to="http://sample.com"
+>
+  link text
+</ForwardRef(Link)>
 `;
 
 exports[`should render sonarqube admin link on sonarqube for admin 1`] = `
@@ -49,12 +43,12 @@ exports[`should render sonarqube admin link on sonarqube for admin 1`] = `
 `;
 
 exports[`should render sonarqube admin link on sonarqube for admin 2`] = `
-<Link
+<ForwardRef(Link)
   target="_blank"
   to="/foo/bar"
 >
   link text
-</Link>
+</ForwardRef(Link)>
 `;
 
 exports[`should render sonarqube link on sonarqube 1`] = `
@@ -66,10 +60,10 @@ exports[`should render sonarqube link on sonarqube 1`] = `
 `;
 
 exports[`should render sonarqube link on sonarqube 2`] = `
-<Link
+<ForwardRef(Link)
   target="_blank"
   to="/foo/bar"
 >
   link text
-</Link>
+</ForwardRef(Link)>
 `;
index 851e357803a03305034ff36b2e27fbd7e94016df..43cac60176609fff8ddcf9231de857fe84b99137 100644 (file)
@@ -1,31 +1,23 @@
 // Jest Snapshot v1, https://goo.gl/fbAQLP
 
 exports[`should render internal link 1`] = `
-<Link
-  rel="noopener noreferrer"
+<ForwardRef(Link)
   target="_blank"
   to="/documentation/foo/bar"
 />
 `;
 
 exports[`should render links with custom props 1`] = `
-<Link
-  rel="noopener noreferrer"
+<ForwardRef(Link)
   target="_blank"
   to="/documentation/foo/baz"
 />
 `;
 
 exports[`should render simple link 1`] = `
-<Fragment>
-  <a
-    href="http://sample.com"
-    rel="noopener noreferrer"
-    target="_blank"
-  />
-  <DetachIcon
-    className="little-spacer-left little-spacer-right text-baseline"
-    size={12}
-  />
-</Fragment>
+<ForwardRef(Link)
+  size={12}
+  target="_blank"
+  to="http://sample.com"
+/>
 `;
index 4b063dae646ed220e4e6163812e152758a4db9fd..256af65b302510237bae07ffe245bde12a04e04a 100644 (file)
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import * as React from 'react';
-import { Link } from 'react-router-dom';
 import { translate } from '../../helpers/l10n';
 import { getBaseUrl } from '../../helpers/system';
 import { SuggestionLink } from '../../types/types';
+import Link from '../common/Link';
 import { DropdownOverlay } from '../controls/Dropdown';
 import { SuggestionsContext } from './SuggestionsContext';
 
@@ -112,9 +112,12 @@ export default class EmbedDocsPopup extends React.PureComponent<Props> {
         </ul>
         <ul className="menu abs-width-240" role="group">
           <li>
-            <a href="https://community.sonarsource.com/" rel="noopener noreferrer" target="_blank">
+            <Link
+              className="display-flex-center"
+              to="https://community.sonarsource.com/"
+              target="_blank">
               {translate('embed_docs.get_help')}
-            </a>
+            </Link>
           </li>
         </ul>
         <ul className="menu abs-width-240" role="group">
index f681a0789162053e30e58ef3ece8855adc374696..b4dc65e464774b659fd289f2d8061dd26ff5e338 100644 (file)
@@ -23,6 +23,7 @@ import Tooltip from '../../../components/controls/Tooltip';
 import { translate, translateWithParameters } from '../../../helpers/l10n';
 import { RuleStatus } from '../../../types/rules';
 import DocumentationTooltip from '../../common/DocumentationTooltip';
+import Link from '../../common/Link';
 import SonarLintIcon from '../../icons/SonarLintIcon';
 import { WorkspaceContext } from '../../workspace/context';
 
@@ -48,12 +49,11 @@ export default function IssueMessageTags(props: IssueMessageTagsProps) {
               defaultMessage={translate('issue.quick_fix_available_with_sonarlint')}
               values={{
                 link: (
-                  <a
-                    href="https://www.sonarqube.org/sonarlint/?referrer=sonarqube-quick-fix"
-                    rel="noopener noreferrer"
+                  <Link
+                    to="https://www.sonarqube.org/sonarlint/?referrer=sonarqube-quick-fix"
                     target="_blank">
                     SonarLint
-                  </a>
+                  </Link>
                 )
               }}
             />
index 9b04445d03c17f68bd70770a4bde08eaec35a51c..2ada6ced27ef5573551b93827b4075cbd72be9a8 100644 (file)
@@ -18,7 +18,7 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import * as React from 'react';
-import { Link } from 'react-router-dom';
+import Link from '../../../components/common/Link';
 import Tooltip from '../../../components/controls/Tooltip';
 import LinkIcon from '../../../components/icons/LinkIcon';
 import { getBranchLikeQuery } from '../../../helpers/branch-like';
index be269fd42325e9a24aad5a53782706b42ea561a2..8692df798b0e93e69989d22d527f99bdc3ec1c9c 100644 (file)
@@ -69,7 +69,7 @@ exports[`should render correctly: default 1`] = `
       <div
         className="issue-meta"
       >
-        <Link
+        <ForwardRef(Link)
           className="js-issue-permalink link-no-underline"
           target="_blank"
           title="permalink"
@@ -82,7 +82,7 @@ exports[`should render correctly: default 1`] = `
           }
         >
           <LinkIcon />
-        </Link>
+        </ForwardRef(Link)>
       </div>
     </div>
   </div>
@@ -158,7 +158,7 @@ exports[`should render correctly: with filter 1`] = `
       <div
         className="issue-meta"
       >
-        <Link
+        <ForwardRef(Link)
           className="js-issue-permalink link-no-underline"
           target="_blank"
           title="permalink"
@@ -171,7 +171,7 @@ exports[`should render correctly: with filter 1`] = `
           }
         >
           <LinkIcon />
-        </Link>
+        </ForwardRef(Link)>
       </div>
       <div
         className="issue-meta"
@@ -365,7 +365,7 @@ exports[`should render correctly: with multi locations 1`] = `
       <div
         className="issue-meta"
       >
-        <Link
+        <ForwardRef(Link)
           className="js-issue-permalink link-no-underline"
           target="_blank"
           title="permalink"
@@ -378,7 +378,7 @@ exports[`should render correctly: with multi locations 1`] = `
           }
         >
           <LinkIcon />
-        </Link>
+        </ForwardRef(Link)>
       </div>
     </div>
   </div>
@@ -521,7 +521,7 @@ exports[`should render correctly: with multi locations and link 1`] = `
       <div
         className="issue-meta"
       >
-        <Link
+        <ForwardRef(Link)
           target="_blank"
           to={
             Object {
@@ -538,12 +538,12 @@ exports[`should render correctly: with multi locations and link 1`] = `
               7
             </LocationIndex>
           </Tooltip>
-        </Link>
+        </ForwardRef(Link)>
       </div>
       <div
         className="issue-meta"
       >
-        <Link
+        <ForwardRef(Link)
           className="js-issue-permalink link-no-underline"
           target="_blank"
           title="permalink"
@@ -556,7 +556,7 @@ exports[`should render correctly: with multi locations and link 1`] = `
           }
         >
           <LinkIcon />
-        </Link>
+        </ForwardRef(Link)>
       </div>
     </div>
   </div>
index d63242fc68f6ab24f28ebdf30418dc48465e9c52..7105e258d820f7de1b0cef56d4eadff15de4b5db 100644 (file)
@@ -21,6 +21,7 @@ import * as React from 'react';
 import { FormattedMessage } from 'react-intl';
 import { DropdownOverlay } from '../../../components/controls/Dropdown';
 import { translate } from '../../../helpers/l10n';
+import Link from '../../common/Link';
 import SelectList from '../../common/SelectList';
 import SelectListItem from '../../common/SelectListItem';
 
@@ -55,9 +56,9 @@ function translateTransition(transition: string) {
       id={`issue.transition.${transition}.description`}
       values={{
         community_plug_link: (
-          <a href="https://community.sonarsource.com/" rel="noopener noreferrer" target="_blank">
+          <Link to="https://community.sonarsource.com/" target="_blank">
             {translate('issue.transition.community_plug_link')}
-          </a>
+          </Link>
         )
       }}
     />
index 5651f7aa78b8586261208c7e32eb23221da69d89..d4d4a0608298217a3db48324936bd76d035797d6 100644 (file)
@@ -19,9 +19,9 @@
  */
 import * as React from 'react';
 import { translate } from '../../helpers/l10n';
+import Link from '../common/Link';
 import CheckIcon from '../icons/CheckIcon';
 import ClearIcon from '../icons/ClearIcon';
-import DetachIcon from '../icons/DetachIcon';
 
 export default function OtherContextOption() {
   return (
@@ -41,13 +41,11 @@ export default function OtherContextOption() {
       </p>
       <h2>{translate('coding_rules.context.others.title_feedback')}</h2>
       <p>{translate('coding_rules.context.others.feedback_description_1')}</p>
-      <a
-        href="https://portal.productboard.com/sonarsource/3-sonarqube/submit-idea"
-        rel="noopener noreferrer"
+      <Link
+        to="https://portal.productboard.com/sonarsource/3-sonarqube/submit-idea"
         target="_blank">
         {translate('coding_rules.context.others.feedback_description.link')}
-        <DetachIcon className="spacer-left" />
-      </a>
+      </Link>
       <p>{translate('coding_rules.context.others.feedback_description_2')}</p>
     </>
   );
index def276b3bee3de27a6616eeef4e433fc7ab1a10b..7d7a6bf97409ac43d0d51f0c09aa13ab13505044 100644 (file)
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import * as React from 'react';
-import { Link } from 'react-router-dom';
 import { getBranchLikeQuery } from '../../helpers/branch-like';
 import { getComponentDrilldownUrl, getComponentIssuesUrl } from '../../helpers/urls';
 import { BranchLike } from '../../types/branch-like';
 import { MetricKey } from '../../types/metrics';
 import { Dict } from '../../types/types';
+import Link from '../common/Link';
 
 const ISSUE_MEASURES = [
   MetricKey.violations,
index e09cd6d4cd1573cb49659155048ae88a32b157fd..df74dc65e71c61d35b4902c15348a2b67fc342d0 100644 (file)
@@ -1,7 +1,7 @@
 // Jest Snapshot v1, https://goo.gl/fbAQLP
 
 exports[`should render correctly 1`] = `
-<Link
+<ForwardRef(Link)
   to={
     Object {
       "pathname": "/component_measures",
@@ -10,11 +10,11 @@ exports[`should render correctly 1`] = `
   }
 >
   label
-</Link>
+</ForwardRef(Link)>
 `;
 
 exports[`should render issuesLink correctly 1`] = `
-<Link
+<ForwardRef(Link)
   to={
     Object {
       "hash": "",
@@ -24,5 +24,5 @@ exports[`should render issuesLink correctly 1`] = `
   }
 >
   label
-</Link>
+</ForwardRef(Link)>
 `;
index e5430f35184c359b1225ee700dfb1819e36f3249..eff9bb3e535459b050135f3a98283d9113b649a7 100644 (file)
@@ -20,6 +20,7 @@
 import * as React from 'react';
 import { FormattedMessage } from 'react-intl';
 import { translate } from '../../../helpers/l10n';
+import Link from '../../common/Link';
 
 export default function ExtensionInstallationStepContent() {
   return (
@@ -31,14 +32,13 @@ export default function ExtensionInstallationStepContent() {
         id="onboarding.tutorial.with.azure_pipelines.ExtensionInstallation.sentence"
         values={{
           link: (
-            <a
-              href="https://marketplace.visualstudio.com/items?itemName=SonarSource.sonarqube"
-              rel="noopener noreferrer"
+            <Link
+              to="https://marketplace.visualstudio.com/items?itemName=SonarSource.sonarqube"
               target="_blank">
               {translate(
                 'onboarding.tutorial.with.azure_pipelines.ExtensionInstallation.sentence.link'
               )}
-            </a>
+            </Link>
           ),
           button: (
             <strong>
index 9a8c93a3e5f3c473ee0cf05640168da057514317..e8b50f4347ea7be04dd441da9b1a87e76d33054f 100644 (file)
@@ -10,13 +10,12 @@ exports[`should render correctly 1`] = `
         "button": <strong>
           onboarding.tutorial.with.azure_pipelines.ExtensionInstallation.sentence.button
         </strong>,
-        "link": <a
-          href="https://marketplace.visualstudio.com/items?itemName=SonarSource.sonarqube"
-          rel="noopener noreferrer"
+        "link": <ForwardRef(Link)
           target="_blank"
+          to="https://marketplace.visualstudio.com/items?itemName=SonarSource.sonarqube"
         >
           onboarding.tutorial.with.azure_pipelines.ExtensionInstallation.sentence.link
-        </a>,
+        </ForwardRef(Link)>,
       }
     }
   />
index ae64c89960d4f6876fb0b64e7e29ed4192192375..1aa48b199d7f5c6343f133fb6d11f4b648e02218 100644 (file)
  */
 import * as React from 'react';
 import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
 import { Alert } from '../../../../components/ui/Alert';
 import { ALM_DOCUMENTATION_PATHS } from '../../../../helpers/constants';
 import { translate } from '../../../../helpers/l10n';
 import { AlmKeys } from '../../../../types/alm-settings';
+import Link from '../../../common/Link';
 
 export default function AlertClassicEditor() {
   return (
index 665d729a0d5c2ee18da3bef30a0060e6f612c591..a259ac50553f12a5435822e89987a8f04dec8798 100644 (file)
  */
 import * as React from 'react';
 import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
 import withAppStateContext from '../../../../app/components/app-state/withAppStateContext';
 import { Alert } from '../../../../components/ui/Alert';
 import { ALM_DOCUMENTATION_PATHS } from '../../../../helpers/constants';
 import { translate } from '../../../../helpers/l10n';
 import { AlmKeys } from '../../../../types/alm-settings';
 import { AppState } from '../../../../types/appstate';
+import Link from '../../../common/Link';
 import SentenceWithHighlights from '../../components/SentenceWithHighlights';
 
 export interface PublishStepsProps {
index a9a6864ee299c4fffa945288d0fb479cf80be57c..21628b7c6eead97d7b235ab23bc292cbdae5e73e 100644 (file)
@@ -10,12 +10,12 @@ exports[`should render correctly 1`] = `
     id="onboarding.tutorial.with.azure_pipelines.BranchAnalysis.info"
     values={
       Object {
-        "doc_link": <Link
+        "doc_link": <ForwardRef(Link)
           target="_blank"
           to="/documentation/analysis/azuredevops-integration/"
         >
           onboarding.tutorial.with.azure_pipelines.BranchAnalysis.info.doc_link
-        </Link>,
+        </ForwardRef(Link)>,
       }
     }
   />
index 13c0f03e6f9a9a43815554ecd47b8034c1c58ffb..091a7fb5cd3219e611b88214db7ceb0e0fb8c58a 100644 (file)
@@ -67,12 +67,12 @@ exports[`should render correctly 2`] = `
     id="onboarding.tutorial.with.azure_pipelines.BranchAnalysis.branch_protection"
     values={
       Object {
-        "link": <Link
+        "link": <ForwardRef(Link)
           target="_blank"
           to="/documentation/analysis/azuredevops-integration/"
         >
           onboarding.tutorial.with.azure_pipelines.BranchAnalysis.branch_protection.link
-        </Link>,
+        </ForwardRef(Link)>,
       }
     }
   />
index 6f09c905b844ebf91f49bfc2a1be4b6354030932..622f0a2b48643a339791ba6eba78f4d7323e78d0 100644 (file)
@@ -19,7 +19,6 @@
  */
 import * as React from 'react';
 import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
 import { generateToken, getTokens, revokeToken } from '../../../api/user-tokens';
 import { Button, DeleteButton } from '../../../components/controls/buttons';
 import { ClipboardIconButton } from '../../../components/controls/clipboard';
@@ -35,6 +34,7 @@ import {
 import { TokenExpiration, TokenType } from '../../../types/token';
 import { Component } from '../../../types/types';
 import { LoggedInUser } from '../../../types/users';
+import Link from '../../common/Link';
 import Select from '../../controls/Select';
 import { getUniqueTokenName } from '../utils';
 
index 57925ce1208afbfa11c9b87d49a9681b736f41ed..f9f41a4bd2b9c2cb7c411a746d6066585b004156 100644 (file)
@@ -21,6 +21,7 @@ import classNames from 'classnames';
 import React from 'react';
 import { translate } from '../../../helpers/l10n';
 import { getBaseUrl } from '../../../helpers/system';
+import Link from '../../common/Link';
 import { OSs, TutorialModes } from '../types';
 import './GithubCFamilyExampleRepositories.css';
 
@@ -68,9 +69,9 @@ export default function GithubCFamilyExampleRepositories(
           height={20}
           src={`${getBaseUrl()}/images/alm/github.svg`}
         />
-        <a className="spacer-left big" rel="noopener noreferrer" target="_blank" href={link}>
+        <Link className="spacer-left big" target="_blank" to={link}>
           sonarsource-cfamily-examples
-        </a>
+        </Link>
       </div>
       <p className="spacer-top">
         {translate('onboarding.tutorial.cfamily.examples_repositories_description')}
index 15c783d362b28e55f3c317aa07518f4f1ccadb5d..14cb44eb1f070515c39b2e7b6fdb27f37f86fc3a 100644 (file)
@@ -13,14 +13,13 @@ exports[`should render correctly 1`] = `
       height={20}
       src="/images/alm/github.svg"
     />
-    <a
+    <ForwardRef(Link)
       className="spacer-left big"
-      href="https://github.com/orgs/sonarsource-cfamily-examples/repositories?q=sq"
-      rel="noopener noreferrer"
       target="_blank"
+      to="https://github.com/orgs/sonarsource-cfamily-examples/repositories?q=sq"
     >
       sonarsource-cfamily-examples
-    </a>
+    </ForwardRef(Link)>
   </div>
   <p
     className="spacer-top"
@@ -43,14 +42,13 @@ exports[`should render correctly 2`] = `
       height={20}
       src="/images/alm/github.svg"
     />
-    <a
+    <ForwardRef(Link)
       className="spacer-left big"
-      href="https://github.com/orgs/sonarsource-cfamily-examples/repositories?q=sq+macos+azure"
-      rel="noopener noreferrer"
       target="_blank"
+      to="https://github.com/orgs/sonarsource-cfamily-examples/repositories?q=sq+macos+azure"
     >
       sonarsource-cfamily-examples
-    </a>
+    </ForwardRef(Link)>
   </div>
   <p
     className="spacer-top"
index 6e068484065e644d8a5860a140e679bbf0eb6665..f2c4a4d23398b1da601754b1abbe484db56f20a1 100644 (file)
  */
 import * as React from 'react';
 import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
 import { rawSizes } from '../../../app/theme';
 import { Button } from '../../../components/controls/buttons';
 import ChevronRightIcon from '../../../components/icons/ChevronRightIcon';
 import { Alert } from '../../../components/ui/Alert';
 import { translate } from '../../../helpers/l10n';
 import { AlmKeys } from '../../../types/alm-settings';
+import Link from '../../common/Link';
 import SentenceWithHighlights from '../components/SentenceWithHighlights';
 import Step from '../components/Step';
 
index e2cba1c679387dada263a3974eeb7e73139fd98a..16c635a74210cc070be5fbb785af9ad0182c3991 100644 (file)
@@ -28,6 +28,7 @@ import {
   ProjectAlmBindingResponse
 } from '../../../types/alm-settings';
 import CodeSnippet from '../../common/CodeSnippet';
+import Link from '../../common/Link';
 import LabelActionPair from '../components/LabelActionPair';
 import SentenceWithHighlights from '../components/SentenceWithHighlights';
 import { buildBitbucketCloudLink } from '../utils';
@@ -79,9 +80,9 @@ export default function WebhookStepBitbucket(props: WebhookStepBitbucketProps) {
           id="onboarding.tutorial.with.jenkins.webhook.step1.sentence"
           values={{
             link: linkUrl ? (
-              <a href={linkUrl} rel="noopener noreferrer" target="_blank">
+              <Link to={linkUrl} target="_blank">
                 {translate('onboarding.tutorial.with.jenkins.webhook', alm, 'step1.link')}
-              </a>
+              </Link>
             ) : (
               <strong>
                 {translate('onboarding.tutorial.with.jenkins.webhook', alm, 'step1.link')}
index d5248bd8b8cd2293e9142c998da1acb1543a48bc..685f8a13b055d9c324f5693e40be8afe6aabea7a 100644 (file)
@@ -22,6 +22,7 @@ import { FormattedMessage } from 'react-intl';
 import { translate } from '../../../helpers/l10n';
 import { AlmSettingsInstance, ProjectAlmBindingResponse } from '../../../types/alm-settings';
 import CodeSnippet from '../../common/CodeSnippet';
+import Link from '../../common/Link';
 import LabelActionPair from '../components/LabelActionPair';
 import SentenceWithHighlights from '../components/SentenceWithHighlights';
 import { buildGithubLink } from '../utils';
@@ -50,9 +51,9 @@ export default function WebhookStepGithub(props: WebhookStepGithubProps) {
           id="onboarding.tutorial.with.jenkins.webhook.step1.sentence"
           values={{
             link: linkUrl ? (
-              <a href={linkUrl} rel="noopener noreferrer" target="_blank">
+              <Link to={linkUrl} target="_blank">
                 {translate('onboarding.tutorial.with.jenkins.webhook.github.step1.link')}
-              </a>
+              </Link>
             ) : (
               <strong>
                 {translate('onboarding.tutorial.with.jenkins.webhook.github.step1.link')}
index 091b72035d8d79022ee831feae5eab2a529f8b15..eba200ef8ff24d79b7b75732ff5d5c7d8a00d83e 100644 (file)
@@ -46,12 +46,12 @@ exports[`should render correctly: content 1`] = `
       id="onboarding.tutorial.with.jenkins.prereqs.step_by_step_guide"
       values={
         Object {
-          "link": <Link
+          "link": <ForwardRef(Link)
             target="_blank"
             to="/documentation/analysis/jenkins/"
           >
             onboarding.tutorial.with.jenkins.prereqs.step_by_step_guide.link
-          </Link>,
+          </ForwardRef(Link)>,
         }
       }
     />
@@ -106,12 +106,12 @@ exports[`should render correctly: content for branches disabled 1`] = `
       id="onboarding.tutorial.with.jenkins.prereqs.step_by_step_guide"
       values={
         Object {
-          "link": <Link
+          "link": <ForwardRef(Link)
             target="_blank"
             to="/documentation/analysis/jenkins/"
           >
             onboarding.tutorial.with.jenkins.prereqs.step_by_step_guide.link
-          </Link>,
+          </ForwardRef(Link)>,
         }
       }
     />
@@ -169,12 +169,12 @@ exports[`should render correctly: content for branches disabled, gitlab 1`] = `
       id="onboarding.tutorial.with.jenkins.prereqs.step_by_step_guide"
       values={
         Object {
-          "link": <Link
+          "link": <ForwardRef(Link)
             target="_blank"
             to="/documentation/analysis/jenkins/"
           >
             onboarding.tutorial.with.jenkins.prereqs.step_by_step_guide.link
-          </Link>,
+          </ForwardRef(Link)>,
         }
       }
     />
index e12a985c465c0b08cfee529169d6d88814f673a5..cdc06c8374406bf82f3f04f3bebe4065cc016fda 100644 (file)
@@ -8,13 +8,12 @@ exports[`should render correctly for bitbucket 1`] = `
       id="onboarding.tutorial.with.jenkins.webhook.step1.sentence"
       values={
         Object {
-          "link": <a
-            href="http://bbs.enterprise.com/plugins/servlet/webhooks/projects/PROJECT_KEY/repos/repo-slug/create"
-            rel="noopener noreferrer"
+          "link": <ForwardRef(Link)
             target="_blank"
+            to="http://bbs.enterprise.com/plugins/servlet/webhooks/projects/PROJECT_KEY/repos/repo-slug/create"
           >
             onboarding.tutorial.with.jenkins.webhook.bitbucket.step1.link
-          </a>,
+          </ForwardRef(Link)>,
         }
       }
     />
@@ -91,13 +90,12 @@ exports[`should render correctly for bitbucket: with branches disabled 1`] = `
       id="onboarding.tutorial.with.jenkins.webhook.step1.sentence"
       values={
         Object {
-          "link": <a
-            href="http://bbs.enterprise.com/plugins/servlet/webhooks/projects/PROJECT_KEY/repos/repo-slug/create"
-            rel="noopener noreferrer"
+          "link": <ForwardRef(Link)
             target="_blank"
+            to="http://bbs.enterprise.com/plugins/servlet/webhooks/projects/PROJECT_KEY/repos/repo-slug/create"
           >
             onboarding.tutorial.with.jenkins.webhook.bitbucket.step1.link
-          </a>,
+          </ForwardRef(Link)>,
         }
       }
     />
@@ -243,13 +241,12 @@ exports[`should render correctly for bitbucketcloud 1`] = `
       id="onboarding.tutorial.with.jenkins.webhook.step1.sentence"
       values={
         Object {
-          "link": <a
-            href="http://bitbucket.org/workspace/repo-slug/admin/addon/admin/bitbucket-webhooks/bb-webhooks-repo-admin"
-            rel="noopener noreferrer"
+          "link": <ForwardRef(Link)
             target="_blank"
+            to="http://bitbucket.org/workspace/repo-slug/admin/addon/admin/bitbucket-webhooks/bb-webhooks-repo-admin"
           >
             onboarding.tutorial.with.jenkins.webhook.bitbucketcloud.step1.link
-          </a>,
+          </ForwardRef(Link)>,
         }
       }
     />
@@ -322,13 +319,12 @@ exports[`should render correctly for bitbucketcloud: with branches disabled 1`]
       id="onboarding.tutorial.with.jenkins.webhook.step1.sentence"
       values={
         Object {
-          "link": <a
-            href="http://bitbucket.org/workspace/repo-slug/admin/addon/admin/bitbucket-webhooks/bb-webhooks-repo-admin"
-            rel="noopener noreferrer"
+          "link": <ForwardRef(Link)
             target="_blank"
+            to="http://bitbucket.org/workspace/repo-slug/admin/addon/admin/bitbucket-webhooks/bb-webhooks-repo-admin"
           >
             onboarding.tutorial.with.jenkins.webhook.bitbucketcloud.step1.link
-          </a>,
+          </ForwardRef(Link)>,
         }
       }
     />
index da3946e015cf24c3b6ba7ba9d922648a6cd9b7fc..65331dfacaf6bf892a31819a159f2aac75766abe 100644 (file)
@@ -8,13 +8,12 @@ exports[`should render correctly 1`] = `
       id="onboarding.tutorial.with.jenkins.webhook.step1.sentence"
       values={
         Object {
-          "link": <a
-            href="http://github.enterprise.com/PROJECT_KEY/settings/hooks"
-            rel="noopener noreferrer"
+          "link": <ForwardRef(Link)
             target="_blank"
+            to="http://github.enterprise.com/PROJECT_KEY/settings/hooks"
           >
             onboarding.tutorial.with.jenkins.webhook.github.step1.link
-          </a>,
+          </ForwardRef(Link)>,
         }
       }
     />
@@ -82,13 +81,12 @@ exports[`should render correctly: with branches disabled 1`] = `
       id="onboarding.tutorial.with.jenkins.webhook.step1.sentence"
       values={
         Object {
-          "link": <a
-            href="http://github.enterprise.com/PROJECT_KEY/settings/hooks"
-            rel="noopener noreferrer"
+          "link": <ForwardRef(Link)
             target="_blank"
+            to="http://github.enterprise.com/PROJECT_KEY/settings/hooks"
           >
             onboarding.tutorial.with.jenkins.webhook.github.step1.link
-          </a>,
+          </ForwardRef(Link)>,
         }
       }
     />
index df037f76a29a305a53ca19bf011f8af611264f51..292bdc4387eac548f1eee82e23641387ced4a000 100644 (file)
@@ -19,9 +19,9 @@
  */
 import * as React from 'react';
 import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
 import { translate } from '../../../helpers/l10n';
 import { Component } from '../../../types/types';
+import Link from '../../common/Link';
 
 export interface DoneNextStepsProps {
   component: Component;
index d6d9086250633e5512974c7477333ff4a67d4256..63f9725f011872377812fa9441b289214f23a90d 100644 (file)
@@ -19,7 +19,6 @@
  */
 import * as React from 'react';
 import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
 import { generateToken, getTokens, revokeToken } from '../../../api/user-tokens';
 import { translate } from '../../../helpers/l10n';
 import {
@@ -30,6 +29,7 @@ import {
 import { TokenExpiration, TokenType, UserToken } from '../../../types/token';
 import { LoggedInUser } from '../../../types/users';
 import DocumentationTooltip from '../../common/DocumentationTooltip';
+import Link from '../../common/Link';
 import { Button, DeleteButton, SubmitButton } from '../../controls/buttons';
 import Radio from '../../controls/Radio';
 import Select from '../../controls/Select';
index 31694bcce7bb31572ceddfed35000ddbfb51b5ab..c5c553d13406e7cd96735d420ad674c72672cab7 100644 (file)
@@ -25,20 +25,20 @@ exports[`should render correctly: default 1`] = `
       id="onboarding.analysis.auto_refresh_after_analysis.check_these_links"
       values={
         Object {
-          "link_branches": <Link
+          "link_branches": <ForwardRef(Link)
             rel="noopener noreferrer"
             target="_blank"
             to="/documentation/branches/overview/"
           >
             onboarding.analysis.auto_refresh_after_analysis.check_these_links.branches
-          </Link>,
-          "link_pr_analysis": <Link
+          </ForwardRef(Link)>,
+          "link_pr_analysis": <ForwardRef(Link)
             rel="noopener noreferrer"
             target="_blank"
             to="/documentation/analysis/pull-request/"
           >
             onboarding.analysis.auto_refresh_after_analysis.check_these_links.pr_analysis
-          </Link>,
+          </ForwardRef(Link)>,
         }
       }
     />
@@ -71,20 +71,20 @@ exports[`should render correctly: project admin 1`] = `
       id="onboarding.analysis.auto_refresh_after_analysis.check_these_links"
       values={
         Object {
-          "link_branches": <Link
+          "link_branches": <ForwardRef(Link)
             rel="noopener noreferrer"
             target="_blank"
             to="/documentation/branches/overview/"
           >
             onboarding.analysis.auto_refresh_after_analysis.check_these_links.branches
-          </Link>,
-          "link_pr_analysis": <Link
+          </ForwardRef(Link)>,
+          "link_pr_analysis": <ForwardRef(Link)
             rel="noopener noreferrer"
             target="_blank"
             to="/documentation/analysis/pull-request/"
           >
             onboarding.analysis.auto_refresh_after_analysis.check_these_links.pr_analysis
-          </Link>,
+          </ForwardRef(Link)>,
         }
       }
     />
index 2c05c134d6ac929748e78b626702ec1385fba2f4..caeabbe63ae99d93672061b2a0a3b1212a63b5e2 100644 (file)
@@ -144,12 +144,12 @@ exports[`generates token 1`] = `
           id="onboarding.token.text"
           values={
             Object {
-              "link": <Link
+              "link": <ForwardRef(Link)
                 target="_blank"
                 to="/account/security"
               >
                 onboarding.token.text.user_account
-              </Link>,
+              </ForwardRef(Link)>,
             }
           }
         />
@@ -300,12 +300,12 @@ exports[`generates token 2`] = `
           id="onboarding.token.text"
           values={
             Object {
-              "link": <Link
+              "link": <ForwardRef(Link)
                 target="_blank"
                 to="/account/security"
               >
                 onboarding.token.text.user_account
-              </Link>,
+              </ForwardRef(Link)>,
             }
           }
         />
@@ -364,12 +364,12 @@ exports[`generates token 3`] = `
           id="onboarding.token.text"
           values={
             Object {
-              "link": <Link
+              "link": <ForwardRef(Link)
                 target="_blank"
                 to="/account/security"
               >
                 onboarding.token.text.user_account
-              </Link>,
+              </ForwardRef(Link)>,
             }
           }
         />
@@ -438,12 +438,12 @@ exports[`revokes token 1`] = `
           id="onboarding.token.text"
           values={
             Object {
-              "link": <Link
+              "link": <ForwardRef(Link)
                 target="_blank"
                 to="/account/security"
               >
                 onboarding.token.text.user_account
-              </Link>,
+              </ForwardRef(Link)>,
             }
           }
         />
@@ -511,12 +511,12 @@ exports[`revokes token 2`] = `
           id="onboarding.token.text"
           values={
             Object {
-              "link": <Link
+              "link": <ForwardRef(Link)
                 target="_blank"
                 to="/account/security"
               >
                 onboarding.token.text.user_account
-              </Link>,
+              </ForwardRef(Link)>,
             }
           }
         />
@@ -680,12 +680,12 @@ exports[`revokes token 3`] = `
           id="onboarding.token.text"
           values={
             Object {
-              "link": <Link
+              "link": <ForwardRef(Link)
                 target="_blank"
                 to="/account/security"
               >
                 onboarding.token.text.user_account
-              </Link>,
+              </ForwardRef(Link)>,
             }
           }
         />
index b2840c55b8e7be716ff73bd34172a22a228af330..2a97d7cb8b248b58a8932084712e501407998021 100644 (file)
  */
 import * as React from 'react';
 import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
 import { translate } from '../../../../helpers/l10n';
 import { Component } from '../../../../types/types';
 import CodeSnippet from '../../../common/CodeSnippet';
 import InstanceMessage from '../../../common/InstanceMessage';
+import Link from '../../../common/Link';
 import DoneNextSteps from '../DoneNextSteps';
 
 export interface DotNetExecuteProps {
index daab033765a83277e6f8cc71c0fa5410f86d2d71..b8846a24cb890d38f1678c01add1a9435b8d78ac 100644 (file)
@@ -20,6 +20,7 @@
 import * as React from 'react';
 import { FormattedMessage } from 'react-intl';
 import { translate } from '../../../../helpers/l10n';
+import Link from '../../../common/Link';
 import { DotNetProps } from './DotNet';
 import DotNetExecute from './DotNetExecute';
 
@@ -45,12 +46,11 @@ export default function DotNetFramework(props: DotNetProps) {
             values={{
               code: <code>%PATH%</code>,
               link: (
-                <a
-                  href="https://redirect.sonarsource.com/doc/download-scanner-msbuild.html"
-                  rel="noopener noreferrer"
+                <Link
+                  to="https://redirect.sonarsource.com/doc/download-scanner-msbuild.html"
                   target="_blank">
                   {translate('onboarding.analysis.msbuild.docs_link')}
-                </a>
+                </Link>
               )
             }}
           />
index ba9866a8b58d7dd84d7cf5efbf6b4503e3a3e707..b9e5ed783048e03b025a5a71e14a45743deebddc 100644 (file)
@@ -21,6 +21,7 @@ import * as React from 'react';
 import { FormattedMessage } from 'react-intl';
 import { translate } from '../../../../helpers/l10n';
 import CodeSnippet from '../../../common/CodeSnippet';
+import Link from '../../../common/Link';
 import { ClipboardButton } from '../../../controls/clipboard';
 import { OSs } from '../../types';
 
@@ -45,12 +46,11 @@ export default function DownloadScanner(props: DownloadScannerProps) {
               dir: <code>bin</code>,
               env_var: <code>{os === OSs.Windows ? '%PATH%' : 'PATH'}</code>,
               link: (
-                <a
-                  href="https://redirect.sonarsource.com/doc/download-scanner.html"
-                  rel="noopener noreferrer"
+                <Link
+                  to="https://redirect.sonarsource.com/doc/download-scanner.html"
                   target="_blank">
                   {translate('onboarding.analysis.sq_scanner.docs_link')}
-                </a>
+                </Link>
               )
             }}
           />
index a359e2bae1a8a375a13ee35ba98f6965c67c4277..8d752b03e12e7066b4bef3eb8770f9552c813c29 100644 (file)
@@ -19,9 +19,9 @@
  */
 import * as React from 'react';
 import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
 import { translate } from '../../../../helpers/l10n';
 import CodeSnippet from '../../../common/CodeSnippet';
+import Link from '../../../common/Link';
 import { OSs } from '../../types';
 
 export interface ExecBuildWrapperProps {
index 32cb66a4e71a0aec6e69ab07fda86d2dc8f3c04a..c1d2c035f18d9142f015a58d6869232a6968891e 100644 (file)
  */
 import * as React from 'react';
 import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
 import { translate } from '../../../../helpers/l10n';
 import { Component } from '../../../../types/types';
 import CodeSnippet from '../../../common/CodeSnippet';
 import InstanceMessage from '../../../common/InstanceMessage';
+import Link from '../../../common/Link';
 import { OSs } from '../../types';
 import { quote } from '../../utils';
 import DoneNextSteps from '../DoneNextSteps';
index b640f69b70a10c89228b34488029729efc20d8eb..afe3ed0030db9c99489417280a82cf982cbf77f9 100644 (file)
  */
 import * as React from 'react';
 import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
 import { translate } from '../../../../helpers/l10n';
 import { Component } from '../../../../types/types';
 import CodeSnippet from '../../../common/CodeSnippet';
 import InstanceMessage from '../../../common/InstanceMessage';
+import Link from '../../../common/Link';
 import DoneNextSteps from '../DoneNextSteps';
 
 export interface JavaGradleProps {
index f56b9be740e8614651544514214098fcc19678a7..5a939f2a36cad38d3bd12873851f061ad2498011 100644 (file)
  */
 import * as React from 'react';
 import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router-dom';
 import { translate } from '../../../../helpers/l10n';
 import { Component } from '../../../../types/types';
 import CodeSnippet from '../../../common/CodeSnippet';
 import InstanceMessage from '../../../common/InstanceMessage';
+import Link from '../../../common/Link';
 import DoneNextSteps from '../DoneNextSteps';
 
 export interface JavaMavenProps {
index a921c78ff666855034c72f3191031a0e2414c4a9..8c2722936e3eeb8f7716341be91c7cf6cc6d649b 100644 (file)
@@ -28,12 +28,12 @@ exports[`should render correctly 1`] = `
       id="onboarding.analysis.docs"
       values={
         Object {
-          "link": <Link
+          "link": <ForwardRef(Link)
             target="_blank"
             to="/documentation/analysis/scan/sonarscanner-for-msbuild/"
           >
             onboarding.analysis.msbuild.docs_link
-          </Link>,
+          </ForwardRef(Link)>,
         }
       }
     />
index 13edb7d737070660a8587f5e24d1bfd081dba2bc..df672edf162a5a7b7ecddc6ca0b7761ad8544184 100644 (file)
@@ -19,13 +19,12 @@ exports[`should render correctly 1`] = `
             "code": <code>
               %PATH%
             </code>,
-            "link": <a
-              href="https://redirect.sonarsource.com/doc/download-scanner-msbuild.html"
-              rel="noopener noreferrer"
+            "link": <ForwardRef(Link)
               target="_blank"
+              to="https://redirect.sonarsource.com/doc/download-scanner-msbuild.html"
             >
               onboarding.analysis.msbuild.docs_link
-            </a>,
+            </ForwardRef(Link)>,
           }
         }
       />
index 60bf449f25bd7f367ad7f2355cb1d9723bc90414..bcd72311a9de71c0733d92c5af7d7a40b57fa2d7 100644 (file)
@@ -21,13 +21,12 @@ exports[`should render correctly for "linux": local 1`] = `
           "env_var": <code>
             PATH
           </code>,
-          "link": <a
-            href="https://redirect.sonarsource.com/doc/download-scanner.html"
-            rel="noopener noreferrer"
+          "link": <ForwardRef(Link)
             target="_blank"
+            to="https://redirect.sonarsource.com/doc/download-scanner.html"
           >
             onboarding.analysis.sq_scanner.docs_link
-          </a>,
+          </ForwardRef(Link)>,
         }
       }
     />
@@ -112,13 +111,12 @@ exports[`should render correctly for "mac": local 1`] = `
           "env_var": <code>
             PATH
           </code>,
-          "link": <a
-            href="https://redirect.sonarsource.com/doc/download-scanner.html"
-            rel="noopener noreferrer"
+          "link": <ForwardRef(Link)
             target="_blank"
+            to="https://redirect.sonarsource.com/doc/download-scanner.html"
           >
             onboarding.analysis.sq_scanner.docs_link
-          </a>,
+          </ForwardRef(Link)>,
         }
       }
     />
@@ -203,13 +201,12 @@ exports[`should render correctly for "win": local 1`] = `
           "env_var": <code>
             %PATH%
           </code>,
-          "link": <a
-            href="https://redirect.sonarsource.com/doc/download-scanner.html"
-            rel="noopener noreferrer"
+          "link": <ForwardRef(Link)
             target="_blank"
+            to="https://redirect.sonarsource.com/doc/download-scanner.html"
           >
             onboarding.analysis.sq_scanner.docs_link
-          </a>,
+          </ForwardRef(Link)>,
         }
       }
     />
index 68e585ff3203a1faabb31d89c42b46cea92507c0..4060e8cf706a1da86879acfbc43d4721ff7a733d 100644 (file)
@@ -23,12 +23,12 @@ exports[`Shoud renders for "linux" correctly 1`] = `
       id="onboarding.analysis.build_wrapper.docs"
       values={
         Object {
-          "link": <Link
+          "link": <ForwardRef(Link)
             target="_blank"
             to="/documentation/analysis/languages/cfamily/"
           >
             onboarding.analysis.build_wrapper.docs_link
-          </Link>,
+          </ForwardRef(Link)>,
         }
       }
     />
@@ -59,12 +59,12 @@ exports[`Shoud renders for "mac" correctly 1`] = `
       id="onboarding.analysis.build_wrapper.docs"
       values={
         Object {
-          "link": <Link
+          "link": <ForwardRef(Link)
             target="_blank"
             to="/documentation/analysis/languages/cfamily/"
           >
             onboarding.analysis.build_wrapper.docs_link
-          </Link>,
+          </ForwardRef(Link)>,
         }
       }
     />
@@ -95,12 +95,12 @@ exports[`Shoud renders for "win" correctly 1`] = `
       id="onboarding.analysis.build_wrapper.docs"
       values={
         Object {
-          "link": <Link
+          "link": <ForwardRef(Link)
             target="_blank"
             to="/documentation/analysis/languages/cfamily/"
           >
             onboarding.analysis.build_wrapper.docs_link
-          </Link>,
+          </ForwardRef(Link)>,
         }
       }
     />
index 5b50e97c353eb5f38afbf3526e29ae4e29a529a1..b4b780f819fa5ef652d7d1e5a9d08da476868f72 100644 (file)
@@ -33,12 +33,12 @@ exports[`should render correctly for "linux" 1`] = `
       id="onboarding.analysis.sq_scanner.docs"
       values={
         Object {
-          "link": <Link
+          "link": <ForwardRef(Link)
             target="_blank"
             to="/documentation/analysis/scan/sonarscanner/"
           >
             onboarding.analysis.sq_scanner.docs_link
-          </Link>,
+          </ForwardRef(Link)>,
         }
       }
     />
@@ -103,12 +103,12 @@ exports[`should render correctly for "mac" 1`] = `
       id="onboarding.analysis.sq_scanner.docs"
       values={
         Object {
-          "link": <Link
+          "link": <ForwardRef(Link)
             target="_blank"
             to="/documentation/analysis/scan/sonarscanner/"
           >
             onboarding.analysis.sq_scanner.docs_link
-          </Link>,
+          </ForwardRef(Link)>,
         }
       }
     />
@@ -173,12 +173,12 @@ exports[`should render correctly for "win" 1`] = `
       id="onboarding.analysis.sq_scanner.docs"
       values={
         Object {
-          "link": <Link
+          "link": <ForwardRef(Link)
             target="_blank"
             to="/documentation/analysis/scan/sonarscanner/"
           >
             onboarding.analysis.sq_scanner.docs_link
-          </Link>,
+          </ForwardRef(Link)>,
         }
       }
     />
@@ -243,12 +243,12 @@ exports[`should render correctly for cfamily 1`] = `
       id="onboarding.analysis.sq_scanner.docs"
       values={
         Object {
-          "link": <Link
+          "link": <ForwardRef(Link)
             target="_blank"
             to="/documentation/analysis/scan/sonarscanner/"
           >
             onboarding.analysis.sq_scanner.docs_link
-          </Link>,
+          </ForwardRef(Link)>,
         }
       }
     />
@@ -313,12 +313,12 @@ exports[`should render correctly for remote execution 1`] = `
       id="onboarding.analysis.sq_scanner.docs"
       values={
         Object {
-          "link": <Link
+          "link": <ForwardRef(Link)
             target="_blank"
             to="/documentation/analysis/scan/sonarscanner/"
           >
             onboarding.analysis.sq_scanner.docs_link
-          </Link>,
+          </ForwardRef(Link)>,
         }
       }
     />
index fc132dddb80ff56bca5bb43527869283aedc1fb7..a980bc7303efbf205dda1e3f1122a211b2ff7e21 100644 (file)
@@ -28,12 +28,12 @@ exports[`renders correctly 1`] = `
         id="onboarding.analysis.java.gradle.latest_version"
         values={
           Object {
-            "link": <Link
+            "link": <ForwardRef(Link)
               target="_blank"
               to="/documentation/analysis/scan/sonarscanner-for-gradle/"
             >
               here
-            </Link>,
+            </ForwardRef(Link)>,
           }
         }
       />
@@ -62,12 +62,12 @@ exports[`renders correctly 1`] = `
       id="onboarding.analysis.docs"
       values={
         Object {
-          "link": <Link
+          "link": <ForwardRef(Link)
             target="_blank"
             to="/documentation/analysis/scan/sonarscanner-for-gradle/"
           >
             onboarding.analysis.java.gradle.docs_link
-          </Link>,
+          </ForwardRef(Link)>,
         }
       }
     />
index 970c7f620cc0507043b0aa9bf33eab7d23ffd414..f91c2cc29cca198a8f10f8c34716468015faf3e8 100644 (file)
@@ -32,12 +32,12 @@ exports[`renders correctly 1`] = `
       id="onboarding.analysis.docs"
       values={
         Object {
-          "link": <Link
+          "link": <ForwardRef(Link)
             target="_blank"
             to="/documentation/analysis/scan/sonarscanner-for-maven/"
           >
             onboarding.analysis.java.maven.docs_link
-          </Link>,
+          </ForwardRef(Link)>,
         }
       }
     />
index d78e057f2f6bab18819c92d31ece330c62ea131f..b66d51822bb67fefaaf345f05cb83901dfb17ae1 100644 (file)
@@ -24,6 +24,7 @@ import { translate } from '../../helpers/l10n';
 import { AppState } from '../../types/appstate';
 import { EditionKey } from '../../types/editions';
 import { SystemUpgrade } from '../../types/system';
+import Link from '../common/Link';
 import { ResetButtonLink } from '../controls/buttons';
 import Modal from '../controls/Modal';
 import { Alert, AlertVariant } from '../ui/Alert';
@@ -106,13 +107,12 @@ export class SystemUpgradeForm extends React.PureComponent<Props, State> {
         </div>
         <div className="modal-foot">
           {upgrading && <i className="spinner spacer-right" />}
-          <a
-            className="pull-left"
-            href="https://www.sonarqube.org/downloads/?referrer=sonarqube"
-            rel="noopener noreferrer"
+          <Link
+            className="pull-left link-no-underline display-flex-center"
+            to="https://www.sonarqube.org/downloads/?referrer=sonarqube"
             target="_blank">
             {translate('system.see_sonarqube_downloads')}
-          </a>
+          </Link>
           <ResetButtonLink onClick={this.props.onClose}>{translate('cancel')}</ResetButtonLink>
         </div>
       </Modal>
index 55b5a316eadf3326364905e7d9f1dec1bfc24e9c..7309a165e90d65adec7d252bfb92a7187ff14f8f 100644 (file)
@@ -27,6 +27,7 @@ import {
 import { translate, translateWithParameters } from '../../helpers/l10n';
 import { EditionKey } from '../../types/editions';
 import { SystemUpgrade } from '../../types/system';
+import Link from '../common/Link';
 import DateFormatter from '../intl/DateFormatter';
 import SystemUpgradeIntermediate from './SystemUpgradeIntermediate';
 
@@ -56,13 +57,12 @@ export default function SystemUpgradeItem(props: SystemUpgradeItemProps) {
       <h3 className="h1 spacer-bottom">
         <strong>{header}</strong>
         {!isPatch && (
-          <a
+          <Link
             className="spacer-left medium"
-            href="https://www.sonarqube.org/whats-new/?referrer=sonarqube"
-            rel="noopener noreferrer"
+            to="https://www.sonarqube.org/whats-new/?referrer=sonarqube"
             target="_blank">
             {translate('system.see_whats_new')}
-          </a>
+          </Link>
         )}
       </h3>
       <p>
@@ -82,13 +82,9 @@ export default function SystemUpgradeItem(props: SystemUpgradeItemProps) {
           </DateFormatter>
         )}
         {lastUpgrade.changeLogUrl && (
-          <a
-            className="spacer-left"
-            href={lastUpgrade.changeLogUrl}
-            rel="noopener noreferrer"
-            target="_blank">
+          <Link className="spacer-left" to={lastUpgrade.changeLogUrl} target="_blank">
             {translate('system.release_notes')}
-          </a>
+          </Link>
         )}
       </div>
       <SystemUpgradeIntermediate className="spacer-top" upgrades={systemUpgrades.slice(1)} />
@@ -101,13 +97,12 @@ export default function SystemUpgradeItem(props: SystemUpgradeItemProps) {
           target="_blank">
           {translateWithParameters('system.download_x', lastUpgrade.version)}
         </a>
-        <a
+        <Link
           className="spacer-left"
-          href="https://redirect.sonarsource.com/doc/upgrading.html"
-          rel="noopener noreferrer"
+          to="https://redirect.sonarsource.com/doc/upgrading.html"
           target="_blank">
           {translate('system.how_to_upgrade')}
-        </a>
+        </Link>
       </div>
     </div>
   );
index 1a0e6083eb72f58df912729967876b5865cc2940..8908270162ddf9439799f2edfd2c836382ddd862 100644 (file)
@@ -79,14 +79,13 @@ exports[`should display correctly for new_minor_version 1`] = `
   <div
     className="modal-foot"
   >
-    <a
-      className="pull-left"
-      href="https://www.sonarqube.org/downloads/?referrer=sonarqube"
-      rel="noopener noreferrer"
+    <ForwardRef(Link)
+      className="pull-left link-no-underline display-flex-center"
       target="_blank"
+      to="https://www.sonarqube.org/downloads/?referrer=sonarqube"
     >
       system.see_sonarqube_downloads
-    </a>
+    </ForwardRef(Link)>
     <ResetButtonLink
       onClick={[MockFunction]}
     >
@@ -181,14 +180,13 @@ exports[`should display correctly for new_patch 1`] = `
   <div
     className="modal-foot"
   >
-    <a
-      className="pull-left"
-      href="https://www.sonarqube.org/downloads/?referrer=sonarqube"
-      rel="noopener noreferrer"
+    <ForwardRef(Link)
+      className="pull-left link-no-underline display-flex-center"
       target="_blank"
+      to="https://www.sonarqube.org/downloads/?referrer=sonarqube"
     >
       system.see_sonarqube_downloads
-    </a>
+    </ForwardRef(Link)>
     <ResetButtonLink
       onClick={[MockFunction]}
     >
@@ -283,14 +281,13 @@ exports[`should display correctly for pre_lts 1`] = `
   <div
     className="modal-foot"
   >
-    <a
-      className="pull-left"
-      href="https://www.sonarqube.org/downloads/?referrer=sonarqube"
-      rel="noopener noreferrer"
+    <ForwardRef(Link)
+      className="pull-left link-no-underline display-flex-center"
       target="_blank"
+      to="https://www.sonarqube.org/downloads/?referrer=sonarqube"
     >
       system.see_sonarqube_downloads
-    </a>
+    </ForwardRef(Link)>
     <ResetButtonLink
       onClick={[MockFunction]}
     >
@@ -385,14 +382,13 @@ exports[`should display correctly for previous_lts 1`] = `
   <div
     className="modal-foot"
   >
-    <a
-      className="pull-left"
-      href="https://www.sonarqube.org/downloads/?referrer=sonarqube"
-      rel="noopener noreferrer"
+    <ForwardRef(Link)
+      className="pull-left link-no-underline display-flex-center"
       target="_blank"
+      to="https://www.sonarqube.org/downloads/?referrer=sonarqube"
     >
       system.see_sonarqube_downloads
-    </a>
+    </ForwardRef(Link)>
     <ResetButtonLink
       onClick={[MockFunction]}
     >
@@ -481,14 +477,13 @@ exports[`should display correctly for undefined 1`] = `
   <div
     className="modal-foot"
   >
-    <a
-      className="pull-left"
-      href="https://www.sonarqube.org/downloads/?referrer=sonarqube"
-      rel="noopener noreferrer"
+    <ForwardRef(Link)
+      className="pull-left link-no-underline display-flex-center"
       target="_blank"
+      to="https://www.sonarqube.org/downloads/?referrer=sonarqube"
     >
       system.see_sonarqube_downloads
-    </a>
+    </ForwardRef(Link)>
     <ResetButtonLink
       onClick={[MockFunction]}
     >
index 849ff677a1d174df7bd74a60721a836baf0f630a..67c4841b4560bc54fc616391a65f00628b01ea12 100644 (file)
@@ -10,14 +10,13 @@ exports[`should display correctly 1`] = `
     <strong>
       system.latest_version
     </strong>
-    <a
+    <ForwardRef(Link)
       className="spacer-left medium"
-      href="https://www.sonarqube.org/whats-new/?referrer=sonarqube"
-      rel="noopener noreferrer"
       target="_blank"
+      to="https://www.sonarqube.org/whats-new/?referrer=sonarqube"
     >
       system.see_whats_new
-    </a>
+    </ForwardRef(Link)>
   </h3>
   <p>
     <FormattedMessage
@@ -47,14 +46,13 @@ exports[`should display correctly 1`] = `
     >
       <Component />
     </DateFormatter>
-    <a
+    <ForwardRef(Link)
       className="spacer-left"
-      href="http://changelog.url/"
-      rel="noopener noreferrer"
       target="_blank"
+      to="http://changelog.url/"
     >
       system.release_notes
-    </a>
+    </ForwardRef(Link)>
   </div>
   <SystemUpgradeIntermediate
     className="spacer-top"
@@ -91,14 +89,13 @@ exports[`should display correctly 1`] = `
     >
       system.download_x.5.6.7
     </a>
-    <a
+    <ForwardRef(Link)
       className="spacer-left"
-      href="https://redirect.sonarsource.com/doc/upgrading.html"
-      rel="noopener noreferrer"
       target="_blank"
+      to="https://redirect.sonarsource.com/doc/upgrading.html"
     >
       system.how_to_upgrade
-    </a>
+    </ForwardRef(Link)>
   </div>
 </div>
 `;
@@ -113,14 +110,13 @@ exports[`should display correctly 2`] = `
     <strong>
       system.lts_version
     </strong>
-    <a
+    <ForwardRef(Link)
       className="spacer-left medium"
-      href="https://www.sonarqube.org/whats-new/?referrer=sonarqube"
-      rel="noopener noreferrer"
       target="_blank"
+      to="https://www.sonarqube.org/whats-new/?referrer=sonarqube"
     >
       system.see_whats_new
-    </a>
+    </ForwardRef(Link)>
   </h3>
   <p>
     <FormattedMessage
@@ -150,14 +146,13 @@ exports[`should display correctly 2`] = `
     >
       <Component />
     </DateFormatter>
-    <a
+    <ForwardRef(Link)
       className="spacer-left"
-      href="http://changelog.url/"
-      rel="noopener noreferrer"
       target="_blank"
+      to="http://changelog.url/"
     >
       system.release_notes
-    </a>
+    </ForwardRef(Link)>
   </div>
   <SystemUpgradeIntermediate
     className="spacer-top"
@@ -194,14 +189,13 @@ exports[`should display correctly 2`] = `
     >
       system.download_x.5.6.7
     </a>
-    <a
+    <ForwardRef(Link)
       className="spacer-left"
-      href="https://redirect.sonarsource.com/doc/upgrading.html"
-      rel="noopener noreferrer"
       target="_blank"
+      to="https://redirect.sonarsource.com/doc/upgrading.html"
     >
       system.how_to_upgrade
-    </a>
+    </ForwardRef(Link)>
   </div>
 </div>
 `;
@@ -245,14 +239,13 @@ exports[`should display correctly 3`] = `
     >
       <Component />
     </DateFormatter>
-    <a
+    <ForwardRef(Link)
       className="spacer-left"
-      href="http://changelog.url/"
-      rel="noopener noreferrer"
       target="_blank"
+      to="http://changelog.url/"
     >
       system.release_notes
-    </a>
+    </ForwardRef(Link)>
   </div>
   <SystemUpgradeIntermediate
     className="spacer-top"
@@ -289,14 +282,13 @@ exports[`should display correctly 3`] = `
     >
       system.download_x.5.6.7
     </a>
-    <a
+    <ForwardRef(Link)
       className="spacer-left"
-      href="https://redirect.sonarsource.com/doc/upgrading.html"
-      rel="noopener noreferrer"
       target="_blank"
+      to="https://redirect.sonarsource.com/doc/upgrading.html"
     >
       system.how_to_upgrade
-    </a>
+    </ForwardRef(Link)>
   </div>
 </div>
 `;
@@ -311,14 +303,13 @@ exports[`should display correctly 4`] = `
     <strong>
       system.latest_version
     </strong>
-    <a
+    <ForwardRef(Link)
       className="spacer-left medium"
-      href="https://www.sonarqube.org/whats-new/?referrer=sonarqube"
-      rel="noopener noreferrer"
       target="_blank"
+      to="https://www.sonarqube.org/whats-new/?referrer=sonarqube"
     >
       system.see_whats_new
-    </a>
+    </ForwardRef(Link)>
   </h3>
   <p>
     <FormattedMessage
@@ -348,14 +339,13 @@ exports[`should display correctly 4`] = `
     >
       <Component />
     </DateFormatter>
-    <a
+    <ForwardRef(Link)
       className="spacer-left"
-      href="http://changelog.url/"
-      rel="noopener noreferrer"
       target="_blank"
+      to="http://changelog.url/"
     >
       system.release_notes
-    </a>
+    </ForwardRef(Link)>
   </div>
   <SystemUpgradeIntermediate
     className="spacer-top"
@@ -392,14 +382,13 @@ exports[`should display correctly 4`] = `
     >
       system.download_x.5.6.7
     </a>
-    <a
+    <ForwardRef(Link)
       className="spacer-left"
-      href="https://redirect.sonarsource.com/doc/upgrading.html"
-      rel="noopener noreferrer"
       target="_blank"
+      to="https://redirect.sonarsource.com/doc/upgrading.html"
     >
       system.how_to_upgrade
-    </a>
+    </ForwardRef(Link)>
   </div>
 </div>
 `;
@@ -414,14 +403,13 @@ exports[`should display correctly 5`] = `
     <strong>
       system.latest_version
     </strong>
-    <a
+    <ForwardRef(Link)
       className="spacer-left medium"
-      href="https://www.sonarqube.org/whats-new/?referrer=sonarqube"
-      rel="noopener noreferrer"
       target="_blank"
+      to="https://www.sonarqube.org/whats-new/?referrer=sonarqube"
     >
       system.see_whats_new
-    </a>
+    </ForwardRef(Link)>
   </h3>
   <p>
     <FormattedMessage
@@ -451,14 +439,13 @@ exports[`should display correctly 5`] = `
     >
       <Component />
     </DateFormatter>
-    <a
+    <ForwardRef(Link)
       className="spacer-left"
-      href="http://changelog.url/"
-      rel="noopener noreferrer"
       target="_blank"
+      to="http://changelog.url/"
     >
       system.release_notes
-    </a>
+    </ForwardRef(Link)>
   </div>
   <SystemUpgradeIntermediate
     className="spacer-top"
@@ -495,14 +482,13 @@ exports[`should display correctly 5`] = `
     >
       system.download_x.5.6.7
     </a>
-    <a
+    <ForwardRef(Link)
       className="spacer-left"
-      href="https://redirect.sonarsource.com/doc/upgrading.html"
-      rel="noopener noreferrer"
       target="_blank"
+      to="https://redirect.sonarsource.com/doc/upgrading.html"
     >
       system.how_to_upgrade
-    </a>
+    </ForwardRef(Link)>
   </div>
 </div>
 `;
@@ -517,14 +503,13 @@ exports[`should display correctly 6`] = `
     <strong>
       system.latest_version
     </strong>
-    <a
+    <ForwardRef(Link)
       className="spacer-left medium"
-      href="https://www.sonarqube.org/whats-new/?referrer=sonarqube"
-      rel="noopener noreferrer"
       target="_blank"
+      to="https://www.sonarqube.org/whats-new/?referrer=sonarqube"
     >
       system.see_whats_new
-    </a>
+    </ForwardRef(Link)>
   </h3>
   <p>
     <FormattedMessage
@@ -554,14 +539,13 @@ exports[`should display correctly 6`] = `
     >
       <Component />
     </DateFormatter>
-    <a
+    <ForwardRef(Link)
       className="spacer-left"
-      href="http://changelog.url/"
-      rel="noopener noreferrer"
       target="_blank"
+      to="http://changelog.url/"
     >
       system.release_notes
-    </a>
+    </ForwardRef(Link)>
   </div>
   <SystemUpgradeIntermediate
     className="spacer-top"
@@ -598,14 +582,13 @@ exports[`should display correctly 6`] = `
     >
       system.download_x.5.6.7
     </a>
-    <a
+    <ForwardRef(Link)
       className="spacer-left"
-      href="https://redirect.sonarsource.com/doc/upgrading.html"
-      rel="noopener noreferrer"
       target="_blank"
+      to="https://redirect.sonarsource.com/doc/upgrading.html"
     >
       system.how_to_upgrade
-    </a>
+    </ForwardRef(Link)>
   </div>
 </div>
 `;
@@ -620,14 +603,13 @@ exports[`should display correctly 7`] = `
     <strong>
       system.latest_version
     </strong>
-    <a
+    <ForwardRef(Link)
       className="spacer-left medium"
-      href="https://www.sonarqube.org/whats-new/?referrer=sonarqube"
-      rel="noopener noreferrer"
       target="_blank"
+      to="https://www.sonarqube.org/whats-new/?referrer=sonarqube"
     >
       system.see_whats_new
-    </a>
+    </ForwardRef(Link)>
   </h3>
   <p>
     <FormattedMessage
@@ -657,14 +639,13 @@ exports[`should display correctly 7`] = `
     >
       <Component />
     </DateFormatter>
-    <a
+    <ForwardRef(Link)
       className="spacer-left"
-      href="http://changelog.url/"
-      rel="noopener noreferrer"
       target="_blank"
+      to="http://changelog.url/"
     >
       system.release_notes
-    </a>
+    </ForwardRef(Link)>
   </div>
   <SystemUpgradeIntermediate
     className="spacer-top"
@@ -682,14 +663,13 @@ exports[`should display correctly 7`] = `
     >
       system.download_x.5.6.7
     </a>
-    <a
+    <ForwardRef(Link)
       className="spacer-left"
-      href="https://redirect.sonarsource.com/doc/upgrading.html"
-      rel="noopener noreferrer"
       target="_blank"
+      to="https://redirect.sonarsource.com/doc/upgrading.html"
     >
       system.how_to_upgrade
-    </a>
+    </ForwardRef(Link)>
   </div>
 </div>
 `;
index 21ea123bd26c894957ba609101d65d2feef743d4..0c2c61e5ee25f45c7ce94d8e4a3bcc1333a65310 100644 (file)
@@ -19,7 +19,7 @@
  */
 import { SystemUpgrade } from '../../types/system';
 
-export function mockUpgrades(override: Partial<SystemUpgrade>): SystemUpgrade {
+export function mockSystemUpgrade(override: Partial<SystemUpgrade> = {}): SystemUpgrade {
   return {
     version: '5.6.7',
     description: 'Version 5.6.7 description',
index e8b7b629d87ce0c492a4242b5f5870045710f014..633911af4fef27dfbcc57c6802c042888c2aa49c 100644 (file)
@@ -279,6 +279,7 @@ no_results_search=We couldn't find any results matching selected criteria.
 no_results_search.favorites=We couldn't find any results matching selected criteria in your favorites.
 no_results_search.2=Try to change filters to get some results.
 no_results_search.favorites.2=Would you like to search among {url} projects?
+opens_in_new_window=Opens in a new window
 page_extension_failed=Page extension failed.
 page_not_found=The page you were looking for does not exist.
 please_contact_administrator=Please contact the instance administrator.