comments: set default comment threshold to -8.

* Set the default comment threshold to -8. This means that comments are
  hidden at -8 or lower and greyed out at -4 or lower.

* Reset the comment threshold to -8 for anyone with a threshold greater
  than -8. For reference, only about ~3100 users had a non-default
  threshold. About 1600 of those had their threshold reset to -8.

* Change the comment threshold to a less-than-or-equal comparison
  instead of a less-than comparsion. This means that a threshold of 0
  before is the same as a threshold of -1 now. Since everyone's
  thresholds were reset, this only affects people whose thresholds were
  already less than -8, which is so low that the difference shouldn't
  matter much.

* Set the maximum comment threshold to 5. For reference, less than 1% of
  comments have a score greater than 5.

* Set the minimum comment threshold to -100. For reference, the most
  downvoted comment has a score of -60.
This commit is contained in:
evazion
2021-01-19 05:15:02 -06:00
parent e1e3604f46
commit 9af407c94b
5 changed files with 31 additions and 5 deletions

View File

@@ -12,11 +12,11 @@ class CommentComponent < ApplicationComponent
end
def dimmed?
comment.is_deleted? || (!comment.is_sticky? && comment.score < current_user.comment_threshold/2.0)
comment.is_deleted? || (!comment.is_sticky? && comment.score <= current_user.comment_threshold/2.0)
end
def thresholded?
!comment.is_deleted? && !comment.is_sticky? && comment.score < current_user.comment_threshold
!comment.is_deleted? && !comment.is_sticky? && comment.score <= current_user.comment_threshold
end
def redact_deleted?