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

Lint fixes: Reader-related blocks #25212

Merged
merged 5 commits into from
Jun 12, 2018
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Fix comment list errors
  • Loading branch information
bluefuton committed Jun 1, 2018
commit e2b1af501e6fb81973eab55b21bbce37e692d3e1
15 changes: 8 additions & 7 deletions client/blocks/comments/post-comment-list.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import { shouldShowConversationFollowButton } from 'blocks/conversation-follow-b
import { getCurrentUserId } from 'state/current-user/selectors';

/**
* PostCommentList, as the name would suggest, displays a list of comments for a post.
* PostCommentList displays a list of comments for a post.
* It has the capability of either starting from the latest comment for a post,
* or it may begin from any commentId within the post by specifying a commentId.
*
Expand All @@ -45,6 +45,7 @@ import { getCurrentUserId } from 'state/current-user/selectors';
* This also activates a "Show More" button at the end of the comment list instead of just at the top
*
*/

class PostCommentList extends React.Component {
static propTypes = {
post: PropTypes.shape( {
Expand Down Expand Up @@ -398,16 +399,16 @@ class PostCommentList extends React.Component {
{ ( this.props.showCommentCount || showViewMoreComments ) && (
<div className="comments__info-bar">
{ this.props.showCommentCount && <CommentCount count={ actualCommentsCount } /> }
{ showViewMoreComments ? (
<span className="comments__view-more" onClick={ this.viewEarlierCommentsHandler }>
{ showViewMoreComments && (
<button className="comments__view-more" onClick={ this.viewEarlierCommentsHandler }>
{ translate( 'Load more comments (Showing %(shown)d of %(total)d)', {
args: {
shown: displayedCommentsCount,
total: actualCommentsCount,
},
} ) }
</span>
) : null }
</button>
) }
</div>
) }
{ showFilters && (
Expand Down Expand Up @@ -447,14 +448,14 @@ class PostCommentList extends React.Component {
{ this.renderCommentsList( displayedComments ) }
{ showViewMoreComments &&
this.props.startingCommentId && (
<span className="comments__view-more" onClick={ this.viewLaterCommentsHandler }>
<button className="comments__view-more" onClick={ this.viewLaterCommentsHandler }>
{ translate( 'Load more comments (Showing %(shown)d of %(total)d)', {
args: {
shown: displayedCommentsCount,
total: actualCommentsCount,
},
} ) }
</span>
</button>
) }
<PostCommentFormRoot
post={ this.props.post }
Expand Down