Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Settings: add descriptions to settings sections #10940

Merged
merged 6 commits into from
Dec 13, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -4,10 +4,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 @@ -82,6 +84,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