Skip to content

Commit

Permalink
Merge branch 'master' into fix/gutenberg-blocks-css
Browse files Browse the repository at this point in the history
  • Loading branch information
kraftbj authored Apr 30, 2019
2 parents 8861390 + e209028 commit cc77327
Show file tree
Hide file tree
Showing 170 changed files with 5,045 additions and 5,513 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ matrix:
- if: branch !~ /(^branch-.*-built)/
language: node_js
env: WP_TRAVISCI="yarn test-dangerci-and-adminpage-and-extensions"
- if: branch !~ /(^branch-.*-built)/
language: node_js
env: WP_TRAVISCI="yarn build"

cache:
directories:
Expand Down
183 changes: 183 additions & 0 deletions _inc/client/components/about-page/style.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
$color__border: #e5e5e5;
$color__back-link: #6c7781;

.jetpack-about__link-back,
.jetpack-about__main,
.jetpack-about__plugin {
background-color: $white;
border: 1px solid $color__border;
}

.jetpack-about__main,
.jetpack-about__colophon {
font-size: 14px;

p {
font-size: 14px;
}
}

.jetpack-about__link-back {
padding: 16px 16px 13px;
border-bottom: none;

a {
color: $color__back-link;
font-size: 0.75rem;

&:hover,
&:active {
color: darken( $color__back-link, 30% );
}

svg {
fill: $color__back-link;
height: 24px;
margin-right: 4px;
margin-top: -3px;
vertical-align: middle;
width: 24px;
}
}
}

.jetpack-about__main {
padding: 36px;
}

.jetpack-about__logo {
width: 265px;

@media screen and (max-width: 400px) {
width: 100%;
}
}
.jetpack-about__content {
display: flex;

@media screen and (max-width: 782px) {
flex-wrap: wrap;
}
}

.jetpack-about__text {
order: 1;

p {
font-size: 1rem;
line-height: 1.6;

&:last-child {
margin-bottom: 0;
}
}
}

.jetpack-about__images {
text-align: center;
margin-left: 48px;
order: 2;

@media screen and (max-width: 782px) {
margin-left: 0;
order: 0;
text-align: left;
width: 100%;
}

.meet-the-team {
margin-bottom: 0;
text-align: center;
}
}

.jetpack-about__gravatars {
display: flex;
flex-wrap: wrap;
width: 320px;

@media screen and (max-width: 450px) {
max-width: 320px;
width: 100%;
}

li {
margin-bottom: 0;
width: 25%;

img {
max-width: 80px;
vertical-align: top;
width: 100%;
}
}
}

.jetpack-about__colophon {
margin-bottom: 3rem;

h3 {
margin-top: 2.4375rem;
}
}

.jetpack-about__services-more {
margin-top: 1.5em;
text-align: center;
}


.jetpack-about__services {
display: grid;
grid-template-columns: 1fr 1fr;
grid-gap: 16px;
}

.jetpack-about__plugin {
margin-bottom: 0;

.plugin-card-top {
padding: 20px 20px 15px;
position: relative;

.name,
.desc,
.details-link {
margin-left: 148px;
}

.name h3 {
margin-top: 0;
}

.details-link {
font-weight: 500;
}
}

.plugin-card-bottom {
align-items: center;
background-color: $white;
display: flex;
flex-wrap: wrap;
justify-content: space-between;

.meta {
margin-right: 1em;
}

.num-ratings {
display: inline-block;
}

.action-buttons {
clear: none;
float: none;
margin: 0.5em 0;

li:last-child {
margin-bottom: 0;
}
}
}
}
27 changes: 27 additions & 0 deletions _inc/client/components/footer/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,13 @@ export class Footer extends React.Component {
} );
};

trackModulesClick = () => {
analytics.tracks.recordJetpackClick( {
target: 'footer_link',
link: 'modules',
} );
};

