Commit 4cea7868 authored by Mike Greiling's avatar Mike Greiling

Merge branch '229337-preview-dropdown' into 'master'

Migration batch comment finish review loading button

Closes #229337

See merge request gitlab-org/gitlab!39521
parents 0d4c2f98 ebcab39b
<script> <script>
import { mapActions, mapGetters, mapState } from 'vuex'; import { mapActions, mapGetters, mapState } from 'vuex';
import { GlLoadingIcon, GlIcon } from '@gitlab/ui'; import { GlLoadingIcon, GlButton, GlIcon } from '@gitlab/ui';
import { sprintf, n__ } from '~/locale'; import { sprintf, n__ } from '~/locale';
import DraftsCount from './drafts_count.vue'; import DraftsCount from './drafts_count.vue';
import PublishButton from './publish_button.vue'; import PublishButton from './publish_button.vue';
...@@ -9,6 +9,7 @@ import PreviewItem from './preview_item.vue'; ...@@ -9,6 +9,7 @@ import PreviewItem from './preview_item.vue';
export default { export default {
components: { components: {
GlLoadingIcon, GlLoadingIcon,
GlButton,
GlIcon, GlIcon,
DraftsCount, DraftsCount,
PublishButton, PublishButton,
...@@ -28,7 +29,7 @@ export default { ...@@ -28,7 +29,7 @@ export default {
watch: { watch: {
showPreviewDropdown() { showPreviewDropdown() {
if (this.showPreviewDropdown && this.$refs.dropdown) { if (this.showPreviewDropdown && this.$refs.dropdown) {
this.$nextTick(() => this.$refs.dropdown.focus()); this.$nextTick(() => this.$refs.dropdown.$el.focus());
} }
}, },
}, },
...@@ -62,16 +63,18 @@ export default { ...@@ -62,16 +63,18 @@ export default {
show: showPreviewDropdown, show: showPreviewDropdown,
}" }"
> >
<button <gl-button
ref="dropdown" ref="dropdown"
type="button" type="button"
class="btn btn-success review-preview-dropdown-toggle qa-review-preview-toggle" category="primary"
variant="success"
class="review-preview-dropdown-toggle qa-review-preview-toggle"
@click="toggleReviewDropdown" @click="toggleReviewDropdown"
> >
{{ __('Finish review') }} {{ __('Finish review') }}
<drafts-count /> <drafts-count />
<gl-icon name="angle-up" /> <gl-icon name="angle-up" />
</button> </gl-button>
<div <div
class="dropdown-menu dropdown-menu-large dropdown-menu-right dropdown-open-top" class="dropdown-menu dropdown-menu-large dropdown-menu-right dropdown-open-top"
:class="{ :class="{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment