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

Reader Refresh: Use white background on the following/edit page #9415

Merged
merged 1 commit into from
Nov 17, 2016
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
5 changes: 4 additions & 1 deletion client/components/reader-main/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import React from 'react';
* Internal Dependencies
*/
import Main from 'components/main';
import config from 'config';

/**
* A specialization of `Main` that adds a class to the body of the document
Expand All @@ -16,7 +17,9 @@ import Main from 'components/main';
*/
export default class ReaderMain extends React.Component {
componentWillMount() {
document.querySelector( 'body' ).classList.add( 'is-reader-page' );
if ( config.isEnabled( 'reader/refresh/stream' ) ) {
document.querySelector( 'body' ).classList.add( 'is-reader-page' );
}
}

componentWillUnmount() {
Expand Down
6 changes: 3 additions & 3 deletions client/reader/following-edit/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import remove from 'lodash/remove';
import classnames from 'classnames';

// Internal dependencies
import Main from 'components/main';
import ReaderMain from 'components/reader-main';
import Gridicon from 'components/gridicon';
import FeedSubscriptionStore from 'lib/reader-feed-subscriptions';
import SiteStore from 'lib/reader-site-store';
Expand Down Expand Up @@ -516,7 +516,7 @@ const FollowingEdit = React.createClass( {
}, 'following-edit' );

return (
<Main className={ containerClasses }>
<ReaderMain className={ containerClasses }>
<MobileBackToSidebar>
<h1>{ this.translate( 'Manage Followed Sites' ) }</h1>
</MobileBackToSidebar>
Expand Down Expand Up @@ -583,7 +583,7 @@ const FollowingEdit = React.createClass( {
}

{ hasNoSubscriptions ? <EmptyContent /> : null }
</Main>
</ReaderMain>
);
}

Expand Down
6 changes: 6 additions & 0 deletions client/reader/following-edit/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@
}
}

.is-reader-page .follow-button {
border: 0;
border-radius: 0;
float: right;
}

// The header on top of the "Existing Feed"
.section-header.following-edit__header {
height: 51px;
Expand Down
7 changes: 2 additions & 5 deletions client/reader/stream/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import times from 'lodash/times';
* Internal dependencies
*/
import config from 'config';
import Main from 'components/main';
import ReaderMain from 'components/reader-main';
import DISPLAY_TYPES from 'lib/feed-post-store/display-types';
import EmptyContent from './empty';
Expand Down Expand Up @@ -476,10 +475,8 @@ module.exports = React.createClass( {
showingStream = true;
}

const StreamMain = config.isEnabled( 'reader/refresh/stream' ) ? ReaderMain : Main;

return (
<StreamMain className={ classnames( 'following', this.props.className ) }>
<ReaderMain className={ classnames( 'following', this.props.className ) }>
{ this.props.showMobileBackToSidebar && <MobileBackToSidebar>
<h1>{ this.props.listName }</h1>
</MobileBackToSidebar> }
Expand All @@ -491,7 +488,7 @@ module.exports = React.createClass( {
? <div className="infinite-scroll-end" />
: null
}
</StreamMain>
</ReaderMain>
);
}

Expand Down