Commit 08874e66 authored by Kushal Pandya's avatar Kushal Pandya

Merge branch '230725-update-boards-modal-tabs' into 'master'

Update boards modal tabs to gl-tabs

Closes #230725

See merge request gitlab-org/gitlab!43740
parents e5db0fce 10ec9dfa
<script> <script>
/* eslint-disable @gitlab/vue-require-i18n-strings */ /* eslint-disable @gitlab/vue-require-i18n-strings */
import { GlTabs, GlTab, GlBadge } from '@gitlab/ui';
import ModalStore from '../../stores/modal_store'; import ModalStore from '../../stores/modal_store';
import modalMixin from '../../mixins/modal_mixins'; import modalMixin from '../../mixins/modal_mixins';
export default { export default {
components: {
GlTabs,
GlTab,
GlBadge,
},
mixins: [modalMixin], mixins: [modalMixin],
data() { data() {
return ModalStore.store; return ModalStore.store;
...@@ -19,18 +25,18 @@ export default { ...@@ -19,18 +25,18 @@ export default {
}; };
</script> </script>
<template> <template>
<div class="top-area gl-mt-3 gl-mb-3"> <gl-tabs class="gl-mt-3">
<ul class="nav-links issues-state-filters"> <gl-tab @click.prevent="changeTab('all')">
<li :class="{ active: activeTab == 'all' }"> <template slot="title">
<a href="#" role="button" @click.prevent="changeTab('all')"> <span>Open issues</span>
Open issues <span class="badge badge-pill"> {{ issuesCount }} </span> <gl-badge size="sm" class="gl-tab-counter-badge">{{ issuesCount }}</gl-badge>
</a> </template>
</li> </gl-tab>
<li :class="{ active: activeTab == 'selected' }"> <gl-tab @click.prevent="changeTab('selected')">
<a href="#" role="button" @click.prevent="changeTab('selected')"> <template slot="title">
Selected issues <span class="badge badge-pill"> {{ selectedCount }} </span> <span>Selected issues</span>
</a> <gl-badge size="sm" class="gl-tab-counter-badge">{{ selectedCount }}</gl-badge>
</li> </template>
</ul> </gl-tab>
</div> </gl-tabs>
</template> </template>
---
title: Update issue boards modal to gl-tabs
merge_request: 43740
author:
type: changed
...@@ -79,7 +79,7 @@ RSpec.describe 'Issue Boards add issue modal', :js do ...@@ -79,7 +79,7 @@ RSpec.describe 'Issue Boards add issue modal', :js do
it 'loads issues' do it 'loads issues' do
page.within('.add-issues-modal') do page.within('.add-issues-modal') do
page.within('.nav-links') do page.within('.gl-tabs') do
expect(page).to have_content('2') expect(page).to have_content('2')
end end
...@@ -146,7 +146,7 @@ RSpec.describe 'Issue Boards add issue modal', :js do ...@@ -146,7 +146,7 @@ RSpec.describe 'Issue Boards add issue modal', :js do
page.within('.add-issues-modal') do page.within('.add-issues-modal') do
first('.board-card .board-card-number').click first('.board-card .board-card-number').click
page.within('.nav-links') do page.within('.gl-tabs') do
expect(page).to have_content('Selected issues 1') expect(page).to have_content('Selected issues 1')
end end
end end
......
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