feat: collapse downvoted comments by default when setting (default off) is set #1860
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #1838
This is my first contribution, so it's very possible I've misunderstood something or not followed conventions in the project. As well as more substantive feedback, nitpicks are more than welcome - they help me learn!
About the `ppm-lcck.yaml` update (reverted)
Also not entirely sure why, but the
pnpm-lock.yaml
needed updating.pnpm i --frozen-lockfile
gave an errorIt seems that the CI won't pass with my updated lockfile (with the same error I get using the
main
lockfile).The setting is off by default.
I've added
hasUserCollapsed
which is true if the value forcommentId
instate.comment.commentCollapsedById
has been defined. If it hasn't we're in the initial state of the comment (uncollapsed unless downvoted & setting is set). If it has, the user must have shown/hidden the comment so we should use the state fromstate.comment.commentCollapsedById
rather than the default.