Skip to content

Commit

Permalink
Settings: add descriptions to settings sections (#10940)
Browse files Browse the repository at this point in the history
Fixes #10688

#### Changes proposed in this Pull Request:

* Adds descriptions to all settings sections headers explaining the theme of the options below.
* Cleans up dependencies paths on `settings/index.jsx`.

![image](https://user-images.githubusercontent.com/390760/49929419-606e1780-feba-11e8-82e2-8da1b914524a.png)

#### Testing instructions:

* Fire up this PR.
* Go to Jetpack settings.
* Read the descriptions on each section.

#### Proposed changelog entry for your changes:

* Settings: add descriptions to settings sections
  • Loading branch information
keoshi authored and jeherve committed Dec 13, 2018
1 parent ba4d5e8 commit bc56ba4
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 7 deletions.
8 changes: 8 additions & 0 deletions _inc/client/discussion/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
*/
import React from 'react';
import { connect } from 'react-redux';
import { translate as __ } from 'i18n-calypso';

/**
* Internal dependencies
*/
import Card from 'components/card';
import { getModule, getModuleOverride } from 'state/modules';
import { getSettings } from 'state/settings';
import { isDevMode, isUnavailableInDevMode, isCurrentUserLinked } from 'state/connection';
Expand Down Expand Up @@ -44,6 +46,12 @@ export class Discussion extends React.Component {
return (
<div>
<QuerySite />

<Card
title={ __( 'Open your site to comments and invite subscribers to get alerts about your latest work.' ) }
className="jp-settings-description"
/>

<Comments
{ ...commonProps }
isModuleFound={ this.props.isModuleFound }
Expand Down
8 changes: 8 additions & 0 deletions _inc/client/security/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@
import React, { Component } from 'react';
import { connect } from 'react-redux';
import get from 'lodash/get';
import { translate as __ } from 'i18n-calypso';

/**
* Internal dependencies
*/
import Card from 'components/card';
import { getModule } from 'state/modules';
import { getSettings } from 'state/settings';
import { isDevMode, isUnavailableInDevMode } from 'state/connection';
Expand Down Expand Up @@ -94,6 +96,12 @@ export class Security extends Component {
return (
<div>
<QuerySite />

<Card
title={ __( 'Keep your site safe with state-of-the-art security and receive notifications of technical problems.' ) }
className="jp-settings-description"
/>

{ foundBackups && <BackupsScan { ...commonProps } /> }
{ foundMonitor && <Monitor { ...commonProps } /> }
{ foundAkismet && (
Expand Down
10 changes: 5 additions & 5 deletions _inc/client/settings/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import { translate as __ } from 'i18n-calypso';
* Internal dependencies
*/
import Discussion from 'discussion';
import Security from 'security/index.jsx';
import Security from 'security';
import Traffic from 'traffic';
import Writing from 'writing/index.jsx';
import Sharing from 'sharing/index.jsx';
import SearchableModules from 'searchable-modules/index.jsx';
import Privacy from 'privacy/index.jsx';
import Writing from 'writing';
import Sharing from 'sharing';
import SearchableModules from 'searchable-modules';
import Privacy from 'privacy';

export default class extends React.Component {
static displayName = 'SearchableSettings';
Expand Down
9 changes: 8 additions & 1 deletion _inc/client/settings/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,11 @@
.dops-search.is-expanded-to-container {
height: 46px;
}
}
}

.dops-card.jp-settings-description {
margin: 24px 0 8px;
padding: 0;
background: none;
box-shadow: none;
}
8 changes: 8 additions & 0 deletions _inc/client/sharing/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
*/
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { translate as __ } from 'i18n-calypso';

/**
* Internal dependencies
*/
import Card from 'components/card';
import { getModule } from 'state/modules';
import { getSettings } from 'state/settings';
import { isDevMode, isUnavailableInDevMode, isCurrentUserLinked, getConnectUrl } from 'state/connection';
Expand Down Expand Up @@ -51,6 +53,12 @@ class Sharing extends Component {
return (
<div>
<QuerySite />

<Card
title={ __( 'Share your content on social media and increase audience engagement.' ) }
className="jp-settings-description"
/>

{
foundPublicize && (
<Publicize
Expand Down
8 changes: 8 additions & 0 deletions _inc/client/traffic/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
*/
import React from 'react';
import { connect } from 'react-redux';
import { translate as __ } from 'i18n-calypso';

/**
* Internal dependencies
*/
import Card from 'components/card';
import { getModule, getModuleOverride } from 'state/modules';
import { getSettings } from 'state/settings';
import { isDevMode, isUnavailableInDevMode } from 'state/connection';
Expand Down Expand Up @@ -64,6 +66,12 @@ export class Traffic extends React.Component {
return (
<div>
<QuerySite />

<Card
title={ __( 'Maximize your site’s visibility in search engines and view traffic stats in real time.' ) }
className="jp-settings-description"
/>

{
foundSearch && (
<Search
Expand Down
8 changes: 7 additions & 1 deletion _inc/client/writing/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
import React from 'react';
import { connect } from 'react-redux';
import { translate as __ } from 'i18n-calypso';
import Card from 'components/card';

/**
* Internal dependencies
*/
import Card from 'components/card';
import { getModule } from 'state/modules';
import { getSettings } from 'state/settings';
import { userCanManageModules } from 'state/initial-state';
Expand Down Expand Up @@ -71,6 +71,12 @@ export class Writing extends React.Component {
return (
<div>
<QuerySite />

<Card
title={ __( 'Compose content the way you want to and streamline your publishing experience.' ) }
className="jp-settings-description"
/>

{
this.props.isModuleFound( 'masterbar' ) && ! this.props.masterbarIsAlwaysActive && (
<Masterbar connectUrl={ this.props.connectUrl } { ...commonProps } />
Expand Down

0 comments on commit bc56ba4

Please sign in to comment.