Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2018-07-09 20:13:41 +0300
committerFilipa Lacerda <filipa@gitlab.com>2018-07-10 14:03:00 +0300
commitac71675d3096ac9317ea230a408d69029bdadc73 (patch)
tree25ac9376545ed94915f38cd05c4ec5d0b6af2e42 /app/assets/javascripts/notes/stores/mutation_types.js
parentcb6bc902ed1f89e7f94caa86b75e756b9163af51 (diff)
Fixes toggle discussion button not expanding collapsed discussions
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 Resolves #48237
Diffstat (limited to 'app/assets/javascripts/notes/stores/mutation_types.js')
-rw-r--r--app/assets/javascripts/notes/stores/mutation_types.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/assets/javascripts/notes/stores/mutation_types.js b/app/assets/javascripts/notes/stores/mutation_types.js
index a25098fbc06..6c1ffdf266b 100644
--- a/app/assets/javascripts/notes/stores/mutation_types.js
+++ b/app/assets/javascripts/notes/stores/mutation_types.js
@@ -17,6 +17,10 @@ export const UPDATE_DISCUSSION = 'UPDATE_DISCUSSION';
export const SET_DISCUSSION_DIFF_LINES = 'SET_DISCUSSION_DIFF_LINES';
export const SET_NOTES_FETCHED_STATE = 'SET_NOTES_FETCHED_STATE';
+// DISCUSSION
+
+export const COLLAPSE_DISCUSSION = 'COLLAPSE_DISCUSSION';
+
// Issue
export const CLOSE_ISSUE = 'CLOSE_ISSUE';
export const REOPEN_ISSUE = 'REOPEN_ISSUE';