From 7f939f50b63f7c6ac7aab6d8fbb71a06193df0be Mon Sep 17 00:00:00 2001 From: =?utf8?q?Gr=C3=A9goire=20Aubert?= Date: Wed, 10 May 2017 10:32:33 +0200 Subject: [PATCH] Apply review comments --- .../src/main/js/app/components/extensions/Extension.js | 4 +++- .../src/main/js/app/components/extensions/PortfoliosPage.js | 3 --- server/sonar-web/src/main/js/apps/code/components/App.js | 2 +- .../apps/coding-rules/components/CodingRulesAppContainer.js | 2 +- .../js/apps/organizations/components/OrganizationDelete.js | 5 +++-- .../js/apps/organizations/components/OrganizationEdit.js | 5 +++-- .../__tests__/__snapshots__/OrganizationDelete-test.js.snap | 6 +++--- .../__tests__/__snapshots__/OrganizationEdit-test.js.snap | 6 +++--- 8 files changed, 17 insertions(+), 16 deletions(-) diff --git a/server/sonar-web/src/main/js/app/components/extensions/Extension.js b/server/sonar-web/src/main/js/app/components/extensions/Extension.js index 7d05ab8840b..93dac302b0e 100644 --- a/server/sonar-web/src/main/js/app/components/extensions/Extension.js +++ b/server/sonar-web/src/main/js/app/components/extensions/Extension.js @@ -19,6 +19,7 @@ */ // @flow import React from 'react'; +import Helmet from 'react-helmet'; import { connect } from 'react-redux'; import { withRouter } from 'react-router'; import { addGlobalErrorMessage } from '../../../store/globalMessages/duck'; @@ -31,7 +32,7 @@ type Props = { currentUser: Object, extension: { key: string, - title: string + name: string }, location: { hash: string }, onFail: string => void, @@ -94,6 +95,7 @@ class Extension extends React.PureComponent { render() { return (
+
(this.container = container)} />
); diff --git a/server/sonar-web/src/main/js/app/components/extensions/PortfoliosPage.js b/server/sonar-web/src/main/js/app/components/extensions/PortfoliosPage.js index 4e6da93deea..a7f96db6cf6 100644 --- a/server/sonar-web/src/main/js/app/components/extensions/PortfoliosPage.js +++ b/server/sonar-web/src/main/js/app/components/extensions/PortfoliosPage.js @@ -19,14 +19,11 @@ */ // @flow import React from 'react'; -import Helmet from 'react-helmet'; import GlobalPageExtension from './GlobalPageExtension'; -import { translate } from '../../../helpers/l10n'; export default function PortfoliosPage(props: Object) { return (
- - + {error &&
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/CodingRulesAppContainer.js b/server/sonar-web/src/main/js/apps/coding-rules/components/CodingRulesAppContainer.js index 52b1b29d6a1..020977d998a 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/CodingRulesAppContainer.js +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/CodingRulesAppContainer.js @@ -72,7 +72,7 @@ class CodingRulesAppContainer extends React.PureComponent { // but react wants it to be there to unmount it return (
- +
); diff --git a/server/sonar-web/src/main/js/apps/organizations/components/OrganizationDelete.js b/server/sonar-web/src/main/js/apps/organizations/components/OrganizationDelete.js index 1cd73c0be0f..dbfce33a3fd 100644 --- a/server/sonar-web/src/main/js/apps/organizations/components/OrganizationDelete.js +++ b/server/sonar-web/src/main/js/apps/organizations/components/OrganizationDelete.js @@ -95,12 +95,13 @@ class OrganizationDelete extends React.PureComponent { } render() { + const title = translate('organization.delete'); return (
- +
-

{translate('organization.delete')}

+

{title}

{translate('organization.delete.description')}
diff --git a/server/sonar-web/src/main/js/apps/organizations/components/OrganizationEdit.js b/server/sonar-web/src/main/js/apps/organizations/components/OrganizationEdit.js index e108da282a5..a75fd2d9444 100644 --- a/server/sonar-web/src/main/js/apps/organizations/components/OrganizationEdit.js +++ b/server/sonar-web/src/main/js/apps/organizations/components/OrganizationEdit.js @@ -95,12 +95,13 @@ class OrganizationEdit extends React.PureComponent { }; render() { + const title = translate('organization.edit'); return (
- +
-

{translate('organization.edit')}

+

{title}

diff --git a/server/sonar-web/src/main/js/apps/organizations/components/__tests__/__snapshots__/OrganizationDelete-test.js.snap b/server/sonar-web/src/main/js/apps/organizations/components/__tests__/__snapshots__/OrganizationDelete-test.js.snap index fa13f06a074..4762fa4e4d9 100644 --- a/server/sonar-web/src/main/js/apps/organizations/components/__tests__/__snapshots__/OrganizationDelete-test.js.snap +++ b/server/sonar-web/src/main/js/apps/organizations/components/__tests__/__snapshots__/OrganizationDelete-test.js.snap @@ -5,7 +5,7 @@ exports[`smoke test 1`] = ` className="page page-limited" >