Commit 9c1e042d authored by Kushal Pandya's avatar Kushal Pandya Committed by Mario de la Ossa

Make Epic sidebar auto-expand when participants & label icon is clicked

parent 7a262134
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
}, },
computed: { computed: {
showLoadingState() { showLoadingState() {
return this.loading || this.subscribed === null; return this.subscribed === null;
}, },
notificationIcon() { notificationIcon() {
return this.subscribed ? ICON_ON : ICON_OFF; return this.subscribed ? ICON_ON : ICON_OFF;
...@@ -51,6 +51,7 @@ ...@@ -51,6 +51,7 @@
* We need to emit this event on both component & eventHub * We need to emit this event on both component & eventHub
* for 2 dependencies; * for 2 dependencies;
* *
* Make Epic sidebar auto-expand when participants & label icon is clicked
* 1. eventHub: This component is used in Issue Boards sidebar * 1. eventHub: This component is used in Issue Boards sidebar
* where component template is part of HAML * where component template is part of HAML
* and event listeners are tied to app's eventHub. * and event listeners are tied to app's eventHub.
......
...@@ -256,11 +256,13 @@ ...@@ -256,11 +256,13 @@
</sidebar-labels-select> </sidebar-labels-select>
<sidebar-participants <sidebar-participants
:participants="initialParticipants" :participants="initialParticipants"
@toggleCollapse="toggleSidebar"
/> />
<sidebar-subscriptions <sidebar-subscriptions
:loading="savingSubscription" :loading="savingSubscription"
:subscribed="store.subscription" :subscribed="store.subscription"
@toggleSubscription="handleToggleSubscription" @toggleSubscription="handleToggleSubscription"
@toggleCollapse="toggleSidebar"
/> />
</div> </div>
</aside> </aside>
......
...@@ -11,6 +11,11 @@ ...@@ -11,6 +11,11 @@
required: true, required: true,
}, },
}, },
methods: {
onToggleSidebar() {
this.$emit('toggleCollapse');
},
},
}; };
</script> </script>
...@@ -18,6 +23,7 @@ ...@@ -18,6 +23,7 @@
<div class="block participants"> <div class="block participants">
<participants <participants
:participants="participants" :participants="participants"
@toggleSidebar="onToggleSidebar"
/> />
</div> </div>
</template> </template>
...@@ -19,6 +19,9 @@ ...@@ -19,6 +19,9 @@
onToggleSubscription() { onToggleSubscription() {
this.$emit('toggleSubscription'); this.$emit('toggleSubscription');
}, },
onToggleSidebar() {
this.$emit('toggleCollapse');
},
}, },
}; };
</script> </script>
...@@ -29,6 +32,7 @@ ...@@ -29,6 +32,7 @@
:loading="loading" :loading="loading"
:subscribed="subscribed" :subscribed="subscribed"
@toggleSubscription="onToggleSubscription" @toggleSubscription="onToggleSubscription"
@toggleSidebar="onToggleSidebar"
/> />
</div> </div>
</template> </template>
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