Commit b0182221 authored by Phil Hughes's avatar Phil Hughes

Merge branch '6971-epic-sidebar-updates' into 'master'

Update epic sidebar collapse button to match issue sidebar

See merge request gitlab-org/gitlab!19656
parents f6910cf3 ddbc8804
......@@ -59,6 +59,9 @@ export default {
collapsedButtonIcon() {
return this.isTodo ? 'todo-done' : 'todo-add';
},
collapsedButtonIconVisible() {
return this.collapsed && !this.isActionActive;
},
},
methods: {
handleButtonClick() {
......@@ -82,8 +85,12 @@ export default {
data-boundary="viewport"
@click="handleButtonClick"
>
<icon v-show="collapsed" :class="collapsedButtonIconClasses" :name="collapsedButtonIcon" />
<span v-show="!collapsed" class="issuable-todo-inner"> {{ buttonLabel }} </span>
<icon
v-show="collapsedButtonIconVisible"
:class="collapsedButtonIconClasses"
:name="collapsedButtonIcon"
/>
<span v-show="!collapsed" class="issuable-todo-inner">{{ buttonLabel }}</span>
<gl-loading-icon v-show="isActionActive" :inline="true" />
</button>
</template>
......@@ -61,10 +61,6 @@
padding-right: 0;
z-index: 300;
.btn-sidebar-action {
display: inline-flex;
}
@include media-breakpoint-only(sm) {
&:not(.wiki-sidebar):not(.build-sidebar):not(.issuable-bulk-update-sidebar) .content-wrapper {
padding-right: $gutter-collapsed-width;
......
---
title: Vertically align collapse button on epic sidebar
merge_request: 19656
author:
type: fixed
......@@ -28,7 +28,7 @@
color: $gl-text-color-secondary;
}
.btn-sidebar-action {
.btn-sidebar-action.btn-link {
line-height: $gl-font-size;
}
......
......@@ -23,7 +23,7 @@ exports[`SidebarTodo template renders component container element with proper da
<span
class="issuable-todo-inner"
>
Mark as done
Mark as done
</span>
<glloadingicon-stub
......
......@@ -89,5 +89,11 @@ describe('SidebarTodo', () => {
expect(wrapper.find(GlLoadingIcon).exists()).toBe(true);
});
it('hides button icon when `isActionActive` prop is true', () => {
createComponent({ collapsed: true, isActionActive: true });
expect(wrapper.find(Icon).isVisible()).toBe(false);
});
});
});
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