Commit 053b7006 authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'ph/344296/draftNoteGlBadge' into 'master'

Converted draft note pending label to GlBadge

See merge request gitlab-org/gitlab!78891
parents e414ca95 6495c449
<script> <script>
import { GlButton, GlSafeHtmlDirective } from '@gitlab/ui'; import { GlButton, GlSafeHtmlDirective, GlBadge } from '@gitlab/ui';
import { mapActions, mapGetters, mapState } from 'vuex'; import { mapActions, mapGetters, mapState } from 'vuex';
import NoteableNote from '~/notes/components/noteable_note.vue'; import NoteableNote from '~/notes/components/noteable_note.vue';
import PublishButton from './publish_button.vue'; import PublishButton from './publish_button.vue';
...@@ -9,6 +9,7 @@ export default { ...@@ -9,6 +9,7 @@ export default {
NoteableNote, NoteableNote,
PublishButton, PublishButton,
GlButton, GlButton,
GlBadge,
}, },
directives: { directives: {
SafeHtml: GlSafeHtmlDirective, SafeHtml: GlSafeHtmlDirective,
...@@ -100,9 +101,7 @@ export default { ...@@ -100,9 +101,7 @@ export default {
@toggleResolveStatus="toggleResolveDiscussion(draft.id)" @toggleResolveStatus="toggleResolveDiscussion(draft.id)"
> >
<template #note-header-info> <template #note-header-info>
<strong class="badge draft-pending-label gl-mr-2"> <gl-badge variant="warning" class="gl-mr-2">{{ __('Pending') }}</gl-badge>
{{ __('Pending') }}
</strong>
</template> </template>
</noteable-note> </noteable-note>
</ul> </ul>
......
...@@ -30,12 +30,6 @@ button[disabled] { ...@@ -30,12 +30,6 @@ button[disabled] {
} }
} }
.draft-pending-label {
background: $orange-500;
color: $white;
vertical-align: text-top;
}
.note.draft-note { .note.draft-note {
margin: 0 0 $gl-padding; margin: 0 0 $gl-padding;
padding: 0; padding: 0;
......
import { nextTick } from 'vue'; import { nextTick } from 'vue';
import { GlButton } from '@gitlab/ui'; import { GlButton, GlBadge } from '@gitlab/ui';
import { getByRole } from '@testing-library/dom'; import { getByRole } from '@testing-library/dom';
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { stubComponent } from 'helpers/stub_component'; import { stubComponent } from 'helpers/stub_component';
...@@ -56,7 +56,7 @@ describe('Batch comments draft note component', () => { ...@@ -56,7 +56,7 @@ describe('Batch comments draft note component', () => {
it('renders template', () => { it('renders template', () => {
createComponent(); createComponent();
expect(wrapper.find('.draft-pending-label').exists()).toBe(true); expect(wrapper.findComponent(GlBadge).exists()).toBe(true);
const note = wrapper.find(NoteableNote); const note = wrapper.find(NoteableNote);
......
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