Commit 3716dfa0 authored by Tim Zallmann's avatar Tim Zallmann

Merge branch...

Merge branch '198562-merge-request-user-interface-encourages-accidentally-closing-the-request' into 'master'

De-emphasize "Comment and close" button

See merge request gitlab-org/gitlab!55075
parents b6eaef6f 8b24412d
......@@ -132,9 +132,6 @@ export default {
noteable: this.noteableDisplayName,
});
},
buttonVariant() {
return this.isOpen ? 'warning' : 'default';
},
actionButtonClassNames() {
return {
'btn-reopen': !this.isOpen,
......@@ -422,8 +419,6 @@ export default {
<gl-button
v-if="canToggleIssueState"
:loading="isToggleStateButtonLoading"
category="secondary"
:variant="buttonVariant"
:class="[actionButtonClassNames, 'btn-comment btn-comment-and-close']"
:disabled="isSubmitting"
data-testid="close-reopen-button"
......
......@@ -196,10 +196,6 @@
@include btn-orange;
}
&.btn-close {
@include btn-outline($white, $orange-500, $orange-500, $orange-50, $orange-600, $orange-600, $orange-100, $orange-700, $orange-700);
}
&.btn-danger {
@include btn-red;
}
......
---
title: Deemphasize comment and close button
merge_request: 55075
author:
type: other
......@@ -474,16 +474,4 @@ describe('issue_comment_form component', () => {
expect(findTextArea().exists()).toBe(false);
});
});
describe('close/reopen button variants', () => {
it.each([
[constants.OPENED, 'warning'],
[constants.REOPENED, 'warning'],
[constants.CLOSED, 'default'],
])('when %s, the variant of the btn is %s', (state, expected) => {
mountComponent({ noteableData: { ...noteableDataMock, state } });
expect(findCloseReopenButton().props('variant')).toBe(expected);
});
});
});
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