Commit 0eef5949 authored by Florie Guibert's avatar Florie Guibert

Use participants widget on isse and MR pages

Remove unused sidebar_participants component
parent 984d1952
<script>
import Store from '../../stores/sidebar_store';
import participants from './participants.vue';
export default {
components: {
participants,
},
props: {
mediator: {
type: Object,
required: true,
},
},
data() {
return {
store: new Store(),
};
},
};
</script>
<template>
<div class="block participants">
<participants
:loading="store.isFetching.participants"
:participants="store.participants"
:number-of-less-participants="7"
/>
</div>
</template>
......@@ -64,5 +64,6 @@ export default {
:loading="isLoading"
:participants="participants"
:number-of-less-participants="7"
class="block participants"
/>
</template>
......@@ -14,6 +14,7 @@ import CollapsedAssigneeList from '~/sidebar/components/assignees/collapsed_assi
import SidebarAssigneesWidget from '~/sidebar/components/assignees/sidebar_assignees_widget.vue';
import SidebarConfidentialityWidget from '~/sidebar/components/confidential/sidebar_confidentiality_widget.vue';
import SidebarDueDateWidget from '~/sidebar/components/date/sidebar_date_widget.vue';
import SidebarParticipantsWidget from '~/sidebar/components/participants/sidebar_participants_widget.vue';
import SidebarReferenceWidget from '~/sidebar/components/reference/sidebar_reference_widget.vue';
import { apolloProvider } from '~/sidebar/graphql';
import Translate from '../vue_shared/translate';
......@@ -21,7 +22,6 @@ import SidebarAssignees from './components/assignees/sidebar_assignees.vue';
import CopyEmailToClipboard from './components/copy_email_to_clipboard.vue';
import SidebarLabels from './components/labels/sidebar_labels.vue';
import IssuableLockForm from './components/lock/issuable_lock_form.vue';
import sidebarParticipants from './components/participants/sidebar_participants.vue';
import SidebarReviewers from './components/reviewers/sidebar_reviewers.vue';
import SidebarSeverity from './components/severity/sidebar_severity.vue';
import SidebarSubscriptionsWidget from './components/subscriptions/sidebar_subscriptions_widget.vue';
......@@ -314,21 +314,29 @@ function mountLockComponent() {
});
}
function mountParticipantsComponent(mediator) {
function mountParticipantsComponent() {
const el = document.querySelector('.js-sidebar-participants-entry-point');
if (!el) return;
const { fullPath, iid } = getSidebarOptions();
// eslint-disable-next-line no-new
new Vue({
el,
apolloProvider,
components: {
sidebarParticipants,
SidebarParticipantsWidget,
},
render: (createElement) =>
createElement('sidebar-participants', {
createElement('sidebar-participants-widget', {
props: {
mediator,
iid: String(iid),
fullPath,
issuableType:
isInIssuePage() || isInIncidentPage() || isInDesignPage()
? IssuableType.Issue
: IssuableType.MergeRequest,
},
}),
});
......@@ -435,7 +443,7 @@ export function mountSidebar(mediator) {
mountDueDateComponent(mediator);
mountReferenceComponent(mediator);
mountLockComponent();
mountParticipantsComponent(mediator);
mountParticipantsComponent();
mountSubscriptionsComponent();
mountCopyEmailComponent();
......
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