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: Add a back button to site and feed streams #332

Merged
merged 1 commit into from
Dec 8, 2015

Conversation

blowery
Copy link
Contributor

@blowery blowery commented Nov 20, 2015

With the ability to override it.

@blowery blowery added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. [Feature] Reader The reader site on Calypso. labels Nov 20, 2015
@blowery blowery self-assigned this Nov 20, 2015
@blowery blowery changed the title Reader: Add a back button to site and feed streams, with the ability … Reader: Add a back button to site and feed streams Nov 20, 2015
@blowery blowery added the [Status] Needs Design Review Add this when you'd like to get a review / feedback from the Design team on your PR label Nov 20, 2015
@@ -140,6 +151,7 @@ var FeedStream = React.createClass( {

return (
<FollowingStream { ...this.props } listName={ this.state.title } emptyContent={ emptyContent } >
{ this.props.showBack ? <HeaderCake isCompact={ false } onClick={ this.goBack } /> : null }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about writing { this.props.showBack && <HeaderCake /> } with the null being implicit?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes me slightly nervous because when showBack is falsey, it'll render whatever is in showBack, which may not be null.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works as-expected with false, so maybe just enforce the boolean proptype?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 for using a ternary. Saw another PR earlier today that had its check value being rendered to the page.

@gwwar
Copy link
Contributor

gwwar commented Dec 8, 2015

👍 tested in Chrome, FF, IE11, Edge. :shipit:

@gwwar gwwar added [Status] Ready to Merge and removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Dec 8, 2015
blowery added a commit that referenced this pull request Dec 8, 2015
…r-streams

Reader: Add a back button to site and feed streams
@blowery blowery merged commit 579a0c2 into master Dec 8, 2015
@blowery blowery removed the [Status] Needs Design Review Add this when you'd like to get a review / feedback from the Design team on your PR label Dec 8, 2015
@blowery blowery added this to the Reader: December Bug Scrub milestone Dec 8, 2015
@mtias mtias deleted the add/back-button-to-some-reader-streams branch December 8, 2015 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Reader The reader site on Calypso.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants