<commit_before>/** @jsx React.DOM */

(function() {
  var CONSTANTS = require('../../constants').NEWS_FEED_ITEM;
  var NewComment = require('./new_comment.js.jsx');
  var NewsFeedItemStore = require('../../stores/news_feed_item_store');

  var NewsFeedItemComments = React.createClass({
    componentWillMount: function() {
      // If there are a lot of NewsFeedItems, `addChangeListener()`
      // will throw a warning. It seems safe to ignore: it's a bug
      // in Node's EventEmitter implementation. :(
      NewsFeedItemStore.addChangeListener(this.getComments);
    },

    comment: function(comment, optimistic) {
      var className = 'gray-darker';
      if (optimistic) {
        className = 'gray-light';
      }

      var user = comment.user

      // TODO The line-height=18 is a hack. The `h6` should set the LH.

      return (
        <div className="h6 mt0 mb3 clearfix" key={comment.id}>
          <div className="left mr2">
            <Avatar user={user} size={24} />
          </div>
          <div className="overflow-hidden">
            <a className="block" style={{'line-height': 18}} href={user.url}>{user.username}</a>
            <div className="gray-dark">{comment.body}</div>
          </div>
        </div>
      );
    },

    comments: function() {
      var confirmedComments = this.confirmedComments();
      var optimisticComments = this.optimisticComments();
      var comments = confirmedComments.concat(optimisticComments);
      var numberOfComments = comments.length;
      var numberOfCommentsToShow = this.state.numberOfCommentsToShow;

      if (numberOfComments > numberOfCommentsToShow) {
        return (
          <div>
            <a className="block h6 blue clearfix mt0 mb3" href="javascript:void(0);" onClick={this.showMoreComments(numberOfComments)}>
              <span className="icon icon-bubble"></span>
              &nbsp;View all {numberOfComments} comments
            </a>

            {_.last(comments, numberOfCommentsToShow)}
          </div>
        );<commit_msg>Darken text on the news feed comments.<commit_after>/** @jsx React.DOM */

(function() {
  var CONSTANTS = require('../../constants').NEWS_FEED_ITEM;
  var NewComment = require('./new_comment.js.jsx');
  var NewsFeedItemStore = require('../../stores/news_feed_item_store');

  var NewsFeedItemComments = React.createClass({
    componentWillMount: function() {
      // If there are a lot of NewsFeedItems, `addChangeListener()`
      // will throw a warning. It seems safe to ignore: it's a bug
      // in Node's EventEmitter implementation. :(
      NewsFeedItemStore.addChangeListener(this.getComments);
    },

    comment: function(comment, optimistic) {
      var className = 'gray-darker';
      if (optimistic) {
        className = 'gray-light';
      }

      var user = comment.user

      // TODO The line-height=18 is a hack. The `h6` should set the LH.

      return (
        <div className="h6 mt0 mb3 clearfix" key={comment.id}>
          <div className="left mr2">
            <Avatar user={user} size={24} />
          </div>
          <div className="overflow-hidden">
            <a className="block" style={{'line-height': 18}} href={user.url}>{user.username}</a>
            <div className="gray-darker">{comment.body}</div>
          </div>
        </div>
      );
    },

    comments: function() {
      var confirmedComments = this.confirmedComments();
      var optimisticComments = this.optimisticComments();
      var comments = confirmedComments.concat(optimisticComments);
      var numberOfComments = comments.length;
      var numberOfCommentsToShow = this.state.numberOfCommentsToShow;

      if (numberOfComments > numberOfCommentsToShow) {
        return (
          <div>
            <a className="block h6 blue clearfix mt0 mb3" href="javascript:void(0);" onClick={this.showMoreComments(numberOfComments)}>
              <span className="icon icon-bubble"></span>
              &nbsp;View all {numberOfComments} comments
            </a>

            {_.last(comments, numberOfCommentsToShow)}
          </div>
        );
{'fraction_non_alphanumeric': 0.13162393162393163, 'fraction_numerical': 0.007326007326007326, 'mean_word_length': 2.5617391304347827, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 39, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4942178', 'n_tokens_mistral': 1209, 'n_tokens_neox': 1140, 'n_words': 276}