aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps
diff options
context:
space:
mode:
authorGrégoire Aubert <gregoire.aubert@sonarsource.com>2020-01-03 13:44:12 +0100
committerSonarTech <sonartech@sonarsource.com>2020-01-08 20:46:11 +0100
commit279deef3e8534bba914245ccf10610a459073640 (patch)
tree22cfcf63ecee905641dfd3bc76043c0cfb2843f1 /server/sonar-web/src/main/js/apps
parent3365182508367bfcc080452d7cf932f9cfbf8c1b (diff)
downloadsonarqube-279deef3e8534bba914245ccf10610a459073640.tar.gz
sonarqube-279deef3e8534bba914245ccf10610a459073640.zip
SONAR-12429 Fix 404 when opening embedded documentation in new tab
Cherry-pick of SC-1304
Diffstat (limited to 'server/sonar-web/src/main/js/apps')
-rw-r--r--server/sonar-web/src/main/js/apps/about/sonarcloud/AsAService.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/about/sonarcloud/AzureDevOps.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/about/sonarcloud/BranchAnalysis.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/about/sonarcloud/Contact.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/about/sonarcloud/Home.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/about/sonarcloud/Pricing.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/about/sonarcloud/SQHome.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/about/sonarcloud/SonarLintIntegration.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/about/sonarcloud/__tests__/__snapshots__/Home-test.tsx.snap4
-rw-r--r--server/sonar-web/src/main/js/apps/account/components/Account.tsx4
-rw-r--r--server/sonar-web/src/main/js/apps/account/components/Security.tsx4
-rw-r--r--server/sonar-web/src/main/js/apps/account/components/__tests__/__snapshots__/Account-test.tsx.snap4
-rw-r--r--server/sonar-web/src/main/js/apps/account/notifications/Notifications.tsx4
-rw-r--r--server/sonar-web/src/main/js/apps/account/notifications/__tests__/__snapshots__/Notifications-test.tsx.snap12
-rw-r--r--server/sonar-web/src/main/js/apps/account/organizations/UserOrganizations.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/account/projects/ProjectsContainer.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/background-tasks/components/BackgroundTasksApp.tsx4
-rw-r--r--server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/__snapshots__/BackgroundTasksApp-test.tsx.snap4
-rw-r--r--server/sonar-web/src/main/js/apps/code/components/App.tsx7
-rw-r--r--server/sonar-web/src/main/js/apps/code/components/__tests__/App-test.tsx6
-rw-r--r--server/sonar-web/src/main/js/apps/code/components/__tests__/__snapshots__/App-test.tsx.snap12
-rw-r--r--server/sonar-web/src/main/js/apps/coding-rules/components/App.tsx4
-rw-r--r--server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/__snapshots__/App-test.tsx.snap12
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/components/App.tsx4
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/components/__tests__/__snapshots__/App-test.tsx.snap12
-rw-r--r--server/sonar-web/src/main/js/apps/create/organization/CreateOrganization.tsx4
-rw-r--r--server/sonar-web/src/main/js/apps/create/organization/__tests__/CreateOrganization-test.tsx3
-rw-r--r--server/sonar-web/src/main/js/apps/create/organization/__tests__/__snapshots__/CreateOrganization-test.tsx.snap20
-rw-r--r--server/sonar-web/src/main/js/apps/create/project/CreateProjectPageSonarCloud.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/create/project/CreateProjectPageSonarQube.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/CreateProjectPageSonarCloud-test.tsx.snap8
-rw-r--r--server/sonar-web/src/main/js/apps/custom-measures/components/App.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/custom-measures/components/__tests__/__snapshots__/App-test.tsx.snap4
-rw-r--r--server/sonar-web/src/main/js/apps/custom-metrics/components/App.tsx4
-rw-r--r--server/sonar-web/src/main/js/apps/custom-metrics/components/__tests__/__snapshots__/App-test.tsx.snap8
-rw-r--r--server/sonar-web/src/main/js/apps/documentation/components/App.tsx6
-rw-r--r--server/sonar-web/src/main/js/apps/documentation/components/__tests__/__snapshots__/App-test.tsx.snap14
-rw-r--r--server/sonar-web/src/main/js/apps/groups/components/App.tsx4
-rw-r--r--server/sonar-web/src/main/js/apps/groups/components/__tests__/__snapshots__/App-test.tsx.snap8
-rw-r--r--server/sonar-web/src/main/js/apps/issues/components/App.tsx4
-rw-r--r--server/sonar-web/src/main/js/apps/issues/components/__tests__/__snapshots__/App-test.tsx.snap8
-rw-r--r--server/sonar-web/src/main/js/apps/maintenance/components/App.tsx4
-rw-r--r--server/sonar-web/src/main/js/apps/maintenance/components/__tests__/__snapshots__/App-test.tsx.snap48
-rw-r--r--server/sonar-web/src/main/js/apps/marketplace/App.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/organizationMembers/OrganizationMembers.tsx4
-rw-r--r--server/sonar-web/src/main/js/apps/organizationMembers/__tests__/__snapshots__/OrganizationMembers-test.tsx.snap8
-rw-r--r--server/sonar-web/src/main/js/apps/organizations/components/OrganizationEdit.tsx4
-rw-r--r--server/sonar-web/src/main/js/apps/organizations/components/OrganizationPage.tsx8
-rw-r--r--server/sonar-web/src/main/js/apps/organizations/components/__tests__/__snapshots__/OrganizationEdit-test.tsx.snap12
-rw-r--r--server/sonar-web/src/main/js/apps/organizations/components/__tests__/__snapshots__/OrganizationPage-test.tsx.snap4
-rw-r--r--server/sonar-web/src/main/js/apps/overview/components/App.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/permission-templates/components/Home.tsx4
-rw-r--r--server/sonar-web/src/main/js/apps/permission-templates/components/Template.tsx4
-rw-r--r--server/sonar-web/src/main/js/apps/permissions/global/components/App.tsx4
-rw-r--r--server/sonar-web/src/main/js/apps/permissions/global/components/__tests__/__snapshots__/App-test.tsx.snap8
-rw-r--r--server/sonar-web/src/main/js/apps/permissions/project/components/App.tsx4
-rw-r--r--server/sonar-web/src/main/js/apps/permissions/project/components/__tests__/__snapshots__/App-test.tsx.snap8
-rw-r--r--server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityApp.tsx4
-rw-r--r--server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/ProjectActivityApp-test.tsx.snap4
-rw-r--r--server/sonar-web/src/main/js/apps/projectDeletion/App.tsx4
-rw-r--r--server/sonar-web/src/main/js/apps/projectDeletion/__tests__/__snapshots__/App-test.tsx.snap4
-rw-r--r--server/sonar-web/src/main/js/apps/projectKey/Key.tsx4
-rw-r--r--server/sonar-web/src/main/js/apps/projectKey/__tests__/__snapshots__/Key-test.tsx.snap4
-rw-r--r--server/sonar-web/src/main/js/apps/projectLinks/App.tsx4
-rw-r--r--server/sonar-web/src/main/js/apps/projectLinks/__tests__/__snapshots__/App-test.tsx.snap12
-rw-r--r--server/sonar-web/src/main/js/apps/projectQualityGate/App.tsx4
-rw-r--r--server/sonar-web/src/main/js/apps/projectQualityProfiles/App.tsx4
-rw-r--r--server/sonar-web/src/main/js/apps/projects/components/AllProjects.tsx4
-rw-r--r--server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/AllProjects-test.tsx.snap20
-rw-r--r--server/sonar-web/src/main/js/apps/projectsManagement/App.tsx4
-rw-r--r--server/sonar-web/src/main/js/apps/quality-gates/components/App.tsx4
-rw-r--r--server/sonar-web/src/main/js/apps/quality-gates/components/Details.tsx4
-rw-r--r--server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/__snapshots__/Details-test.tsx.snap4
-rw-r--r--server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileContainer.tsx4
-rw-r--r--server/sonar-web/src/main/js/apps/quality-profiles/components/__tests__/ProfileContainer-test.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/settings/components/AppContainer.tsx4
-rw-r--r--server/sonar-web/src/main/js/apps/settings/components/__tests__/__snapshots__/AppContainer-test.tsx.snap24
-rw-r--r--server/sonar-web/src/main/js/apps/settings/encryption/EncryptionApp.tsx4
-rw-r--r--server/sonar-web/src/main/js/apps/system/components/App.tsx4
-rw-r--r--server/sonar-web/src/main/js/apps/users/UsersApp.tsx4
-rw-r--r--server/sonar-web/src/main/js/apps/users/__tests__/__snapshots__/UsersApp-test.tsx.snap8
-rw-r--r--server/sonar-web/src/main/js/apps/web-api/components/WebApiApp.tsx4
-rw-r--r--server/sonar-web/src/main/js/apps/web-api/components/__tests__/__snapshots__/WebApiApp-test.tsx.snap4
-rw-r--r--server/sonar-web/src/main/js/apps/webhooks/components/App.tsx4
-rw-r--r--server/sonar-web/src/main/js/apps/webhooks/components/__tests__/__snapshots__/App-test.tsx.snap8
85 files changed, 259 insertions, 249 deletions
diff --git a/server/sonar-web/src/main/js/apps/about/sonarcloud/AsAService.tsx b/server/sonar-web/src/main/js/apps/about/sonarcloud/AsAService.tsx
index a656db9b3e4..ddc1e0c0405 100644
--- a/server/sonar-web/src/main/js/apps/about/sonarcloud/AsAService.tsx
+++ b/server/sonar-web/src/main/js/apps/about/sonarcloud/AsAService.tsx
@@ -18,7 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import Helmet from 'react-helmet';
+import { Helmet } from 'react-helmet-async';
import { getBaseUrl } from 'sonar-ui-common/helpers/urls';
import { isLoggedIn } from '../../../helpers/users';
import SQPageContainer from './components/SQPageContainer';
diff --git a/server/sonar-web/src/main/js/apps/about/sonarcloud/AzureDevOps.tsx b/server/sonar-web/src/main/js/apps/about/sonarcloud/AzureDevOps.tsx
index d795c7f49f1..a3b1f147848 100644
--- a/server/sonar-web/src/main/js/apps/about/sonarcloud/AzureDevOps.tsx
+++ b/server/sonar-web/src/main/js/apps/about/sonarcloud/AzureDevOps.tsx
@@ -18,7 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import Helmet from 'react-helmet';
+import { Helmet } from 'react-helmet-async';
import { Link } from 'react-router';
import { getBaseUrl } from 'sonar-ui-common/helpers/urls';
import { isLoggedIn } from '../../../helpers/users';
diff --git a/server/sonar-web/src/main/js/apps/about/sonarcloud/BranchAnalysis.tsx b/server/sonar-web/src/main/js/apps/about/sonarcloud/BranchAnalysis.tsx
index 11613e40afa..fb46e682969 100644
--- a/server/sonar-web/src/main/js/apps/about/sonarcloud/BranchAnalysis.tsx
+++ b/server/sonar-web/src/main/js/apps/about/sonarcloud/BranchAnalysis.tsx
@@ -18,7 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import Helmet from 'react-helmet';
+import { Helmet } from 'react-helmet-async';
import { getBaseUrl } from 'sonar-ui-common/helpers/urls';
import { isLoggedIn } from '../../../helpers/users';
import SQPageContainer from './components/SQPageContainer';
diff --git a/server/sonar-web/src/main/js/apps/about/sonarcloud/Contact.tsx b/server/sonar-web/src/main/js/apps/about/sonarcloud/Contact.tsx
index 77531403845..df5ca89bca5 100644
--- a/server/sonar-web/src/main/js/apps/about/sonarcloud/Contact.tsx
+++ b/server/sonar-web/src/main/js/apps/about/sonarcloud/Contact.tsx
@@ -19,7 +19,7 @@
*/
import { Location } from 'history';
import * as React from 'react';
-import { Helmet } from 'react-helmet';
+import { Helmet } from 'react-helmet-async';
import { Link } from 'react-router';
import Select from 'sonar-ui-common/components/controls/Select';
import { Alert } from 'sonar-ui-common/components/ui/Alert';
diff --git a/server/sonar-web/src/main/js/apps/about/sonarcloud/Home.tsx b/server/sonar-web/src/main/js/apps/about/sonarcloud/Home.tsx
index 1df7fa41b85..f5988f2e8d6 100644
--- a/server/sonar-web/src/main/js/apps/about/sonarcloud/Home.tsx
+++ b/server/sonar-web/src/main/js/apps/about/sonarcloud/Home.tsx
@@ -18,7 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import Helmet from 'react-helmet';
+import { Helmet } from 'react-helmet-async';
import { connect } from 'react-redux';
import { addWhitePageClass, removeWhitePageClass } from 'sonar-ui-common/helpers/pages';
import { getBaseUrl } from 'sonar-ui-common/helpers/urls';
diff --git a/server/sonar-web/src/main/js/apps/about/sonarcloud/Pricing.tsx b/server/sonar-web/src/main/js/apps/about/sonarcloud/Pricing.tsx
index 8be14d667a1..b0e49a11e25 100644
--- a/server/sonar-web/src/main/js/apps/about/sonarcloud/Pricing.tsx
+++ b/server/sonar-web/src/main/js/apps/about/sonarcloud/Pricing.tsx
@@ -18,7 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import Helmet from 'react-helmet';
+import { Helmet } from 'react-helmet-async';
import { addWhitePageClass, removeWhitePageClass } from 'sonar-ui-common/helpers/pages';
import { scrollToElement } from 'sonar-ui-common/helpers/scrolling';
import { getBaseUrl } from 'sonar-ui-common/helpers/urls';
diff --git a/server/sonar-web/src/main/js/apps/about/sonarcloud/SQHome.tsx b/server/sonar-web/src/main/js/apps/about/sonarcloud/SQHome.tsx
index 76994fd72fc..24678ed4418 100644
--- a/server/sonar-web/src/main/js/apps/about/sonarcloud/SQHome.tsx
+++ b/server/sonar-web/src/main/js/apps/about/sonarcloud/SQHome.tsx
@@ -18,7 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import Helmet from 'react-helmet';
+import { Helmet } from 'react-helmet-async';
import { Link } from 'react-router';
import { getBaseUrl } from 'sonar-ui-common/helpers/urls';
import { isLoggedIn } from '../../../helpers/users';
diff --git a/server/sonar-web/src/main/js/apps/about/sonarcloud/SonarLintIntegration.tsx b/server/sonar-web/src/main/js/apps/about/sonarcloud/SonarLintIntegration.tsx
index 20f820890f1..e763e0f6d67 100644
--- a/server/sonar-web/src/main/js/apps/about/sonarcloud/SonarLintIntegration.tsx
+++ b/server/sonar-web/src/main/js/apps/about/sonarcloud/SonarLintIntegration.tsx
@@ -18,7 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import Helmet from 'react-helmet';
+import { Helmet } from 'react-helmet-async';
import { getBaseUrl } from 'sonar-ui-common/helpers/urls';
import { isLoggedIn } from '../../../helpers/users';
import SQPageContainer from './components/SQPageContainer';
diff --git a/server/sonar-web/src/main/js/apps/about/sonarcloud/__tests__/__snapshots__/Home-test.tsx.snap b/server/sonar-web/src/main/js/apps/about/sonarcloud/__tests__/__snapshots__/Home-test.tsx.snap
index 0527dbd3e26..8e97298c65b 100644
--- a/server/sonar-web/src/main/js/apps/about/sonarcloud/__tests__/__snapshots__/Home-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/about/sonarcloud/__tests__/__snapshots__/Home-test.tsx.snap
@@ -47,7 +47,7 @@ exports[`should render 1`] = `
<div
className="page-container sc-page"
>
- <HelmetWrapper
+ <Helmet
defer={true}
encodeSpecialCharacters={true}
title="SonarCloud | Clean Code, Rockstar Status"
@@ -56,7 +56,7 @@ exports[`should render 1`] = `
content="Enhance your workflow with continuous code quality, SonarCloud automatically analyzes and decorates pull requests on GitHub, Bitbucket and Azure DevOps on major languages."
name="description"
/>
- </HelmetWrapper>
+ </Helmet>
<FixedNavBar />
<PageBackgroundHeader />
<TopNavBar />
diff --git a/server/sonar-web/src/main/js/apps/account/components/Account.tsx b/server/sonar-web/src/main/js/apps/account/components/Account.tsx
index 60ed098c5c5..ec8613cba29 100644
--- a/server/sonar-web/src/main/js/apps/account/components/Account.tsx
+++ b/server/sonar-web/src/main/js/apps/account/components/Account.tsx
@@ -18,7 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import Helmet from 'react-helmet';
+import { Helmet } from 'react-helmet-async';
import { connect } from 'react-redux';
import handleRequiredAuthentication from 'sonar-ui-common/helpers/handleRequiredAuthentication';
import { translate } from 'sonar-ui-common/helpers/l10n';
@@ -52,7 +52,7 @@ export class Account extends React.PureComponent<Props> {
return (
<div id="account-page">
<Suggestions suggestions="account" />
- <Helmet defaultTitle={title} titleTemplate={'%s - ' + title} />
+ <Helmet defaultTitle={title} defer={false} titleTemplate={`%s - ${title}`} />
<A11ySkipTarget anchor="account_main" />
<header className="account-header">
<div className="account-container clearfix">
diff --git a/server/sonar-web/src/main/js/apps/account/components/Security.tsx b/server/sonar-web/src/main/js/apps/account/components/Security.tsx
index ea3e8412777..704dee0c4a8 100644
--- a/server/sonar-web/src/main/js/apps/account/components/Security.tsx
+++ b/server/sonar-web/src/main/js/apps/account/components/Security.tsx
@@ -18,7 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import Helmet from 'react-helmet';
+import { Helmet } from 'react-helmet-async';
import { connect } from 'react-redux';
import { translate } from 'sonar-ui-common/helpers/l10n';
import { getCurrentUser, Store } from '../../../store/rootReducer';
@@ -32,7 +32,7 @@ interface Props {
function Security({ user }: Props) {
return (
<div className="account-body account-container">
- <Helmet title={translate('my_account.security')} />
+ <Helmet defer={false} title={translate('my_account.security')} />
<Tokens login={user.login} />
{user.local && <Password user={user} />}
</div>
diff --git a/server/sonar-web/src/main/js/apps/account/components/__tests__/__snapshots__/Account-test.tsx.snap b/server/sonar-web/src/main/js/apps/account/components/__tests__/__snapshots__/Account-test.tsx.snap
index 23c112c210b..7fbdf3071cc 100644
--- a/server/sonar-web/src/main/js/apps/account/components/__tests__/__snapshots__/Account-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/account/components/__tests__/__snapshots__/Account-test.tsx.snap
@@ -7,9 +7,9 @@ exports[`should render correctly 1`] = `
<Suggestions
suggestions="account"
/>
- <HelmetWrapper
+ <Helmet
defaultTitle="my_account.page"
- defer={true}
+ defer={false}
encodeSpecialCharacters={true}
titleTemplate="%s - my_account.page"
/>
diff --git a/server/sonar-web/src/main/js/apps/account/notifications/Notifications.tsx b/server/sonar-web/src/main/js/apps/account/notifications/Notifications.tsx
index 34ef22e8f14..aa3c88097ed 100644
--- a/server/sonar-web/src/main/js/apps/account/notifications/Notifications.tsx
+++ b/server/sonar-web/src/main/js/apps/account/notifications/Notifications.tsx
@@ -19,7 +19,7 @@
*/
import { partition } from 'lodash';
import * as React from 'react';
-import Helmet from 'react-helmet';
+import { Helmet } from 'react-helmet-async';
import { Alert } from 'sonar-ui-common/components/ui/Alert';
import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner';
import { translate } from 'sonar-ui-common/helpers/l10n';
@@ -45,7 +45,7 @@ export function Notifications(props: WithNotificationsProps) {
return (
<div className="account-body account-container">
- <Helmet title={translate('my_account.notifications')} />
+ <Helmet defer={false} title={translate('my_account.notifications')} />
<Alert variant="info">{translate('notification.dispatcher.information')}</Alert>
<DeferredSpinner loading={loading}>
{notifications && (
diff --git a/server/sonar-web/src/main/js/apps/account/notifications/__tests__/__snapshots__/Notifications-test.tsx.snap b/server/sonar-web/src/main/js/apps/account/notifications/__tests__/__snapshots__/Notifications-test.tsx.snap
index 46053156fbf..9d312772640 100644
--- a/server/sonar-web/src/main/js/apps/account/notifications/__tests__/__snapshots__/Notifications-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/account/notifications/__tests__/__snapshots__/Notifications-test.tsx.snap
@@ -4,8 +4,8 @@ exports[`should render correctly 1`] = `
<div
className="account-body account-container"
>
- <HelmetWrapper
- defer={true}
+ <Helmet
+ defer={false}
encodeSpecialCharacters={true}
title="my_account.notifications"
/>
@@ -83,8 +83,8 @@ exports[`should render correctly 2`] = `
<div
className="account-body account-container"
>
- <HelmetWrapper
- defer={true}
+ <Helmet
+ defer={false}
encodeSpecialCharacters={true}
title="my_account.notifications"
/>
@@ -162,8 +162,8 @@ exports[`should render correctly 3`] = `
<div
className="account-body account-container"
>
- <HelmetWrapper
- defer={true}
+ <Helmet
+ defer={false}
encodeSpecialCharacters={true}
title="my_account.notifications"
/>
diff --git a/server/sonar-web/src/main/js/apps/account/organizations/UserOrganizations.tsx b/server/sonar-web/src/main/js/apps/account/organizations/UserOrganizations.tsx
index 04de8d89908..7aff55375e5 100644
--- a/server/sonar-web/src/main/js/apps/account/organizations/UserOrganizations.tsx
+++ b/server/sonar-web/src/main/js/apps/account/organizations/UserOrganizations.tsx
@@ -18,7 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import Helmet from 'react-helmet';
+import { Helmet } from 'react-helmet-async';
import { connect } from 'react-redux';
import { Link } from 'react-router';
import { translate } from 'sonar-ui-common/helpers/l10n';
diff --git a/server/sonar-web/src/main/js/apps/account/projects/ProjectsContainer.tsx b/server/sonar-web/src/main/js/apps/account/projects/ProjectsContainer.tsx
index a373c7dd65f..713fef2d335 100644
--- a/server/sonar-web/src/main/js/apps/account/projects/ProjectsContainer.tsx
+++ b/server/sonar-web/src/main/js/apps/account/projects/ProjectsContainer.tsx
@@ -18,7 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import Helmet from 'react-helmet';
+import { Helmet } from 'react-helmet-async';
import { translate } from 'sonar-ui-common/helpers/l10n';
import { getMyProjects } from '../../../api/components';
import Projects from './Projects';
diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/BackgroundTasksApp.tsx b/server/sonar-web/src/main/js/apps/background-tasks/components/BackgroundTasksApp.tsx
index cf8e86047ab..aad93b01500 100644
--- a/server/sonar-web/src/main/js/apps/background-tasks/components/BackgroundTasksApp.tsx
+++ b/server/sonar-web/src/main/js/apps/background-tasks/components/BackgroundTasksApp.tsx
@@ -19,7 +19,7 @@
*/
import { debounce, uniq } from 'lodash';
import * as React from 'react';
-import Helmet from 'react-helmet';
+import { Helmet } from 'react-helmet-async';
import { connect } from 'react-redux';
import { toShortNotSoISOString } from 'sonar-ui-common/helpers/dates';
import { translate } from 'sonar-ui-common/helpers/l10n';
@@ -218,7 +218,7 @@ export class BackgroundTasksApp extends React.PureComponent<Props, State> {
return (
<div className="page page-limited">
<Suggestions suggestions="background_tasks" />
- <Helmet title={translate('background_tasks.page')} />
+ <Helmet defer={false} title={translate('background_tasks.page')} />
<Header component={component} />
<Stats
diff --git a/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/__snapshots__/BackgroundTasksApp-test.tsx.snap b/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/__snapshots__/BackgroundTasksApp-test.tsx.snap
index 72846dc1217..4bc07059a03 100644
--- a/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/__snapshots__/BackgroundTasksApp-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/background-tasks/components/__tests__/__snapshots__/BackgroundTasksApp-test.tsx.snap
@@ -17,8 +17,8 @@ exports[`should render correctly 2`] = `
<Suggestions
suggestions="background_tasks"
/>
- <HelmetWrapper
- defer={true}
+ <Helmet
+ defer={false}
encodeSpecialCharacters={true}
title="background_tasks.page"
/>
diff --git a/server/sonar-web/src/main/js/apps/code/components/App.tsx b/server/sonar-web/src/main/js/apps/code/components/App.tsx
index 37dae7d6679..c1a65d7aca1 100644
--- a/server/sonar-web/src/main/js/apps/code/components/App.tsx
+++ b/server/sonar-web/src/main/js/apps/code/components/App.tsx
@@ -21,7 +21,7 @@ import * as classNames from 'classnames';
import { Location } from 'history';
import { debounce } from 'lodash';
import * as React from 'react';
-import Helmet from 'react-helmet';
+import { Helmet } from 'react-helmet-async';
import { connect } from 'react-redux';
import { InjectedRouter } from 'react-router';
import ListFooter from 'sonar-ui-common/components/controls/ListFooter';
@@ -269,7 +269,10 @@ export class App extends React.PureComponent<Props, State> {
return (
<div className="page page-limited">
<Suggestions suggestions="code" />
- <Helmet title={sourceViewer !== undefined ? sourceViewer.name : defaultTitle} />
+ <Helmet
+ defer={false}
+ title={sourceViewer !== undefined ? sourceViewer.name : defaultTitle}
+ />
<A11ySkipTarget anchor="code_main" />
<Search
diff --git a/server/sonar-web/src/main/js/apps/code/components/__tests__/App-test.tsx b/server/sonar-web/src/main/js/apps/code/components/__tests__/App-test.tsx
index 9bd31e97160..9035233ffcc 100644
--- a/server/sonar-web/src/main/js/apps/code/components/__tests__/App-test.tsx
+++ b/server/sonar-web/src/main/js/apps/code/components/__tests__/App-test.tsx
@@ -48,7 +48,7 @@ beforeEach(() => {
it('should have correct title for APP based component', async () => {
const wrapper = shallowRender();
await waitAndUpdate(wrapper);
- expect(wrapper.find('HelmetWrapper')).toMatchSnapshot();
+ expect(wrapper.find('Helmet')).toMatchSnapshot();
});
it('should have correct title for portfolio base component', async () => {
@@ -61,7 +61,7 @@ it('should have correct title for portfolio base component', async () => {
});
const wrapper = shallowRender();
await waitAndUpdate(wrapper);
- expect(wrapper.find('HelmetWrapper')).toMatchSnapshot();
+ expect(wrapper.find('Helmet')).toMatchSnapshot();
});
it('should have correct title for project component', async () => {
@@ -74,7 +74,7 @@ it('should have correct title for project component', async () => {
});
const wrapper = shallowRender();
await waitAndUpdate(wrapper);
- expect(wrapper.find('HelmetWrapper')).toMatchSnapshot();
+ expect(wrapper.find('Helmet')).toMatchSnapshot();
});
it('should refresh branch status if issues are updated', async () => {
diff --git a/server/sonar-web/src/main/js/apps/code/components/__tests__/__snapshots__/App-test.tsx.snap b/server/sonar-web/src/main/js/apps/code/components/__tests__/__snapshots__/App-test.tsx.snap
index ac0f4eaa14b..7d2227bf3a1 100644
--- a/server/sonar-web/src/main/js/apps/code/components/__tests__/__snapshots__/App-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/code/components/__tests__/__snapshots__/App-test.tsx.snap
@@ -1,24 +1,24 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should have correct title for APP based component 1`] = `
-<HelmetWrapper
- defer={true}
+<Helmet
+ defer={false}
encodeSpecialCharacters={true}
title="projects.page"
/>
`;
exports[`should have correct title for portfolio base component 1`] = `
-<HelmetWrapper
- defer={true}
+<Helmet
+ defer={false}
encodeSpecialCharacters={true}
title="projects.page"
/>
`;
exports[`should have correct title for project component 1`] = `
-<HelmetWrapper
- defer={true}
+<Helmet
+ defer={false}
encodeSpecialCharacters={true}
title="code.page"
/>
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/App.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/App.tsx
index 5b9c648d63b..5177a6355a5 100644
--- a/server/sonar-web/src/main/js/apps/coding-rules/components/App.tsx
+++ b/server/sonar-web/src/main/js/apps/coding-rules/components/App.tsx
@@ -20,7 +20,7 @@
import * as key from 'keymaster';
import { keyBy } from 'lodash';
import * as React from 'react';
-import { Helmet } from 'react-helmet';
+import { Helmet } from 'react-helmet-async';
import { connect } from 'react-redux';
import { withRouter, WithRouterProps } from 'react-router';
import ListFooter from 'sonar-ui-common/components/controls/ListFooter';
@@ -559,7 +559,7 @@ export class App extends React.PureComponent<Props, State> {
return (
<>
<Suggestions suggestions="coding_rules" />
- <Helmet title={translate('coding_rules.page')}>
+ <Helmet defer={false} title={translate('coding_rules.page')}>
<meta content="noindex" name="robots" />
</Helmet>
<div className="layout-page" id="coding-rules-page">
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/__snapshots__/App-test.tsx.snap b/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/__snapshots__/App-test.tsx.snap
index 3184fc1ed0c..8cbccf1f3a9 100644
--- a/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/__snapshots__/App-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/__snapshots__/App-test.tsx.snap
@@ -44,8 +44,8 @@ exports[`should render correctly 1`] = `
<Suggestions
suggestions="coding_rules"
/>
- <HelmetWrapper
- defer={true}
+ <Helmet
+ defer={false}
encodeSpecialCharacters={true}
title="coding_rules.page"
>
@@ -53,7 +53,7 @@ exports[`should render correctly 1`] = `
content="noindex"
name="robots"
/>
- </HelmetWrapper>
+ </Helmet>
<div
className="layout-page"
id="coding-rules-page"
@@ -98,8 +98,8 @@ exports[`should render correctly 2`] = `
<Suggestions
suggestions="coding_rules"
/>
- <HelmetWrapper
- defer={true}
+ <Helmet
+ defer={false}
encodeSpecialCharacters={true}
title="coding_rules.page"
>
@@ -107,7 +107,7 @@ exports[`should render correctly 2`] = `
content="noindex"
name="robots"
/>
- </HelmetWrapper>
+ </Helmet>
<div
className="layout-page"
id="coding-rules-page"
diff --git a/server/sonar-web/src/main/js/apps/component-measures/components/App.tsx b/server/sonar-web/src/main/js/apps/component-measures/components/App.tsx
index 5ea2507c4cf..146d6d1af19 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/components/App.tsx
+++ b/server/sonar-web/src/main/js/apps/component-measures/components/App.tsx
@@ -20,7 +20,7 @@
import * as key from 'keymaster';
import { debounce, keyBy } from 'lodash';
import * as React from 'react';
-import Helmet from 'react-helmet';
+import { Helmet } from 'react-helmet-async';
import { connect } from 'react-redux';
import { withRouter, WithRouterProps } from 'react-router';
import {
@@ -310,7 +310,7 @@ export class App extends React.PureComponent<Props, State> {
return (
<div id="component-measures">
<Suggestions suggestions="component_measures" />
- <Helmet title={this.getHelmetTitle(query, displayOverview, metric)} />
+ <Helmet defer={false} title={this.getHelmetTitle(query, displayOverview, metric)} />
{measures.length > 0 ? (
<div className="layout-page">
diff --git a/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/__snapshots__/App-test.tsx.snap b/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/__snapshots__/App-test.tsx.snap
index 2cf9448032f..4c5f9bf8bcd 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/__snapshots__/App-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/component-measures/components/__tests__/__snapshots__/App-test.tsx.snap
@@ -7,8 +7,8 @@ exports[`should not render drilldown for estimated duplications 1`] = `
<Suggestions
suggestions="component_measures"
/>
- <HelmetWrapper
- defer={true}
+ <Helmet
+ defer={false}
encodeSpecialCharacters={true}
title="Coverage"
/>
@@ -44,8 +44,8 @@ exports[`should render a message when there are no measures 1`] = `
<Suggestions
suggestions="component_measures"
/>
- <HelmetWrapper
- defer={true}
+ <Helmet
+ defer={false}
encodeSpecialCharacters={true}
title="Coverage"
/>
@@ -60,8 +60,8 @@ exports[`should render correctly 1`] = `
<Suggestions
suggestions="component_measures"
/>
- <HelmetWrapper
- defer={true}
+ <Helmet
+ defer={false}
encodeSpecialCharacters={true}
title="Coverage"
/>
diff --git a/server/sonar-web/src/main/js/apps/create/organization/CreateOrganization.tsx b/server/sonar-web/src/main/js/apps/create/organization/CreateOrganization.tsx
index ef3b5f66e24..9f546c857c8 100644
--- a/server/sonar-web/src/main/js/apps/create/organization/CreateOrganization.tsx
+++ b/server/sonar-web/src/main/js/apps/create/organization/CreateOrganization.tsx
@@ -21,7 +21,7 @@ import * as classNames from 'classnames';
import * as differenceInMinutes from 'date-fns/difference_in_minutes';
import { times } from 'lodash';
import * as React from 'react';
-import { Helmet } from 'react-helmet';
+import { Helmet } from 'react-helmet-async';
import { connect } from 'react-redux';
import { withRouter, WithRouterProps } from 'react-router';
import Tabs from 'sonar-ui-common/components/controls/Tabs';
@@ -425,7 +425,7 @@ export class CreateOrganization extends React.PureComponent<Props & WithRouterPr
return (
<>
- <Helmet title={header} titleTemplate="%s" />
+ <Helmet defer={false} title={header} titleTemplate="%s" />
<div className="page page-limited huge-spacer-top huge-spacer-bottom">
<A11ySkipTarget anchor="create_org_main" />
diff --git a/server/sonar-web/src/main/js/apps/create/organization/__tests__/CreateOrganization-test.tsx b/server/sonar-web/src/main/js/apps/create/organization/__tests__/CreateOrganization-test.tsx
index 2cd7c56eecf..4b1f7a339ae 100644
--- a/server/sonar-web/src/main/js/apps/create/organization/__tests__/CreateOrganization-test.tsx
+++ b/server/sonar-web/src/main/js/apps/create/organization/__tests__/CreateOrganization-test.tsx
@@ -21,6 +21,7 @@ import { mount, shallow } from 'enzyme';
import { Location } from 'history';
import { times } from 'lodash';
import * as React from 'react';
+import { HelmetProvider } from 'react-helmet-async';
import { get, remove } from 'sonar-ui-common/helpers/storage';
import { waitAndUpdate } from 'sonar-ui-common/helpers/testUtils';
import {
@@ -312,7 +313,7 @@ it('should bind org and redirect to org home when coming from org binding', asyn
});
function mountRender(props: Partial<CreateOrganization['props']> = {}) {
- return mount<CreateOrganization>(createComponent(props));
+ return mount<CreateOrganization>(<HelmetProvider>{createComponent(props)}</HelmetProvider>);
}
function shallowRender(props: Partial<CreateOrganization['props']> = {}) {
diff --git a/server/sonar-web/src/main/js/apps/create/organization/__tests__/__snapshots__/CreateOrganization-test.tsx.snap b/server/sonar-web/src/main/js/apps/create/organization/__tests__/__snapshots__/CreateOrganization-test.tsx.snap
index 46829d9e422..927b7d368f9 100644
--- a/server/sonar-web/src/main/js/apps/create/organization/__tests__/__snapshots__/CreateOrganization-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/create/organization/__tests__/__snapshots__/CreateOrganization-test.tsx.snap
@@ -2,8 +2,8 @@
exports[`should render with auto tab displayed 1`] = `
<Fragment>
- <HelmetWrapper
- defer={true}
+ <Helmet
+ defer={false}
encodeSpecialCharacters={true}
title="onboarding.create_organization.page.header"
titleTemplate="%s"
@@ -92,8 +92,8 @@ exports[`should render with auto tab selected and manual disabled 1`] = `
exports[`should render with auto tab selected and manual disabled 2`] = `
<Fragment>
- <HelmetWrapper
- defer={true}
+ <Helmet
+ defer={false}
encodeSpecialCharacters={true}
title="onboarding.create_organization.page.header"
titleTemplate="%s"
@@ -218,8 +218,8 @@ exports[`should render with auto tab selected and manual disabled 2`] = `
exports[`should render with manual tab displayed 1`] = `
<Fragment>
- <HelmetWrapper
- defer={true}
+ <Helmet
+ defer={false}
encodeSpecialCharacters={true}
title="onboarding.create_organization.page.header"
titleTemplate="%s"
@@ -278,8 +278,8 @@ exports[`should render with organization bind page 1`] = `
exports[`should render with organization bind page 2`] = `
<Fragment>
- <HelmetWrapper
- defer={true}
+ <Helmet
+ defer={false}
encodeSpecialCharacters={true}
title="onboarding.create_organization.page.header"
titleTemplate="%s"
@@ -406,8 +406,8 @@ exports[`should render with organization bind page 2`] = `
exports[`should switch tabs 1`] = `
<Fragment>
- <HelmetWrapper
- defer={true}
+ <Helmet
+ defer={false}
encodeSpecialCharacters={true}
title="onboarding.create_organization.page.header"
titleTemplate="%s"
diff --git a/server/sonar-web/src/main/js/apps/create/project/CreateProjectPageSonarCloud.tsx b/server/sonar-web/src/main/js/apps/create/project/CreateProjectPageSonarCloud.tsx
index 8056c3f5523..35bd08cce28 100644
--- a/server/sonar-web/src/main/js/apps/create/project/CreateProjectPageSonarCloud.tsx
+++ b/server/sonar-web/src/main/js/apps/create/project/CreateProjectPageSonarCloud.tsx
@@ -18,7 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import Helmet from 'react-helmet';
+import { Helmet } from 'react-helmet-async';
import { connect } from 'react-redux';
import { WithRouterProps } from 'react-router';
import Tabs from 'sonar-ui-common/components/controls/Tabs';
diff --git a/server/sonar-web/src/main/js/apps/create/project/CreateProjectPageSonarQube.tsx b/server/sonar-web/src/main/js/apps/create/project/CreateProjectPageSonarQube.tsx
index f36ef28fd20..aa88ce27183 100644
--- a/server/sonar-web/src/main/js/apps/create/project/CreateProjectPageSonarQube.tsx
+++ b/server/sonar-web/src/main/js/apps/create/project/CreateProjectPageSonarQube.tsx
@@ -18,7 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import Helmet from 'react-helmet';
+import { Helmet } from 'react-helmet-async';
import { WithRouterProps } from 'react-router';
import { translate } from 'sonar-ui-common/helpers/l10n';
import { addWhitePageClass, removeWhitePageClass } from 'sonar-ui-common/helpers/pages';
diff --git a/server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/CreateProjectPageSonarCloud-test.tsx.snap b/server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/CreateProjectPageSonarCloud-test.tsx.snap
index 71566a53266..50addeb1eab 100644
--- a/server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/CreateProjectPageSonarCloud-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/create/project/__tests__/__snapshots__/CreateProjectPageSonarCloud-test.tsx.snap
@@ -2,7 +2,7 @@
exports[`should render correctly 1`] = `
<Fragment>
- <HelmetWrapper
+ <Helmet
defer={true}
encodeSpecialCharacters={true}
title="onboarding.create_project.header"
@@ -31,7 +31,7 @@ exports[`should render correctly 1`] = `
exports[`should render correctly 2`] = `
<Fragment>
- <HelmetWrapper
+ <Helmet
defer={true}
encodeSpecialCharacters={true}
title="onboarding.create_project.header"
@@ -103,7 +103,7 @@ exports[`should render correctly 2`] = `
exports[`should render with Custom creation only 1`] = `
<Fragment>
- <HelmetWrapper
+ <Helmet
defer={true}
encodeSpecialCharacters={true}
title="onboarding.create_project.header"
@@ -168,7 +168,7 @@ exports[`should render with Custom creation only 1`] = `
exports[`should switch tabs 1`] = `
<Fragment>
- <HelmetWrapper
+ <Helmet
defer={true}
encodeSpecialCharacters={true}
title="onboarding.create_project.header"
diff --git a/server/sonar-web/src/main/js/apps/custom-measures/components/App.tsx b/server/sonar-web/src/main/js/apps/custom-measures/components/App.tsx
index f5afcfc3520..d49d1c41334 100644
--- a/server/sonar-web/src/main/js/apps/custom-measures/components/App.tsx
+++ b/server/sonar-web/src/main/js/apps/custom-measures/components/App.tsx
@@ -18,7 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import Helmet from 'react-helmet';
+import { Helmet } from 'react-helmet-async';
import ListFooter from 'sonar-ui-common/components/controls/ListFooter';
import { translate } from 'sonar-ui-common/helpers/l10n';
import {
diff --git a/server/sonar-web/src/main/js/apps/custom-measures/components/__tests__/__snapshots__/App-test.tsx.snap b/server/sonar-web/src/main/js/apps/custom-measures/components/__tests__/__snapshots__/App-test.tsx.snap
index d59b5a86c0b..d58a7526a53 100644
--- a/server/sonar-web/src/main/js/apps/custom-measures/components/__tests__/__snapshots__/App-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/custom-measures/components/__tests__/__snapshots__/App-test.tsx.snap
@@ -5,7 +5,7 @@ exports[`should work 1`] = `
<Suggestions
suggestions="custom_measures"
/>
- <HelmetWrapper
+ <Helmet
defer={true}
encodeSpecialCharacters={true}
title="custom_measures.page"
@@ -26,7 +26,7 @@ exports[`should work 2`] = `
<Suggestions
suggestions="custom_measures"
/>
- <HelmetWrapper
+ <Helmet
defer={true}
encodeSpecialCharacters={true}
title="custom_measures.page"
diff --git a/server/sonar-web/src/main/js/apps/custom-metrics/components/App.tsx b/server/sonar-web/src/main/js/apps/custom-metrics/components/App.tsx
index f65aedce0fc..8800cb09376 100644
--- a/server/sonar-web/src/main/js/apps/custom-metrics/components/App.tsx
+++ b/server/sonar-web/src/main/js/apps/custom-metrics/components/App.tsx
@@ -18,7 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import { Helmet } from 'react-helmet';
+import { Helmet } from 'react-helmet-async';
import ListFooter from 'sonar-ui-common/components/controls/ListFooter';
import { translate } from 'sonar-ui-common/helpers/l10n';
import {
@@ -147,7 +147,7 @@ export default class App extends React.PureComponent<Props, State> {
return (
<>
<Suggestions suggestions="custom_metrics" />
- <Helmet title={translate('custom_metrics.page')} />
+ <Helmet defer={false} title={translate('custom_metrics.page')} />
<div className="page page-limited" id="custom-metrics-page">
<Header domains={domains} loading={loading} onCreate={this.handleCreate} types={types} />
{metrics && (
diff --git a/server/sonar-web/src/main/js/apps/custom-metrics/components/__tests__/__snapshots__/App-test.tsx.snap b/server/sonar-web/src/main/js/apps/custom-metrics/components/__tests__/__snapshots__/App-test.tsx.snap
index a7d3664d8ae..8514fc4c8e2 100644
--- a/server/sonar-web/src/main/js/apps/custom-metrics/components/__tests__/__snapshots__/App-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/custom-metrics/components/__tests__/__snapshots__/App-test.tsx.snap
@@ -5,8 +5,8 @@ exports[`should work 1`] = `
<Suggestions
suggestions="custom_metrics"
/>
- <HelmetWrapper
- defer={true}
+ <Helmet
+ defer={false}
encodeSpecialCharacters={true}
title="custom_metrics.page"
/>
@@ -27,8 +27,8 @@ exports[`should work 2`] = `
<Suggestions
suggestions="custom_metrics"
/>
- <HelmetWrapper
- defer={true}
+ <Helmet
+ defer={false}
encodeSpecialCharacters={true}
title="custom_metrics.page"
/>
diff --git a/server/sonar-web/src/main/js/apps/documentation/components/App.tsx b/server/sonar-web/src/main/js/apps/documentation/components/App.tsx
index 66e85c130be..e745735be8d 100644
--- a/server/sonar-web/src/main/js/apps/documentation/components/App.tsx
+++ b/server/sonar-web/src/main/js/apps/documentation/components/App.tsx
@@ -21,7 +21,7 @@ import * as navigationTreeSonarCloud from 'Docs/../static/SonarCloudNavigationTr
import * as navigationTreeSonarQube from 'Docs/../static/SonarQubeNavigationTree.json';
import { DocNavigationItem } from 'Docs/@types/types';
import * as React from 'react';
-import Helmet from 'react-helmet';
+import { Helmet } from 'react-helmet-async';
import { Link } from 'react-router';
import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner';
import { translate } from 'sonar-ui-common/helpers/l10n';
@@ -174,7 +174,9 @@ export default class App extends React.PureComponent<Props, State> {
return (
<div className="layout-page">
- <Helmet title={isIndex || !page.title ? mainTitle : `${page.title} | ${mainTitle}`}>
+ <Helmet
+ defer={false}
+ title={isIndex || !page.title ? mainTitle : `${page.title} | ${mainTitle}`}>
{!isSonarCloud() && <meta content="noindex nofollow" name="robots" />}
</Helmet>
diff --git a/server/sonar-web/src/main/js/apps/documentation/components/__tests__/__snapshots__/App-test.tsx.snap b/server/sonar-web/src/main/js/apps/documentation/components/__tests__/__snapshots__/App-test.tsx.snap
index d5701016b02..fc7aa1ecf74 100644
--- a/server/sonar-web/src/main/js/apps/documentation/components/__tests__/__snapshots__/App-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/documentation/components/__tests__/__snapshots__/App-test.tsx.snap
@@ -4,8 +4,8 @@ exports[`should render correctly for SonarCloud 1`] = `
<div
className="layout-page"
>
- <HelmetWrapper
- defer={true}
+ <Helmet
+ defer={false}
encodeSpecialCharacters={true}
title="Lorem | documentation.page_title.sonarcloud"
/>
@@ -42,8 +42,8 @@ exports[`should render correctly for SonarQube 1`] = `
<div
className="layout-page"
>
- <HelmetWrapper
- defer={true}
+ <Helmet
+ defer={false}
encodeSpecialCharacters={true}
title="Lorem | documentation.page_title.sonarqube"
>
@@ -51,7 +51,7 @@ exports[`should render correctly for SonarQube 1`] = `
content="noindex nofollow"
name="robots"
/>
- </HelmetWrapper>
+ </Helmet>
<ScreenPositionHelper
className="layout-page-side-outer"
>
@@ -168,7 +168,7 @@ exports[`should render correctly for SonarQube 2`] = `
exports[`should show a 404 if the page doesn't exist 1`] = `
<Fragment>
- <HelmetWrapper
+ <Helmet
defer={true}
encodeSpecialCharacters={true}
title="documentation.page_title.sonarcloud"
@@ -177,7 +177,7 @@ exports[`should show a 404 if the page doesn't exist 1`] = `
content="noindex nofollow"
name="robots"
/>
- </HelmetWrapper>
+ </Helmet>
<A11ySkipTarget
anchor="documentation_main"
/>
diff --git a/server/sonar-web/src/main/js/apps/groups/components/App.tsx b/server/sonar-web/src/main/js/apps/groups/components/App.tsx
index fc866e9da2d..664e07f2dc5 100644
--- a/server/sonar-web/src/main/js/apps/groups/components/App.tsx
+++ b/server/sonar-web/src/main/js/apps/groups/components/App.tsx
@@ -18,7 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import { Helmet } from 'react-helmet';
+import { Helmet } from 'react-helmet-async';
import ListFooter from 'sonar-ui-common/components/controls/ListFooter';
import SearchBox from 'sonar-ui-common/components/controls/SearchBox';
import { translate } from 'sonar-ui-common/helpers/l10n';
@@ -141,7 +141,7 @@ export default class App extends React.PureComponent<Props, State> {
return (
<>
<Suggestions suggestions="user_groups" />
- <Helmet title={translate('user_groups.page')} />
+ <Helmet defer={false} title={translate('user_groups.page')} />
<div className="page page-limited" id="groups-page">
<Header loading={loading} onCreate={this.handleCreate} />
diff --git a/server/sonar-web/src/main/js/apps/groups/components/__tests__/__snapshots__/App-test.tsx.snap b/server/sonar-web/src/main/js/apps/groups/components/__tests__/__snapshots__/App-test.tsx.snap
index 11190d8cf61..5deb2d97b50 100644
--- a/server/sonar-web/src/main/js/apps/groups/components/__tests__/__snapshots__/App-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/groups/components/__tests__/__snapshots__/App-test.tsx.snap
@@ -5,8 +5,8 @@ exports[`should render correctly 1`] = `
<Suggestions
suggestions="user_groups"
/>
- <HelmetWrapper
- defer={true}
+ <Helmet
+ defer={false}
encodeSpecialCharacters={true}
title="user_groups.page"
/>
@@ -35,8 +35,8 @@ exports[`should render correctly 2`] = `
<Suggestions
suggestions="user_groups"
/>
- <HelmetWrapper
- defer={true}
+ <Helmet
+ defer={false}
encodeSpecialCharacters={true}
title="user_groups.page"
/>
diff --git a/server/sonar-web/src/main/js/apps/issues/components/App.tsx b/server/sonar-web/src/main/js/apps/issues/components/App.tsx
index 1fdb546dda4..237aae53a18 100644
--- a/server/sonar-web/src/main/js/apps/issues/components/App.tsx
+++ b/server/sonar-web/src/main/js/apps/issues/components/App.tsx
@@ -20,7 +20,7 @@
import * as key from 'keymaster';
import { debounce, keyBy, omit, without } from 'lodash';
import * as React from 'react';
-import Helmet from 'react-helmet';
+import { Helmet } from 'react-helmet-async';
import { FormattedMessage } from 'react-intl';
import { connect } from 'react-redux';
import { Button } from 'sonar-ui-common/components/controls/buttons';
@@ -1169,7 +1169,7 @@ export class App extends React.PureComponent<Props, State> {
return (
<div className="layout-page issues" id="issues-page">
<Suggestions suggestions="issues" />
- <Helmet title={openIssue ? openIssue.message : translate('issues.page')} />
+ <Helmet defer={false} title={openIssue ? openIssue.message : translate('issues.page')} />
{this.renderSide(openIssue)}
diff --git a/server/sonar-web/src/main/js/apps/issues/components/__tests__/__snapshots__/App-test.tsx.snap b/server/sonar-web/src/main/js/apps/issues/components/__tests__/__snapshots__/App-test.tsx.snap
index 29638709728..5953cce8636 100644
--- a/server/sonar-web/src/main/js/apps/issues/components/__tests__/__snapshots__/App-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/issues/components/__tests__/__snapshots__/App-test.tsx.snap
@@ -28,8 +28,8 @@ exports[`should switch to source view if an issue is selected 1`] = `
<Suggestions
suggestions="issues"
/>
- <HelmetWrapper
- defer={true}
+ <Helmet
+ defer={false}
encodeSpecialCharacters={true}
title="issues.page"
/>
@@ -370,8 +370,8 @@ exports[`should switch to source view if an issue is selected 2`] = `
<Suggestions
suggestions="issues"
/>
- <HelmetWrapper
- defer={true}
+ <Helmet
+ defer={false}
encodeSpecialCharacters={true}
title="Reduce the number of conditional operators (4) used in the expression"
/>
diff --git a/server/sonar-web/src/main/js/apps/maintenance/components/App.tsx b/server/sonar-web/src/main/js/apps/maintenance/components/App.tsx
index ea72c28fd20..1f776921f25 100644
--- a/server/sonar-web/src/main/js/apps/maintenance/components/App.tsx
+++ b/server/sonar-web/src/main/js/apps/maintenance/components/App.tsx
@@ -19,7 +19,7 @@
*/
import * as classNames from 'classnames';
import * as React from 'react';
-import Helmet from 'react-helmet';
+import { Helmet } from 'react-helmet-async';
import { FormattedMessage } from 'react-intl';
import { Button } from 'sonar-ui-common/components/controls/buttons';
import { translate } from 'sonar-ui-common/helpers/l10n';
@@ -133,7 +133,7 @@ export default class App extends React.PureComponent<Props, State> {
return (
<>
- <Helmet defaultTitle={translate('maintenance.page')} />
+ <Helmet defaultTitle={translate('maintenance.page')} defer={false} />
<div className="page-wrapper-simple" id="bd">
<div
className={classNames('page-simple', {
diff --git a/server/sonar-web/src/main/js/apps/maintenance/components/__tests__/__snapshots__/App-test.tsx.snap b/server/sonar-web/src/main/js/apps/maintenance/components/__tests__/__snapshots__/App-test.tsx.snap
index e0606efd1df..1c9dbb2b24e 100644
--- a/server/sonar-web/src/main/js/apps/maintenance/components/__tests__/__snapshots__/App-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/maintenance/components/__tests__/__snapshots__/App-test.tsx.snap
@@ -2,9 +2,9 @@
exports[`Maintenance Page should render DB_MIGRATION_NEEDED status 1`] = `
<Fragment>
- <HelmetWrapper
+ <Helmet
defaultTitle="maintenance.page"
- defer={true}
+ defer={false}
encodeSpecialCharacters={true}
/>
<div
@@ -63,9 +63,9 @@ exports[`Maintenance Page should render DB_MIGRATION_NEEDED status 1`] = `
exports[`Maintenance Page should render DB_MIGRATION_RUNNING status 1`] = `
<Fragment>
- <HelmetWrapper
+ <Helmet
defaultTitle="maintenance.page"
- defer={true}
+ defer={false}
encodeSpecialCharacters={true}
/>
<div
@@ -124,9 +124,9 @@ exports[`Maintenance Page should render DB_MIGRATION_RUNNING status 1`] = `
exports[`Maintenance Page should render DOWN status 1`] = `
<Fragment>
- <HelmetWrapper
+ <Helmet
defaultTitle="maintenance.page"
- defer={true}
+ defer={false}
encodeSpecialCharacters={true}
/>
<div
@@ -165,9 +165,9 @@ exports[`Maintenance Page should render DOWN status 1`] = `
exports[`Maintenance Page should render OFFLINE status 1`] = `
<Fragment>
- <HelmetWrapper
+ <Helmet
defaultTitle="maintenance.page"
- defer={true}
+ defer={false}
encodeSpecialCharacters={true}
/>
<div
@@ -206,9 +206,9 @@ exports[`Maintenance Page should render OFFLINE status 1`] = `
exports[`Maintenance Page should render STARTING status 1`] = `
<Fragment>
- <HelmetWrapper
+ <Helmet
defaultTitle="maintenance.page"
- defer={true}
+ defer={false}
encodeSpecialCharacters={true}
/>
<div
@@ -240,9 +240,9 @@ exports[`Maintenance Page should render STARTING status 1`] = `
exports[`Maintenance Page should render UP status 1`] = `
<Fragment>
- <HelmetWrapper
+ <Helmet
defaultTitle="maintenance.page"
- defer={true}
+ defer={false}
encodeSpecialCharacters={true}
/>
<div
@@ -281,9 +281,9 @@ exports[`Maintenance Page should render UP status 1`] = `
exports[`Setup Page should render MIGRATION_FAILED state 1`] = `
<Fragment>
- <HelmetWrapper
+ <Helmet
defaultTitle="maintenance.page"
- defer={true}
+ defer={false}
encodeSpecialCharacters={true}
/>
<div
@@ -311,9 +311,9 @@ exports[`Setup Page should render MIGRATION_FAILED state 1`] = `
exports[`Setup Page should render MIGRATION_SUCCEEDED state 1`] = `
<Fragment>
- <HelmetWrapper
+ <Helmet
defaultTitle="maintenance.page"
- defer={true}
+ defer={false}
encodeSpecialCharacters={true}
/>
<div
@@ -345,9 +345,9 @@ exports[`Setup Page should render MIGRATION_SUCCEEDED state 1`] = `
exports[`Setup Page should render NO_MIGRATION state 1`] = `
<Fragment>
- <HelmetWrapper
+ <Helmet
defaultTitle="maintenance.page"
- defer={true}
+ defer={false}
encodeSpecialCharacters={true}
/>
<div
@@ -379,9 +379,9 @@ exports[`Setup Page should render NO_MIGRATION state 1`] = `
exports[`Setup Page should render NOT_SUPPORTED state 1`] = `
<Fragment>
- <HelmetWrapper
+ <Helmet
defaultTitle="maintenance.page"
- defer={true}
+ defer={false}
encodeSpecialCharacters={true}
/>
<div
@@ -407,9 +407,9 @@ exports[`Setup Page should render NOT_SUPPORTED state 1`] = `
exports[`Setup Page should start migration 1`] = `
<Fragment>
- <HelmetWrapper
+ <Helmet
defaultTitle="maintenance.page"
- defer={true}
+ defer={false}
encodeSpecialCharacters={true}
/>
<div
@@ -457,9 +457,9 @@ exports[`Setup Page should start migration 1`] = `
exports[`Setup Page should start migration 2`] = `
<Fragment>
- <HelmetWrapper
+ <Helmet
defaultTitle="maintenance.page"
- defer={true}
+ defer={false}
encodeSpecialCharacters={true}
/>
<div
diff --git a/server/sonar-web/src/main/js/apps/marketplace/App.tsx b/server/sonar-web/src/main/js/apps/marketplace/App.tsx
index bc279bbfab0..fc0b4f8484c 100644
--- a/server/sonar-web/src/main/js/apps/marketplace/App.tsx
+++ b/server/sonar-web/src/main/js/apps/marketplace/App.tsx
@@ -19,7 +19,7 @@
*/
import { sortBy, uniqBy } from 'lodash';
import * as React from 'react';
-import Helmet from 'react-helmet';
+import { Helmet } from 'react-helmet-async';
import { translate } from 'sonar-ui-common/helpers/l10n';
import {
getAvailablePlugins,
diff --git a/server/sonar-web/src/main/js/apps/organizationMembers/OrganizationMembers.tsx b/server/sonar-web/src/main/js/apps/organizationMembers/OrganizationMembers.tsx
index 90bb6e760db..766921c28cf 100644
--- a/server/sonar-web/src/main/js/apps/organizationMembers/OrganizationMembers.tsx
+++ b/server/sonar-web/src/main/js/apps/organizationMembers/OrganizationMembers.tsx
@@ -18,7 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import Helmet from 'react-helmet';
+import { Helmet } from 'react-helmet-async';
import ListFooter from 'sonar-ui-common/components/controls/ListFooter';
import { translate } from 'sonar-ui-common/helpers/l10n';
import { addMember, removeMember, searchMembers } from '../../api/organizations';
@@ -199,7 +199,7 @@ export default class OrganizationMembers extends React.PureComponent<Props, Stat
const hasMemberSync = organization.alm && organization.alm.membersSync;
return (
<div className="page page-limited">
- <Helmet title={translate('organization.members.page')} />
+ <Helmet defer={false} title={translate('organization.members.page')} />
<Suggestions suggestions="organization_members" />
<A11ySkipTarget anchor="members_main" />
<MembersPageHeader
diff --git a/server/sonar-web/src/main/js/apps/organizationMembers/__tests__/__snapshots__/OrganizationMembers-test.tsx.snap b/server/sonar-web/src/main/js/apps/organizationMembers/__tests__/__snapshots__/OrganizationMembers-test.tsx.snap
index b10011aca00..23fbb81a067 100644
--- a/server/sonar-web/src/main/js/apps/organizationMembers/__tests__/__snapshots__/OrganizationMembers-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/organizationMembers/__tests__/__snapshots__/OrganizationMembers-test.tsx.snap
@@ -4,8 +4,8 @@ exports[`should fetch members and render for non-admin 1`] = `
<div
className="page page-limited"
>
- <HelmetWrapper
- defer={true}
+ <Helmet
+ defer={false}
encodeSpecialCharacters={true}
title="organization.members.page"
/>
@@ -33,8 +33,8 @@ exports[`should fetch members and render for non-admin 2`] = `
<div
className="page page-limited"
>
- <HelmetWrapper
- defer={true}
+ <Helmet
+ defer={false}
encodeSpecialCharacters={true}
title="organization.members.page"
/>
diff --git a/server/sonar-web/src/main/js/apps/organizations/components/OrganizationEdit.tsx b/server/sonar-web/src/main/js/apps/organizations/components/OrganizationEdit.tsx
index 633ecf1b17c..da74e304893 100644
--- a/server/sonar-web/src/main/js/apps/organizations/components/OrganizationEdit.tsx
+++ b/server/sonar-web/src/main/js/apps/organizations/components/OrganizationEdit.tsx
@@ -19,7 +19,7 @@
*/
import { debounce } from 'lodash';
import * as React from 'react';
-import Helmet from 'react-helmet';
+import { Helmet } from 'react-helmet-async';
import { connect } from 'react-redux';
import { SubmitButton } from 'sonar-ui-common/components/controls/buttons';
import { translate } from 'sonar-ui-common/helpers/l10n';
@@ -113,7 +113,7 @@ export class OrganizationEdit extends React.PureComponent<Props, State> {
return (
<div className="page page-limited">
- <Helmet title={title} />
+ <Helmet defer={false} title={title} />
<header className="page-header">
<h1 className="page-title">{title}</h1>
diff --git a/server/sonar-web/src/main/js/apps/organizations/components/OrganizationPage.tsx b/server/sonar-web/src/main/js/apps/organizations/components/OrganizationPage.tsx
index 28574fb0e0d..6e97d53198c 100644
--- a/server/sonar-web/src/main/js/apps/organizations/components/OrganizationPage.tsx
+++ b/server/sonar-web/src/main/js/apps/organizations/components/OrganizationPage.tsx
@@ -19,7 +19,7 @@
*/
import { Location } from 'history';
import * as React from 'react';
-import Helmet from 'react-helmet';
+import { Helmet } from 'react-helmet-async';
import { connect } from 'react-redux';
import Suggestions from '../../../app/components/embed-docs-modal/Suggestions';
import NotFound from '../../../app/components/NotFound';
@@ -97,7 +97,11 @@ export class OrganizationPage extends React.PureComponent<Props, State> {
return (
<div>
- <Helmet defaultTitle={organization.name} titleTemplate={'%s - ' + organization.name} />
+ <Helmet
+ defaultTitle={organization.name}
+ defer={false}
+ titleTemplate={`%s - ${organization.name}`}
+ />
<Suggestions suggestions="organization_space" />
<OrganizationNavigation
currentUser={this.props.currentUser}
diff --git a/server/sonar-web/src/main/js/apps/organizations/components/__tests__/__snapshots__/OrganizationEdit-test.tsx.snap b/server/sonar-web/src/main/js/apps/organizations/components/__tests__/__snapshots__/OrganizationEdit-test.tsx.snap
index b80d299eb16..fbb063779aa 100644
--- a/server/sonar-web/src/main/js/apps/organizations/components/__tests__/__snapshots__/OrganizationEdit-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/organizations/components/__tests__/__snapshots__/OrganizationEdit-test.tsx.snap
@@ -4,8 +4,8 @@ exports[`smoke test 1`] = `
<div
className="page page-limited"
>
- <HelmetWrapper
- defer={true}
+ <Helmet
+ defer={false}
encodeSpecialCharacters={true}
title="organization.settings"
/>
@@ -164,8 +164,8 @@ exports[`smoke test 2`] = `
<div
className="page page-limited"
>
- <HelmetWrapper
- defer={true}
+ <Helmet
+ defer={false}
encodeSpecialCharacters={true}
title="organization.settings"
/>
@@ -324,8 +324,8 @@ exports[`smoke test 3`] = `
<div
className="page page-limited"
>
- <HelmetWrapper
- defer={true}
+ <Helmet
+ defer={false}
encodeSpecialCharacters={true}
title="organization.settings"
/>
diff --git a/server/sonar-web/src/main/js/apps/organizations/components/__tests__/__snapshots__/OrganizationPage-test.tsx.snap b/server/sonar-web/src/main/js/apps/organizations/components/__tests__/__snapshots__/OrganizationPage-test.tsx.snap
index 9836ed00ed4..df00c8a8a01 100644
--- a/server/sonar-web/src/main/js/apps/organizations/components/__tests__/__snapshots__/OrganizationPage-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/organizations/components/__tests__/__snapshots__/OrganizationPage-test.tsx.snap
@@ -19,9 +19,9 @@ Array [
exports[`smoke test 1`] = `
<div>
- <HelmetWrapper
+ <Helmet
defaultTitle="Foo"
- defer={true}
+ defer={false}
encodeSpecialCharacters={true}
titleTemplate="%s - Foo"
/>
diff --git a/server/sonar-web/src/main/js/apps/overview/components/App.tsx b/server/sonar-web/src/main/js/apps/overview/components/App.tsx
index db723584e8a..3a25fa68865 100644
--- a/server/sonar-web/src/main/js/apps/overview/components/App.tsx
+++ b/server/sonar-web/src/main/js/apps/overview/components/App.tsx
@@ -18,7 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import { Helmet } from 'react-helmet';
+import { Helmet } from 'react-helmet-async';
import { lazyLoad } from 'sonar-ui-common/components/lazyLoad';
import { getBaseUrl, getPathUrlAsString } from 'sonar-ui-common/helpers/urls';
import Suggestions from '../../../app/components/embed-docs-modal/Suggestions';
diff --git a/server/sonar-web/src/main/js/apps/permission-templates/components/Home.tsx b/server/sonar-web/src/main/js/apps/permission-templates/components/Home.tsx
index 4558a6db10d..cd06304d915 100644
--- a/server/sonar-web/src/main/js/apps/permission-templates/components/Home.tsx
+++ b/server/sonar-web/src/main/js/apps/permission-templates/components/Home.tsx
@@ -18,7 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import Helmet from 'react-helmet';
+import { Helmet } from 'react-helmet-async';
import { translate } from 'sonar-ui-common/helpers/l10n';
import Header from './Header';
import List from './List';
@@ -35,7 +35,7 @@ interface Props {
export default function Home(props: Props) {
return (
<div className="page page-limited">
- <Helmet title={translate('permission_templates.page')} />
+ <Helmet defer={false} title={translate('permission_templates.page')} />
<Header organization={props.organization} ready={props.ready} refresh={props.refresh} />
diff --git a/server/sonar-web/src/main/js/apps/permission-templates/components/Template.tsx b/server/sonar-web/src/main/js/apps/permission-templates/components/Template.tsx
index 7e501b0c361..5aa316db1c1 100644
--- a/server/sonar-web/src/main/js/apps/permission-templates/components/Template.tsx
+++ b/server/sonar-web/src/main/js/apps/permission-templates/components/Template.tsx
@@ -18,7 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import Helmet from 'react-helmet';
+import { Helmet } from 'react-helmet-async';
import { translate } from 'sonar-ui-common/helpers/l10n';
import * as api from '../../../api/permissions';
import HoldersList from '../../permissions/shared/components/HoldersList';
@@ -198,7 +198,7 @@ export default class Template extends React.PureComponent<Props, State> {
return (
<div className="page page-limited">
- <Helmet title={this.props.template.name} />
+ <Helmet defer={false} title={this.props.template.name} />
<TemplateHeader
loading={this.state.loading}
diff --git a/server/sonar-web/src/main/js/apps/permissions/global/components/App.tsx b/server/sonar-web/src/main/js/apps/permissions/global/components/App.tsx
index ee17154254e..b8bbb81ae98 100644
--- a/server/sonar-web/src/main/js/apps/permissions/global/components/App.tsx
+++ b/server/sonar-web/src/main/js/apps/permissions/global/components/App.tsx
@@ -19,7 +19,7 @@
*/
import { without } from 'lodash';
import * as React from 'react';
-import Helmet from 'react-helmet';
+import { Helmet } from 'react-helmet-async';
import { translate } from 'sonar-ui-common/helpers/l10n';
import * as api from '../../../../api/permissions';
import Suggestions from '../../../../app/components/embed-docs-modal/Suggestions';
@@ -273,7 +273,7 @@ export default class App extends React.PureComponent<Props, State> {
return (
<div className="page page-limited">
<Suggestions suggestions="global_permissions" />
- <Helmet title={translate('global_permissions.permission')} />
+ <Helmet defer={false} title={translate('global_permissions.permission')} />
<PageHeader loading={this.state.loading} organization={this.props.organization} />
<AllHoldersList
filter={this.state.filter}
diff --git a/server/sonar-web/src/main/js/apps/permissions/global/components/__tests__/__snapshots__/App-test.tsx.snap b/server/sonar-web/src/main/js/apps/permissions/global/components/__tests__/__snapshots__/App-test.tsx.snap
index e204f06b3de..a22f405ecc5 100644
--- a/server/sonar-web/src/main/js/apps/permissions/global/components/__tests__/__snapshots__/App-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/permissions/global/components/__tests__/__snapshots__/App-test.tsx.snap
@@ -7,8 +7,8 @@ exports[`should render correctly 1`] = `
<Suggestions
suggestions="global_permissions"
/>
- <HelmetWrapper
- defer={true}
+ <Helmet
+ defer={false}
encodeSpecialCharacters={true}
title="global_permissions.permission"
/>
@@ -46,8 +46,8 @@ exports[`should render correctly 2`] = `
<Suggestions
suggestions="global_permissions"
/>
- <HelmetWrapper
- defer={true}
+ <Helmet
+ defer={false}
encodeSpecialCharacters={true}
title="global_permissions.permission"
/>
diff --git a/server/sonar-web/src/main/js/apps/permissions/project/components/App.tsx b/server/sonar-web/src/main/js/apps/permissions/project/components/App.tsx
index d909cba2012..586e1503a1e 100644
--- a/server/sonar-web/src/main/js/apps/permissions/project/components/App.tsx
+++ b/server/sonar-web/src/main/js/apps/permissions/project/components/App.tsx
@@ -19,7 +19,7 @@
*/
import { without } from 'lodash';
import * as React from 'react';
-import Helmet from 'react-helmet';
+import { Helmet } from 'react-helmet-async';
import { translate } from 'sonar-ui-common/helpers/l10n';
import * as api from '../../../../api/permissions';
import VisibilitySelector from '../../../../components/common/VisibilitySelector';
@@ -371,7 +371,7 @@ export default class App extends React.PureComponent<Props, State> {
return (
<div className="page page-limited" id="project-permissions-page">
- <Helmet title={translate('permissions.page')} />
+ <Helmet defer={false} title={translate('permissions.page')} />
<PageHeader
component={component}
diff --git a/server/sonar-web/src/main/js/apps/permissions/project/components/__tests__/__snapshots__/App-test.tsx.snap b/server/sonar-web/src/main/js/apps/permissions/project/components/__tests__/__snapshots__/App-test.tsx.snap
index 0cacc59dfc9..2348992ede3 100644
--- a/server/sonar-web/src/main/js/apps/permissions/project/components/__tests__/__snapshots__/App-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/permissions/project/components/__tests__/__snapshots__/App-test.tsx.snap
@@ -5,8 +5,8 @@ exports[`should render correctly 1`] = `
className="page page-limited"
id="project-permissions-page"
>
- <HelmetWrapper
- defer={true}
+ <Helmet
+ defer={false}
encodeSpecialCharacters={true}
title="permissions.page"
/>
@@ -88,8 +88,8 @@ exports[`should render correctly 2`] = `
className="page page-limited"
id="project-permissions-page"
>
- <HelmetWrapper
- defer={true}
+ <Helmet
+ defer={false}
encodeSpecialCharacters={true}
title="permissions.page"
/>
diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityApp.tsx b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityApp.tsx
index af7750f6a70..d586c683458 100644
--- a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityApp.tsx
+++ b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityApp.tsx
@@ -18,7 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import Helmet from 'react-helmet';
+import { Helmet } from 'react-helmet-async';
import { parseDate } from 'sonar-ui-common/helpers/dates';
import { translate } from 'sonar-ui-common/helpers/l10n';
import A11ySkipTarget from '../../../app/components/a11y/A11ySkipTarget';
@@ -56,7 +56,7 @@ export default function ProjectActivityApp(props: Props) {
return (
<div className="page page-limited" id="project-activity">
<Suggestions suggestions="project_activity" />
- <Helmet title={translate('project_activity.page')} />
+ <Helmet defer={false} title={translate('project_activity.page')} />
<A11ySkipTarget anchor="activity_main" />
diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/ProjectActivityApp-test.tsx.snap b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/ProjectActivityApp-test.tsx.snap
index caa6cdf253c..ac2a991a3c9 100644
--- a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/ProjectActivityApp-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/ProjectActivityApp-test.tsx.snap
@@ -8,8 +8,8 @@ exports[`should render correctly 1`] = `
<Suggestions
suggestions="project_activity"
/>
- <HelmetWrapper
- defer={true}
+ <Helmet
+ defer={false}
encodeSpecialCharacters={true}
title="project_activity.page"
/>
diff --git a/server/sonar-web/src/main/js/apps/projectDeletion/App.tsx b/server/sonar-web/src/main/js/apps/projectDeletion/App.tsx
index 3ff820eab2c..a57cca56f9c 100644
--- a/server/sonar-web/src/main/js/apps/projectDeletion/App.tsx
+++ b/server/sonar-web/src/main/js/apps/projectDeletion/App.tsx
@@ -18,7 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import Helmet from 'react-helmet';
+import { Helmet } from 'react-helmet-async';
import { translate } from 'sonar-ui-common/helpers/l10n';
import Form from './Form';
import Header from './Header';
@@ -30,7 +30,7 @@ interface Props {
export default function App(props: Props) {
return (
<div className="page page-limited">
- <Helmet title={translate('deletion.page')} />
+ <Helmet defer={false} title={translate('deletion.page')} />
<Header component={props.component} />
<Form component={props.component} />
</div>
diff --git a/server/sonar-web/src/main/js/apps/projectDeletion/__tests__/__snapshots__/App-test.tsx.snap b/server/sonar-web/src/main/js/apps/projectDeletion/__tests__/__snapshots__/App-test.tsx.snap
index 4bbc7bf918a..162b55e77fd 100644
--- a/server/sonar-web/src/main/js/apps/projectDeletion/__tests__/__snapshots__/App-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/projectDeletion/__tests__/__snapshots__/App-test.tsx.snap
@@ -4,8 +4,8 @@ exports[`should render 1`] = `
<div
className="page page-limited"
>
- <HelmetWrapper
- defer={true}
+ <Helmet
+ defer={false}
encodeSpecialCharacters={true}
title="deletion.page"
/>
diff --git a/server/sonar-web/src/main/js/apps/projectKey/Key.tsx b/server/sonar-web/src/main/js/apps/projectKey/Key.tsx
index 6b4c6cddc1a..692ede78f58 100644
--- a/server/sonar-web/src/main/js/apps/projectKey/Key.tsx
+++ b/server/sonar-web/src/main/js/apps/projectKey/Key.tsx
@@ -18,7 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import Helmet from 'react-helmet';
+import { Helmet } from 'react-helmet-async';
import { withRouter, WithRouterProps } from 'react-router';
import { translate } from 'sonar-ui-common/helpers/l10n';
import { changeKey } from '../../api/components';
@@ -41,7 +41,7 @@ export class Key extends React.PureComponent<Props & WithRouterProps> {
const { component } = this.props;
return (
<div className="page page-limited" id="project-key">
- <Helmet title={translate('update_key.page')} />
+ <Helmet defer={false} title={translate('update_key.page')} />
<header className="page-header">
<h1 className="page-title">{translate('update_key.page')}</h1>
<div className="page-description">{translate('update_key.page.description')}</div>
diff --git a/server/sonar-web/src/main/js/apps/projectKey/__tests__/__snapshots__/Key-test.tsx.snap b/server/sonar-web/src/main/js/apps/projectKey/__tests__/__snapshots__/Key-test.tsx.snap
index da5365e6d5c..84897de357a 100644
--- a/server/sonar-web/src/main/js/apps/projectKey/__tests__/__snapshots__/Key-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/projectKey/__tests__/__snapshots__/Key-test.tsx.snap
@@ -5,8 +5,8 @@ exports[`should render and change key 1`] = `
className="page page-limited"
id="project-key"
>
- <HelmetWrapper
- defer={true}
+ <Helmet
+ defer={false}
encodeSpecialCharacters={true}
title="update_key.page"
/>
diff --git a/server/sonar-web/src/main/js/apps/projectLinks/App.tsx b/server/sonar-web/src/main/js/apps/projectLinks/App.tsx
index 4130098fc83..ab0b7fce8bc 100644
--- a/server/sonar-web/src/main/js/apps/projectLinks/App.tsx
+++ b/server/sonar-web/src/main/js/apps/projectLinks/App.tsx
@@ -18,7 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import Helmet from 'react-helmet';
+import { Helmet } from 'react-helmet-async';
import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner';
import { translate } from 'sonar-ui-common/helpers/l10n';
import { createLink, deleteLink, getProjectLinks } from '../../api/projectLinks';
@@ -92,7 +92,7 @@ export default class App extends React.PureComponent<Props, State> {
render() {
return (
<div className="page page-limited">
- <Helmet title={translate('project_links.page')} />
+ <Helmet defer={false} title={translate('project_links.page')} />
<Header onCreate={this.handleCreateLink} />
<DeferredSpinner loading={this.state.loading}>
{this.state.links && <Table links={this.state.links} onDelete={this.handleDeleteLink} />}
diff --git a/server/sonar-web/src/main/js/apps/projectLinks/__tests__/__snapshots__/App-test.tsx.snap b/server/sonar-web/src/main/js/apps/projectLinks/__tests__/__snapshots__/App-test.tsx.snap
index b817f3fbcfd..1062c8f90cd 100644
--- a/server/sonar-web/src/main/js/apps/projectLinks/__tests__/__snapshots__/App-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/projectLinks/__tests__/__snapshots__/App-test.tsx.snap
@@ -4,8 +4,8 @@ exports[`should create link 1`] = `
<div
className="page page-limited"
>
- <HelmetWrapper
- defer={true}
+ <Helmet
+ defer={false}
encodeSpecialCharacters={true}
title="project_links.page"
/>
@@ -48,8 +48,8 @@ exports[`should delete link 1`] = `
<div
className="page page-limited"
>
- <HelmetWrapper
- defer={true}
+ <Helmet
+ defer={false}
encodeSpecialCharacters={true}
title="project_links.page"
/>
@@ -86,8 +86,8 @@ exports[`should fetch links and render 1`] = `
<div
className="page page-limited"
>
- <HelmetWrapper
- defer={true}
+ <Helmet
+ defer={false}
encodeSpecialCharacters={true}
title="project_links.page"
/>
diff --git a/server/sonar-web/src/main/js/apps/projectQualityGate/App.tsx b/server/sonar-web/src/main/js/apps/projectQualityGate/App.tsx
index ff65af05222..fa6f38802eb 100644
--- a/server/sonar-web/src/main/js/apps/projectQualityGate/App.tsx
+++ b/server/sonar-web/src/main/js/apps/projectQualityGate/App.tsx
@@ -18,7 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import Helmet from 'react-helmet';
+import { Helmet } from 'react-helmet-async';
import { translate } from 'sonar-ui-common/helpers/l10n';
import {
associateGateWithProject,
@@ -133,7 +133,7 @@ export default class App extends React.PureComponent<Props> {
return (
<div className="page page-limited" id="project-quality-gate">
<Suggestions suggestions="project_quality_gate" />
- <Helmet title={translate('project_quality_gate.page')} />
+ <Helmet defer={false} title={translate('project_quality_gate.page')} />
<A11ySkipTarget anchor="qg_main" />
<Header />
{loading ? (
diff --git a/server/sonar-web/src/main/js/apps/projectQualityProfiles/App.tsx b/server/sonar-web/src/main/js/apps/projectQualityProfiles/App.tsx
index 19821a0b93b..8fd4a17e1f9 100644
--- a/server/sonar-web/src/main/js/apps/projectQualityProfiles/App.tsx
+++ b/server/sonar-web/src/main/js/apps/projectQualityProfiles/App.tsx
@@ -18,7 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import Helmet from 'react-helmet';
+import { Helmet } from 'react-helmet-async';
import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n';
import {
associateProject,
@@ -131,7 +131,7 @@ export default class QualityProfiles extends React.PureComponent<Props, State> {
return (
<div className="page page-limited">
<Suggestions suggestions="project_quality_profiles" />
- <Helmet title={translate('project_quality_profiles.page')} />
+ <Helmet defer={false} title={translate('project_quality_profiles.page')} />
<A11ySkipTarget anchor="profiles_main" />
diff --git a/server/sonar-web/src/main/js/apps/projects/components/AllProjects.tsx b/server/sonar-web/src/main/js/apps/projects/components/AllProjects.tsx
index b4cfb2333e7..07aee81409d 100644
--- a/server/sonar-web/src/main/js/apps/projects/components/AllProjects.tsx
+++ b/server/sonar-web/src/main/js/apps/projects/components/AllProjects.tsx
@@ -19,7 +19,7 @@
*/
import { omitBy } from 'lodash';
import * as React from 'react';
-import Helmet from 'react-helmet';
+import { Helmet } from 'react-helmet-async';
import ListFooter from 'sonar-ui-common/components/controls/ListFooter';
import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner';
import handleRequiredAuthentication from 'sonar-ui-common/helpers/handleRequiredAuthentication';
@@ -364,7 +364,7 @@ export class AllProjects extends React.PureComponent<Props, State> {
return (
<div className="layout-page projects-page" id="projects-page">
<Suggestions suggestions="projects" />
- <Helmet title={translate('projects.page')} />
+ <Helmet defer={false} title={translate('projects.page')} />
{initialLoading ? (
<div className="display-flex-space-around width-100 huge-spacer-top">
diff --git a/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/AllProjects-test.tsx.snap b/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/AllProjects-test.tsx.snap
index d902f9e0b70..5d307bf0df6 100644
--- a/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/AllProjects-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/AllProjects-test.tsx.snap
@@ -33,8 +33,8 @@ exports[`renders 1`] = `
<Suggestions
suggestions="projects"
/>
- <HelmetWrapper
- defer={true}
+ <Helmet
+ defer={false}
encodeSpecialCharacters={true}
title="projects.page"
/>
@@ -179,8 +179,8 @@ exports[`renders 2`] = `
<Suggestions
suggestions="projects"
/>
- <HelmetWrapper
- defer={true}
+ <Helmet
+ defer={false}
encodeSpecialCharacters={true}
title="projects.page"
/>
@@ -271,8 +271,8 @@ exports[`renders correctly empty organization 1`] = `
<Suggestions
suggestions="projects"
/>
- <HelmetWrapper
- defer={true}
+ <Helmet
+ defer={false}
encodeSpecialCharacters={true}
title="projects.page"
/>
@@ -294,8 +294,8 @@ exports[`renders correctly empty organization 2`] = `
<Suggestions
suggestions="projects"
/>
- <HelmetWrapper
- defer={true}
+ <Helmet
+ defer={false}
encodeSpecialCharacters={true}
title="projects.page"
/>
@@ -320,8 +320,8 @@ exports[`renders correctly empty organization 3`] = `
<Suggestions
suggestions="projects"
/>
- <HelmetWrapper
- defer={true}
+ <Helmet
+ defer={false}
encodeSpecialCharacters={true}
title="projects.page"
/>
diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/App.tsx b/server/sonar-web/src/main/js/apps/projectsManagement/App.tsx
index 88215024d1d..f61ebdf5ddb 100644
--- a/server/sonar-web/src/main/js/apps/projectsManagement/App.tsx
+++ b/server/sonar-web/src/main/js/apps/projectsManagement/App.tsx
@@ -19,7 +19,7 @@
*/
import { debounce, uniq, without } from 'lodash';
import * as React from 'react';
-import Helmet from 'react-helmet';
+import { Helmet } from 'react-helmet-async';
import ListFooter from 'sonar-ui-common/components/controls/ListFooter';
import { toShortNotSoISOString } from 'sonar-ui-common/helpers/dates';
import { translate } from 'sonar-ui-common/helpers/l10n';
@@ -183,7 +183,7 @@ export default class App extends React.PureComponent<Props, State> {
return (
<div className="page page-limited" id="projects-management-page">
<Suggestions suggestions="projects_management" />
- <Helmet title={translate('projects_management')} />
+ <Helmet defer={false} title={translate('projects_management')} />
<Header
hasProvisionPermission={this.props.hasProvisionPermission}
diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/App.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/App.tsx
index e7a1f25bdf4..9506b773e74 100644
--- a/server/sonar-web/src/main/js/apps/quality-gates/components/App.tsx
+++ b/server/sonar-web/src/main/js/apps/quality-gates/components/App.tsx
@@ -18,7 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import Helmet from 'react-helmet';
+import { Helmet } from 'react-helmet-async';
import { WithRouterProps } from 'react-router';
import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner';
import { translate } from 'sonar-ui-common/helpers/l10n';
@@ -120,7 +120,7 @@ class App extends React.PureComponent<Props, State> {
return (
<>
- <Helmet defaultTitle={defaultTitle} titleTemplate={'%s - ' + defaultTitle} />
+ <Helmet defaultTitle={defaultTitle} defer={false} titleTemplate={`%s - ${defaultTitle}`} />
<div className="layout-page" id="quality-gates-page">
<Suggestions suggestions="quality_gates" />
diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/Details.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/Details.tsx
index cb4e762b467..1c0a686dd9b 100644
--- a/server/sonar-web/src/main/js/apps/quality-gates/components/Details.tsx
+++ b/server/sonar-web/src/main/js/apps/quality-gates/components/Details.tsx
@@ -18,7 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import Helmet from 'react-helmet';
+import { Helmet } from 'react-helmet-async';
import { connect } from 'react-redux';
import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner';
import { fetchQualityGate } from '../../../api/quality-gates';
@@ -138,7 +138,7 @@ export class Details extends React.PureComponent<Props, State> {
<DeferredSpinner loading={loading} timeout={200}>
{qualityGate && (
<>
- <Helmet title={qualityGate.name} />
+ <Helmet defer={false} title={qualityGate.name} />
<DetailsHeader
onSetDefault={this.handleSetDefault}
organization={organization}
diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/__snapshots__/Details-test.tsx.snap b/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/__snapshots__/Details-test.tsx.snap
index 4cc1de5c82a..bdcfec6b95d 100644
--- a/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/__snapshots__/Details-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/__snapshots__/Details-test.tsx.snap
@@ -8,8 +8,8 @@ exports[`should render correctly: loaded 1`] = `
loading={false}
timeout={200}
>
- <HelmetWrapper
- defer={true}
+ <Helmet
+ defer={false}
encodeSpecialCharacters={true}
title="qualitygate"
/>
diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileContainer.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileContainer.tsx
index 615604ed3c7..c0d7e479073 100644
--- a/server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileContainer.tsx
+++ b/server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileContainer.tsx
@@ -18,7 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import Helmet from 'react-helmet';
+import { Helmet } from 'react-helmet-async';
import { WithRouterProps } from 'react-router';
import ProfileHeader from '../details/ProfileHeader';
import { Profile } from '../types';
@@ -82,7 +82,7 @@ export default class ProfileContainer extends React.PureComponent<Props & WithRo
return (
<div id="quality-profile">
- <Helmet title={profile.name} />
+ <Helmet defer={false} title={profile.name} />
<ProfileHeader
organization={organization}
profile={profile}
diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/components/__tests__/ProfileContainer-test.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/components/__tests__/ProfileContainer-test.tsx
index 42683348643..e028d15bb4b 100644
--- a/server/sonar-web/src/main/js/apps/quality-profiles/components/__tests__/ProfileContainer-test.tsx
+++ b/server/sonar-web/src/main/js/apps/quality-profiles/components/__tests__/ProfileContainer-test.tsx
@@ -19,7 +19,7 @@
*/
import { shallow } from 'enzyme';
import * as React from 'react';
-import Helmet from 'react-helmet';
+import { Helmet } from 'react-helmet-async';
import { WithRouterProps } from 'react-router';
import { mockQualityProfile } from '../../../../helpers/testMocks';
import ProfileHeader from '../../details/ProfileHeader';
diff --git a/server/sonar-web/src/main/js/apps/settings/components/AppContainer.tsx b/server/sonar-web/src/main/js/apps/settings/components/AppContainer.tsx
index 08d345a05bd..eba2be3ae79 100644
--- a/server/sonar-web/src/main/js/apps/settings/components/AppContainer.tsx
+++ b/server/sonar-web/src/main/js/apps/settings/components/AppContainer.tsx
@@ -19,7 +19,7 @@
*/
import { find } from 'lodash';
import * as React from 'react';
-import Helmet from 'react-helmet';
+import { Helmet } from 'react-helmet-async';
import { connect } from 'react-redux';
import { WithRouterProps } from 'react-router';
import { translate } from 'sonar-ui-common/helpers/l10n';
@@ -93,7 +93,7 @@ export class App extends React.PureComponent<Props & WithRouterProps, State> {
return (
<div className="page page-limited" id="settings-page">
<Suggestions suggestions="settings" />
- <Helmet title={translate('settings.page')} />
+ <Helmet defer={false} title={translate('settings.page')} />
<PageHeader component={this.props.component} />
diff --git a/server/sonar-web/src/main/js/apps/settings/components/__tests__/__snapshots__/AppContainer-test.tsx.snap b/server/sonar-web/src/main/js/apps/settings/components/__tests__/__snapshots__/AppContainer-test.tsx.snap
index d3f5cdc9a8b..cabe4ab6945 100644
--- a/server/sonar-web/src/main/js/apps/settings/components/__tests__/__snapshots__/AppContainer-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/settings/components/__tests__/__snapshots__/AppContainer-test.tsx.snap
@@ -8,8 +8,8 @@ exports[`should render analysis scope correctly 1`] = `
<Suggestions
suggestions="settings"
/>
- <HelmetWrapper
- defer={true}
+ <Helmet
+ defer={false}
encodeSpecialCharacters={true}
title="settings.page"
/>
@@ -44,8 +44,8 @@ exports[`should render default view correctly 1`] = `
<Suggestions
suggestions="settings"
/>
- <HelmetWrapper
- defer={true}
+ <Helmet
+ defer={false}
encodeSpecialCharacters={true}
title="settings.page"
/>
@@ -80,8 +80,8 @@ exports[`should render languages correctly 1`] = `
<Suggestions
suggestions="settings"
/>
- <HelmetWrapper
- defer={true}
+ <Helmet
+ defer={false}
encodeSpecialCharacters={true}
title="settings.page"
/>
@@ -116,8 +116,8 @@ exports[`should render newCodePeriod correctly 1`] = `
<Suggestions
suggestions="settings"
/>
- <HelmetWrapper
- defer={true}
+ <Helmet
+ defer={false}
encodeSpecialCharacters={true}
title="settings.page"
/>
@@ -150,8 +150,8 @@ exports[`should render pull request decoration binding correctly 1`] = `
<Suggestions
suggestions="settings"
/>
- <HelmetWrapper
- defer={true}
+ <Helmet
+ defer={false}
encodeSpecialCharacters={true}
title="settings.page"
/>
@@ -186,8 +186,8 @@ exports[`should render pull request decoration correctly 1`] = `
<Suggestions
suggestions="settings"
/>
- <HelmetWrapper
- defer={true}
+ <Helmet
+ defer={false}
encodeSpecialCharacters={true}
title="settings.page"
/>
diff --git a/server/sonar-web/src/main/js/apps/settings/encryption/EncryptionApp.tsx b/server/sonar-web/src/main/js/apps/settings/encryption/EncryptionApp.tsx
index 76c3750ec94..54996329f85 100644
--- a/server/sonar-web/src/main/js/apps/settings/encryption/EncryptionApp.tsx
+++ b/server/sonar-web/src/main/js/apps/settings/encryption/EncryptionApp.tsx
@@ -18,7 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import Helmet from 'react-helmet';
+import { Helmet } from 'react-helmet-async';
import DeferredSpinner from 'sonar-ui-common/components/ui/DeferredSpinner';
import { translate } from 'sonar-ui-common/helpers/l10n';
import { checkSecretKey, generateSecretKey } from '../../../api/settings';
@@ -71,7 +71,7 @@ export default class EncryptionApp extends React.PureComponent<{}, State> {
const { loading, secretKey, secretKeyAvailable } = this.state;
return (
<div className="page page-limited" id="encryption-page">
- <Helmet title={translate('property.category.security.encryption')} />
+ <Helmet defer={false} title={translate('property.category.security.encryption')} />
<header className="page-header">
<h1 className="page-title">{translate('property.category.security.encryption')}</h1>
<DeferredSpinner loading={loading} />
diff --git a/server/sonar-web/src/main/js/apps/system/components/App.tsx b/server/sonar-web/src/main/js/apps/system/components/App.tsx
index 5f9a69f9d8c..205c98c0e1c 100644
--- a/server/sonar-web/src/main/js/apps/system/components/App.tsx
+++ b/server/sonar-web/src/main/js/apps/system/components/App.tsx
@@ -18,7 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import Helmet from 'react-helmet';
+import { Helmet } from 'react-helmet-async';
import { withRouter, WithRouterProps } from 'react-router';
import { translate } from 'sonar-ui-common/helpers/l10n';
import { getSystemInfo } from '../../../api/system';
@@ -121,7 +121,7 @@ class App extends React.PureComponent<Props, State> {
return (
<div className="page page-limited">
<Suggestions suggestions="system_info" />
- <Helmet title={translate('system_info.page')} />
+ <Helmet defer={false} title={translate('system_info.page')} />
<SystemUpgradeNotif />
{sysInfoData && (
<PageHeader
diff --git a/server/sonar-web/src/main/js/apps/users/UsersApp.tsx b/server/sonar-web/src/main/js/apps/users/UsersApp.tsx
index e9a218cc96a..a06ce473b52 100644
--- a/server/sonar-web/src/main/js/apps/users/UsersApp.tsx
+++ b/server/sonar-web/src/main/js/apps/users/UsersApp.tsx
@@ -18,7 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import Helmet from 'react-helmet';
+import { Helmet } from 'react-helmet-async';
import ListFooter from 'sonar-ui-common/components/controls/ListFooter';
import { translate } from 'sonar-ui-common/helpers/l10n';
import { getIdentityProviders, searchUsers } from '../../api/users';
@@ -120,7 +120,7 @@ export class UsersApp extends React.PureComponent<Props, State> {
return (
<div className="page page-limited" id="users-page">
<Suggestions suggestions="users" />
- <Helmet title={translate('users.page')} />
+ <Helmet defer={false} title={translate('users.page')} />
<Header loading={loading} onUpdateUsers={this.fetchUsers} />
<Search query={query} updateQuery={this.updateQuery} />
<UsersList
diff --git a/server/sonar-web/src/main/js/apps/users/__tests__/__snapshots__/UsersApp-test.tsx.snap b/server/sonar-web/src/main/js/apps/users/__tests__/__snapshots__/UsersApp-test.tsx.snap
index 68ea461d488..3f747643705 100644
--- a/server/sonar-web/src/main/js/apps/users/__tests__/__snapshots__/UsersApp-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/users/__tests__/__snapshots__/UsersApp-test.tsx.snap
@@ -8,8 +8,8 @@ exports[`should render correctly 1`] = `
<Suggestions
suggestions="users"
/>
- <HelmetWrapper
- defer={true}
+ <Helmet
+ defer={false}
encodeSpecialCharacters={true}
title="users.page"
/>
@@ -49,8 +49,8 @@ exports[`should render correctly 2`] = `
<Suggestions
suggestions="users"
/>
- <HelmetWrapper
- defer={true}
+ <Helmet
+ defer={false}
encodeSpecialCharacters={true}
title="users.page"
/>
diff --git a/server/sonar-web/src/main/js/apps/web-api/components/WebApiApp.tsx b/server/sonar-web/src/main/js/apps/web-api/components/WebApiApp.tsx
index 44367d6c0c7..e882d27cf0f 100644
--- a/server/sonar-web/src/main/js/apps/web-api/components/WebApiApp.tsx
+++ b/server/sonar-web/src/main/js/apps/web-api/components/WebApiApp.tsx
@@ -19,7 +19,7 @@
*/
import { maxBy } from 'lodash';
import * as React from 'react';
-import Helmet from 'react-helmet';
+import { Helmet } from 'react-helmet-async';
import { Link, withRouter, WithRouterProps } from 'react-router';
import { translate } from 'sonar-ui-common/helpers/l10n';
import { addSideBarClass, removeSideBarClass } from 'sonar-ui-common/helpers/pages';
@@ -158,7 +158,7 @@ export class WebApiApp extends React.PureComponent<Props, State> {
return (
<div className="layout-page">
<Suggestions suggestions="api_documentation" />
- <Helmet title={translate('api_documentation.page')} />
+ <Helmet defer={false} title={translate('api_documentation.page')} />
<ScreenPositionHelper className="layout-page-side-outer">
{({ top }) => (
<div className="layout-page-side" style={{ top }}>
diff --git a/server/sonar-web/src/main/js/apps/web-api/components/__tests__/__snapshots__/WebApiApp-test.tsx.snap b/server/sonar-web/src/main/js/apps/web-api/components/__tests__/__snapshots__/WebApiApp-test.tsx.snap
index db788e7b310..3c4c81e3623 100644
--- a/server/sonar-web/src/main/js/apps/web-api/components/__tests__/__snapshots__/WebApiApp-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/web-api/components/__tests__/__snapshots__/WebApiApp-test.tsx.snap
@@ -7,8 +7,8 @@ exports[`should render correctly 1`] = `
<Suggestions
suggestions="api_documentation"
/>
- <HelmetWrapper
- defer={true}
+ <Helmet
+ defer={false}
encodeSpecialCharacters={true}
title="api_documentation.page"
/>
diff --git a/server/sonar-web/src/main/js/apps/webhooks/components/App.tsx b/server/sonar-web/src/main/js/apps/webhooks/components/App.tsx
index 5762f3ef146..d4f3346219a 100644
--- a/server/sonar-web/src/main/js/apps/webhooks/components/App.tsx
+++ b/server/sonar-web/src/main/js/apps/webhooks/components/App.tsx
@@ -18,7 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import { Helmet } from 'react-helmet';
+import { Helmet } from 'react-helmet-async';
import { translate } from 'sonar-ui-common/helpers/l10n';
import { createWebhook, deleteWebhook, searchWebhooks, updateWebhook } from '../../../api/webhooks';
import Suggestions from '../../../app/components/embed-docs-modal/Suggestions';
@@ -124,7 +124,7 @@ export default class App extends React.PureComponent<Props, State> {
return (
<>
<Suggestions suggestions="webhooks" />
- <Helmet title={translate('webhooks.page')} />
+ <Helmet defer={false} title={translate('webhooks.page')} />
<div className="page page-limited">
<PageHeader loading={loading}>
diff --git a/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/__snapshots__/App-test.tsx.snap b/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/__snapshots__/App-test.tsx.snap
index c871f49d18a..7cf43d1539a 100644
--- a/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/__snapshots__/App-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/webhooks/components/__tests__/__snapshots__/App-test.tsx.snap
@@ -5,8 +5,8 @@ exports[`should be in loading status 1`] = `
<Suggestions
suggestions="webhooks"
/>
- <HelmetWrapper
- defer={true}
+ <Helmet
+ defer={false}
encodeSpecialCharacters={true}
title="webhooks.page"
/>
@@ -31,8 +31,8 @@ exports[`should fetch webhooks and display them 1`] = `
<Suggestions
suggestions="webhooks"
/>
- <HelmetWrapper
- defer={true}
+ <Helmet
+ defer={false}
encodeSpecialCharacters={true}
title="webhooks.page"
/>