trackDebugClick = () => {
analytics.tracks.recordJetpackClick( {
target: 'footer_link',
Expand Down Expand Up @@ -90,6 +97,25 @@ export class Footer extends React.Component {
return '';
};

const maybeShowModules = () => {
if ( this.props.siteConnectionStatus && this.props.userCanManageOptions ) {
return (
<li className="jp-footer__link-item">
<a
onClick={ this.trackModulesClick }
href={ this.props.siteAdminUrl + 'admin.php?page=jetpack_modules' }
title={ __( 'Access the full list of Jetpack modules available on your site.' ) }
className="jp-footer__link"
>
{ __( 'Modules', {
context: 'Navigation item. Noun. Links to a list of modules for Jetpack.',
} ) }
</a>
</li>
);
}
};

const maybeShowDebug = () => {
if ( this.props.userCanManageOptions ) {
return (
Expand Down Expand Up @@ -190,6 +216,7 @@ export class Footer extends React.Component {
{ __( 'Privacy', { context: 'Shorthand for Privacy Policy.' } ) }
</a>
</li>
{ maybeShowModules() }
{ maybeShowDebug() }
{ maybeShowReset() }
{ maybeShowDevCardFooterLink() }
Expand Down
3 changes: 1 addition & 2 deletions _inc/client/components/navigation-settings/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ export const NavigationSettings = createReactClass( {
{ this.props.hasAnyOfTheseModules( [
'masterbar',
'markdown',
'after-the-deadline',
'custom-content-types',
'post-by-email',
'infinite-scroll',
Expand Down Expand Up @@ -207,7 +206,7 @@ export const NavigationSettings = createReactClass( {
}
navItems = (
<NavTabs selectedText={ this.props.route.name }>
{ this.props.hasAnyOfTheseModules( [ 'after-the-deadline', 'post-by-email' ] ) && (
{ this.props.hasAnyOfTheseModules( [ 'post-by-email' ] ) && (
<NavItem
path="#writing"
onClick={ this.handleClickForTracking( 'writing' ) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ describe( 'NavigationSettings', () => {
siteAdminUrl: 'https://example.org/wp-admin/',
searchForTerm: () => {},
isLinked: true,
moduleList: { minileven: true, sitemaps: true, carousel: true, 'custom-content-types': true, 'verification-tools': true, markdown: true, 'infinite-scroll': true, 'gravatar-hovercards': true, sharedaddy: true, sso: true, 'related-posts': true, monitor: true, vaultpress: true, stats: true, masterbar: true, 'google-analytics': true, 'seo-tools': true, wordads: true, videopress: true, subscriptions: true, comments: true, 'post-by-email': true, 'after-the-deadline': true, photon: true, publicize: true, likes: true },
moduleList: { minileven: true, sitemaps: true, carousel: true, 'custom-content-types': true, 'verification-tools': true, markdown: true, 'infinite-scroll': true, 'gravatar-hovercards': true, sharedaddy: true, sso: true, 'related-posts': true, monitor: true, vaultpress: true, stats: true, masterbar: true, 'google-analytics': true, 'seo-tools': true, wordads: true, videopress: true, subscriptions: true, comments: true, 'post-by-email': true, photon: true, publicize: true, likes: true },
isPluginActive: () => true
};

Expand Down
35 changes: 21 additions & 14 deletions _inc/client/components/navigation/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
userCanManageModules as _userCanManageModules,
userCanViewStats as _userCanViewStats,
} from 'state/initial-state';
import { isDevMode } from 'state/connection';

export class Navigation extends React.Component {
trackNavClick = target => {
Expand Down Expand Up @@ -51,20 +52,24 @@ export class Navigation extends React.Component {
>
{ __( 'At a Glance', { context: 'Navigation item.' } ) }
</NavItem>
<NavItem
path="#/my-plan"
onClick={ this.trackMyPlanClick }
selected={ this.props.route.path === '/my-plan' }
>
{ __( 'My Plan', { context: 'Navigation item.' } ) }
</NavItem>
<NavItem
path="#/plans"
onClick={ this.trackPlansClick }
selected={ this.props.route.path === '/plans' }
>
{ __( 'Plans', { context: 'Navigation item.' } ) }
</NavItem>
{ ! this.props.isDevMode && (
<NavItem
path="#/my-plan"
onClick={ this.trackMyPlanClick }
selected={ this.props.route.path === '/my-plan' }
>
{ __( 'My Plan', { context: 'Navigation item.' } ) }
</NavItem>
) }
{ ! this.props.isDevMode && (
<NavItem
path="#/plans"
onClick={ this.trackPlansClick }
selected={ this.props.route.path === '/plans' }
>
{ __( 'Plans', { context: 'Navigation item.' } ) }
</NavItem>
) }
</NavTabs>
);
} else {
Expand All @@ -89,12 +94,14 @@ export class Navigation extends React.Component {

Navigation.propTypes = {
route: PropTypes.object.isRequired,
isDevMode: PropTypes.bool.isRequired,
};

export default connect( state => {
return {
userCanManageModules: _userCanManageModules( state ),
userCanViewStats: _userCanViewStats( state ),
isModuleActivated: module_name => _isModuleActivated( state, module_name ),
isDevMode: isDevMode( state ),
};
} )( Navigation );
10 changes: 2 additions & 8 deletions _inc/client/components/settings-group/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,15 @@ export const SettingsGroup = props => {
if (
module.module &&
! props.userCanManageModules &&
! includes( [ 'after-the-deadline', 'post-by-email', 'publicize' ], module.module )
! includes( [ 'post-by-email', 'publicize' ], module.module )
) {
return <span />;
}

const disableInDevMode = props.disableInDevMode && props.isUnavailableInDevMode( module.module );
let displayFadeBlock = disableInDevMode;

if (
( 'post-by-email' === module.module && ! props.isLinked ) ||
( 'after-the-deadline' === module.module &&
( ! props.userCanManageModules &&
props.userCanEditPosts &&
! props.isModuleActivated( 'after-the-deadline' ) ) )
) {
if ( 'post-by-email' === module.module && ! props.isLinked ) {
displayFadeBlock = true;
}

Expand Down
1 change: 0 additions & 1 deletion _inc/client/components/settings-group/test/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ describe( 'SettingsGroup', () => {
'photon'
],
allGroupsForNonAdmin = [
'after-the-deadline',
'post-by-email'
];

Expand Down
12 changes: 7 additions & 5 deletions _inc/client/discussion/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,16 @@ 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.'
) }
title={
this.props.searchTerm
? __( 'Discussion' )
: __(
'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
Loading

0 comments on commit cc77327

Please sign in to comment.