diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-24 21:09:14 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-24 21:09:14 +0300 |
commit | ca386bfc0cf083e0ccb477995378061fc2a15b66 (patch) | |
tree | f53d4a2f288ba64e9f440080817f14d62965398c /app/assets/javascripts/batch_comments | |
parent | 61ebd5753018a1f4b6032122f6ea625dc4e4fc8e (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/batch_comments')
4 files changed, 9 insertions, 1 deletions
diff --git a/app/assets/javascripts/batch_comments/components/review_bar.vue b/app/assets/javascripts/batch_comments/components/review_bar.vue index 798ab301c90..cc52285dd81 100644 --- a/app/assets/javascripts/batch_comments/components/review_bar.vue +++ b/app/assets/javascripts/batch_comments/components/review_bar.vue @@ -1,6 +1,7 @@ <script> import { mapActions, mapGetters } from 'vuex'; import glFeatureFlagMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; +import { SET_REVIEW_BAR_RENDERED } from '~/batch_comments/stores/modules/batch_comments/mutation_types'; import { REVIEW_BAR_VISIBLE_CLASS_NAME } from '../constants'; import PreviewDropdown from './preview_dropdown.vue'; import SubmitDropdown from './submit_dropdown.vue'; @@ -23,6 +24,7 @@ export default { }, mounted() { document.body.classList.add(REVIEW_BAR_VISIBLE_CLASS_NAME); + this.$store.commit(`batchComments/${SET_REVIEW_BAR_RENDERED}`); }, beforeDestroy() { document.body.classList.remove(REVIEW_BAR_VISIBLE_CLASS_NAME); @@ -34,7 +36,7 @@ export default { </script> <template> <div> - <nav class="review-bar-component" data-testid="review_bar_component"> + <nav class="review-bar-component js-review-bar" data-testid="review_bar_component"> <div class="review-bar-content d-flex gl-justify-content-end" data-qa-selector="review_bar_content" diff --git a/app/assets/javascripts/batch_comments/stores/modules/batch_comments/mutation_types.js b/app/assets/javascripts/batch_comments/stores/modules/batch_comments/mutation_types.js index 67bcc53ac7d..2000ee69bad 100644 --- a/app/assets/javascripts/batch_comments/stores/modules/batch_comments/mutation_types.js +++ b/app/assets/javascripts/batch_comments/stores/modules/batch_comments/mutation_types.js @@ -16,3 +16,5 @@ export const RECEIVE_DRAFT_UPDATE_SUCCESS = 'RECEIVE_DRAFT_UPDATE_SUCCESS'; export const TOGGLE_RESOLVE_DISCUSSION = 'TOGGLE_RESOLVE_DISCUSSION'; export const CLEAR_DRAFTS = 'CLEAR_DRAFTS'; + +export const SET_REVIEW_BAR_RENDERED = 'SET_REVIEW_BAR_RENDERED'; diff --git a/app/assets/javascripts/batch_comments/stores/modules/batch_comments/mutations.js b/app/assets/javascripts/batch_comments/stores/modules/batch_comments/mutations.js index 7961cf134be..453dc861702 100644 --- a/app/assets/javascripts/batch_comments/stores/modules/batch_comments/mutations.js +++ b/app/assets/javascripts/batch_comments/stores/modules/batch_comments/mutations.js @@ -68,4 +68,7 @@ export default { [types.CLEAR_DRAFTS](state) { state.drafts = []; }, + [types.SET_REVIEW_BAR_RENDERED](state) { + state.reviewBarRendered = true; + }, }; diff --git a/app/assets/javascripts/batch_comments/stores/modules/batch_comments/state.js b/app/assets/javascripts/batch_comments/stores/modules/batch_comments/state.js index 10033ba17f9..1efc00059d0 100644 --- a/app/assets/javascripts/batch_comments/stores/modules/batch_comments/state.js +++ b/app/assets/javascripts/batch_comments/stores/modules/batch_comments/state.js @@ -5,4 +5,5 @@ export default () => ({ isPublishing: false, currentlyPublishingDrafts: [], shouldAnimateReviewButton: false, + reviewBarRendered: false, }); |