Fix collapsing discussion replies
What does this MR do?
Make the "Collapse replies" button in issues and merge requests work again.
Background
A computed property doesn't work for isRepliesCollapsed here:
- The desired behavior is to have resolved discussions collapsed on page load and unresolved discussions expanded.
- Afterwards a user is free to toggle any discussion at will (collapse or expand)
By making isRepliesCollapsed() reactive, we would collapse or expand discussion while a user is reading another comment in case another user resolves / unresolves it (due to polling). As far as I can tell this is not desired because it is confusing at best and makes it hard to read discussions at worst.
Screenshots
collapse-merge-request-discussion
What are the relevant issue numbers?
closes https://gitlab.com/gitlab-org/gitlab-ce/issues/54646
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
Tests added for this feature/bug -
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides -
Conforms to the database guides -
Link to e2e tests MR added if this MR has Requires e2e tests label. See the Test Planning Process. -
Security reports checked/validated by reviewer
Edited by Fatih Acet