Commit 34ff5a78 authored by Florie Guibert's avatar Florie Guibert

Migrate epic sidebar participants to widget

Changelog: changed
EE: true
parent 86022ed9
...@@ -56,6 +56,11 @@ export default { ...@@ -56,6 +56,11 @@ export default {
return this.$apollo.queries.participants.loading; return this.$apollo.queries.participants.loading;
}, },
}, },
methods: {
expandSidebar() {
this.$emit('expandSidebar');
},
},
}; };
</script> </script>
...@@ -66,5 +71,6 @@ export default { ...@@ -66,5 +71,6 @@ export default {
:number-of-less-participants="7" :number-of-less-participants="7"
:lazy="false" :lazy="false"
class="block participants" class="block participants"
@toggleSidebar="expandSidebar"
/> />
</template> </template>
...@@ -8,7 +8,7 @@ import { convertToGraphQLId } from '~/graphql_shared/utils'; ...@@ -8,7 +8,7 @@ import { convertToGraphQLId } from '~/graphql_shared/utils';
import { IssuableType } from '~/issue_show/constants'; import { IssuableType } from '~/issue_show/constants';
import notesEventHub from '~/notes/event_hub'; import notesEventHub from '~/notes/event_hub';
import SidebarConfidentialityWidget from '~/sidebar/components/confidential/sidebar_confidentiality_widget.vue'; import SidebarConfidentialityWidget from '~/sidebar/components/confidential/sidebar_confidentiality_widget.vue';
import SidebarParticipants from '~/sidebar/components/participants/participants.vue'; import SidebarParticipantsWidget from '~/sidebar/components/participants/sidebar_participants_widget.vue';
import SidebarReferenceWidget from '~/sidebar/components/reference/sidebar_reference_widget.vue'; import SidebarReferenceWidget from '~/sidebar/components/reference/sidebar_reference_widget.vue';
import SidebarSubscriptionsWidget from '~/sidebar/components/subscriptions/sidebar_subscriptions_widget.vue'; import SidebarSubscriptionsWidget from '~/sidebar/components/subscriptions/sidebar_subscriptions_widget.vue';
import SidebarTodoWidget from '~/sidebar/components/todo_toggle/sidebar_todo_widget.vue'; import SidebarTodoWidget from '~/sidebar/components/todo_toggle/sidebar_todo_widget.vue';
...@@ -29,7 +29,7 @@ export default { ...@@ -29,7 +29,7 @@ export default {
SidebarDatePickerCollapsed, SidebarDatePickerCollapsed,
SidebarLabels, SidebarLabels,
SidebarAncestorsWidget, SidebarAncestorsWidget,
SidebarParticipants, SidebarParticipantsWidget,
SidebarConfidentialityWidget, SidebarConfidentialityWidget,
SidebarSubscriptionsWidget, SidebarSubscriptionsWidget,
SidebarReferenceWidget, SidebarReferenceWidget,
...@@ -46,7 +46,6 @@ export default { ...@@ -46,7 +46,6 @@ export default {
'canUpdate', 'canUpdate',
'allowSubEpics', 'allowSubEpics',
'sidebarCollapsed', 'sidebarCollapsed',
'participants',
'startDateSourcingMilestoneTitle', 'startDateSourcingMilestoneTitle',
'startDateSourcingMilestoneDates', 'startDateSourcingMilestoneDates',
'startDateIsFixed', 'startDateIsFixed',
...@@ -251,12 +250,12 @@ export default { ...@@ -251,12 +250,12 @@ export default {
:full-path="fullPath" :full-path="fullPath"
:issuable-type="issuableType" :issuable-type="issuableType"
/> />
<div class="block participants"> <sidebar-participants-widget
<sidebar-participants :iid="String(iid)"
:participants="participants" :full-path="fullPath"
@toggleSidebar="toggleSidebar({ sidebarCollapsed })" :issuable-type="issuableType"
@expandSidebar="handleSidebarToggle"
/> />
</div>
<sidebar-subscriptions-widget <sidebar-subscriptions-widget
:iid="String(iid)" :iid="String(iid)"
:full-path="fullPath" :full-path="fullPath"
......
...@@ -12,6 +12,7 @@ import SidebarAncestorsWidget from 'ee_component/sidebar/components/ancestors_tr ...@@ -12,6 +12,7 @@ import SidebarAncestorsWidget from 'ee_component/sidebar/components/ancestors_tr
import { parsePikadayDate } from '~/lib/utils/datetime_utility'; import { parsePikadayDate } from '~/lib/utils/datetime_utility';
import SidebarParticipantsWidget from '~/sidebar/components/participants/sidebar_participants_widget.vue';
import SidebarReferenceWidget from '~/sidebar/components/reference/sidebar_reference_widget.vue'; import SidebarReferenceWidget from '~/sidebar/components/reference/sidebar_reference_widget.vue';
import SidebarSubscriptionsWidget from '~/sidebar/components/subscriptions/sidebar_subscriptions_widget.vue'; import SidebarSubscriptionsWidget from '~/sidebar/components/subscriptions/sidebar_subscriptions_widget.vue';
import SidebarTodoWidget from '~/sidebar/components/todo_toggle/sidebar_todo_widget.vue'; import SidebarTodoWidget from '~/sidebar/components/todo_toggle/sidebar_todo_widget.vue';
...@@ -242,8 +243,8 @@ describe('EpicSidebarComponent', () => { ...@@ -242,8 +243,8 @@ describe('EpicSidebarComponent', () => {
}); });
}); });
it('renders participants list element', () => { it('renders participants widget', () => {
expect(wrapper.find('.block.participants').exists()).toBe(true); expect(wrapper.findComponent(SidebarParticipantsWidget).exists()).toBe(true);
}); });
it('renders subscription toggle element', () => { it('renders subscription toggle element', () => {
......
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