Previously thresholded comments were hidden completely. You had to click the "Show X hidden comments" button to unhide all hidden comments in a thread. Now it works like this: * When a comment is below your threshold, the comment text is hidden and replaced by a `[hidden]` link, which you can click to unhide the comment. * When a comment is at half your threshold (for example, your threshold is -8 but the comment is at -4), then the comment is greyed out. This means that comments aren't completely hidden, they're just collapsed, so you can see the commenter and the score without unhiding the comment. It also means you don't have to scroll back up to unhide a comment, and threads aren't disrupted by comments being secretly hidden (which is confusing when people are replying to hidden comments, which forces you to go back up and unhide to find).
18 lines
469 B
Ruby
18 lines
469 B
Ruby
module ComponentsHelper
|
|
def post_preview(post, **options)
|
|
render PostPreviewComponent.new(post: post, **options)
|
|
end
|
|
|
|
def post_previews_html(posts, **options)
|
|
render PostPreviewComponent.with_collection(posts, **options)
|
|
end
|
|
|
|
def render_comment(comment, **options)
|
|
render CommentComponent.new(comment: comment, **options)
|
|
end
|
|
|
|
def render_comment_section(post, **options)
|
|
render CommentSectionComponent.new(post: post, **options)
|
|
end
|
|
end
|