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-issue-discussion

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?

Edited by Fatih Acet

Merge request reports

Loading