Resolve "Toggle file comments in merge request does not update toggle buttons"
What does this MR do?
Discussions were being toggled by jquery DOM querying them and toggling visibility but in Vue, only the open discussions will be in the DOM Fix includes:
- Adds a getter to the store to get the expanded discussions
- Adds an action to collapse a discussion
- When the user clicks the button, all data needed is now accessible through a getter and we can dispatch an action to toggle the discussion within the state, instead of showing/hiding with jQuery
- Removes hardcoded properties
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Tests added for this feature/bug - Conform by the code review guidelines
-
Has been reviewed by a Frontend maintainer
-
-
Conform by the merge request performance guides -
Conform by the style guides -
If you have multiple commits, please combine them into a few logically organized commits by squashing them
What are the relevant issue numbers?
Closes #48237 (closed)
Edited by Filipa Lacerda