Commit 26d4ca4f authored by Phil Hughes's avatar Phil Hughes

Merge branch 'andr3-remove-sidebar-toggle-reviewers' into 'master'

Remove duplicated sidebar toggle when signed out

See merge request gitlab-org/gitlab!50892
parents 0794f930 e0179a56
<script>
// NOTE! For the first iteration, we are simply copying the implementation of Assignees
// It will soon be overhauled in Issue https://gitlab.com/gitlab-org/gitlab/-/issues/233736
import { GlLoadingIcon, GlIcon } from '@gitlab/ui';
import { GlLoadingIcon } from '@gitlab/ui';
import { n__ } from '~/locale';
export default {
name: 'ReviewerTitle',
components: {
GlLoadingIcon,
GlIcon,
},
props: {
loading: {
......@@ -24,11 +23,6 @@ export default {
type: Boolean,
required: true,
},
showToggle: {
type: Boolean,
required: false,
default: false,
},
},
computed: {
reviewerTitle() {
......@@ -52,14 +46,5 @@ export default {
>
{{ __('Edit') }}
</a>
<a
v-if="showToggle"
:aria-label="__('Toggle sidebar')"
class="gutter-toggle float-right js-sidebar-toggle"
href="#"
role="button"
>
<gl-icon data-hidden="true" name="chevron-double-lg-right" :size="12" />
</a>
</div>
</template>
......@@ -26,11 +26,6 @@ export default {
type: String,
required: true,
},
signedIn: {
type: Boolean,
required: false,
default: false,
},
issuableType: {
type: String,
required: false,
......@@ -98,7 +93,6 @@ export default {
:number-of-reviewers="store.reviewers.length"
:loading="loading || store.isFetching.reviewers"
:editable="store.editable"
:show-toggle="!signedIn"
/>
<reviewers
v-if="!store.isFetching.reviewers"
......
......@@ -77,7 +77,6 @@ function mountReviewersComponent(mediator) {
issuableIid: String(iid),
projectPath: fullPath,
field: el.dataset.field,
signedIn: el.hasAttribute('data-signed-in'),
issuableType: isInIssuePage() ? 'issue' : 'merge_request',
},
}),
......
---
title: Fix duplicated toggle button showing on right sidebar when signed out
merge_request: 50892
author:
type: fixed
......@@ -41,27 +41,6 @@ describe('ReviewerTitle component', () => {
});
});
describe('gutter toggle', () => {
it('does not show toggle by default', () => {
wrapper = createComponent({
numberOfReviewers: 2,
editable: false,
});
expect(wrapper.vm.$el.querySelector('.gutter-toggle')).toBeNull();
});
it('shows toggle when showToggle is true', () => {
wrapper = createComponent({
numberOfReviewers: 2,
editable: false,
showToggle: true,
});
expect(wrapper.vm.$el.querySelector('.gutter-toggle')).toEqual(expect.any(Object));
});
});
it('does not render spinner by default', () => {
wrapper = createComponent({
numberOfReviewers: 0,
......
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