Commit 4c298674 authored by Jarek Ostrowski's avatar Jarek Ostrowski Committed by Kushal Pandya

Update buttons on issue page

parent 98678b5b
...@@ -63,7 +63,7 @@ export default { ...@@ -63,7 +63,7 @@ export default {
title: s__('DesignManagement|Are you sure you want to archive the selected designs?'), title: s__('DesignManagement|Are you sure you want to archive the selected designs?'),
actionPrimary: { actionPrimary: {
text: s__('DesignManagement|Archive designs'), text: s__('DesignManagement|Archive designs'),
attributes: { variant: 'warning', 'data-qa-selector': 'confirm_archiving_button' }, attributes: { variant: 'confirm', 'data-qa-selector': 'confirm_archiving_button' },
}, },
actionCancel: { actionCancel: {
text: __('Cancel'), text: __('Cancel'),
......
...@@ -38,7 +38,8 @@ export default { ...@@ -38,7 +38,8 @@ export default {
" "
:disabled="isSaving" :disabled="isSaving"
:loading="isSaving" :loading="isSaving"
variant="default" category="secondary"
variant="confirm"
size="small" size="small"
@click="openFileUpload" @click="openFileUpload"
> >
......
...@@ -379,8 +379,7 @@ export default { ...@@ -379,8 +379,7 @@ export default {
<delete-button <delete-button
v-if="isLatestVersion" v-if="isLatestVersion"
:is-deleting="loading" :is-deleting="loading"
button-variant="warning" button-variant="default"
button-category="secondary"
button-class="gl-mr-3" button-class="gl-mr-3"
button-size="small" button-size="small"
data-qa-selector="archive_button" data-qa-selector="archive_button"
......
<script> <script>
import { GlButton, GlDropdown, GlDropdownItem, GlIcon, GlLink, GlModal } from '@gitlab/ui'; import { GlButton, GlDropdown, GlDropdownItem, GlLink, GlModal } from '@gitlab/ui';
import { mapActions, mapGetters, mapState } from 'vuex'; import { mapActions, mapGetters, mapState } from 'vuex';
import createFlash, { FLASH_TYPES } from '~/flash'; import createFlash, { FLASH_TYPES } from '~/flash';
import { EVENT_ISSUABLE_VUE_APP_CHANGE } from '~/issuable/constants'; import { EVENT_ISSUABLE_VUE_APP_CHANGE } from '~/issuable/constants';
...@@ -17,7 +17,6 @@ export default { ...@@ -17,7 +17,6 @@ export default {
GlButton, GlButton,
GlDropdown, GlDropdown,
GlDropdownItem, GlDropdownItem,
GlIcon,
GlLink, GlLink,
GlModal, GlModal,
}, },
...@@ -88,9 +87,6 @@ export default { ...@@ -88,9 +87,6 @@ export default {
qaSelector() { qaSelector() {
return this.isClosed ? 'reopen_issue_button' : 'close_issue_button'; return this.isClosed ? 'reopen_issue_button' : 'close_issue_button';
}, },
buttonVariant() {
return this.isClosed ? 'default' : 'warning';
},
dropdownText() { dropdownText() {
return sprintf(__('%{issueType} actions'), { return sprintf(__('%{issueType} actions'), {
issueType: capitalizeFirstCharacter(this.issueType), issueType: capitalizeFirstCharacter(this.issueType),
...@@ -192,9 +188,9 @@ export default { ...@@ -192,9 +188,9 @@ export default {
</script> </script>
<template> <template>
<div class="detail-page-header-actions"> <div class="detail-page-header-actions gl-display-flex">
<gl-dropdown <gl-dropdown
class="gl-display-block gl-sm-display-none!" class="gl-sm-display-none! w-100"
block block
:text="dropdownText" :text="dropdownText"
:loading="isToggleStateButtonLoading" :loading="isToggleStateButtonLoading"
...@@ -227,23 +223,20 @@ export default { ...@@ -227,23 +223,20 @@ export default {
category="secondary" category="secondary"
:data-qa-selector="qaSelector" :data-qa-selector="qaSelector"
:loading="isToggleStateButtonLoading" :loading="isToggleStateButtonLoading"
:variant="buttonVariant"
@click="toggleIssueState" @click="toggleIssueState"
> >
{{ buttonText }} {{ buttonText }}
</gl-button> </gl-button>
<gl-dropdown <gl-dropdown
class="gl-display-none gl-sm-display-inline-flex!" class="gl-display-none gl-sm-display-inline-flex! gl-ml-3"
toggle-class="gl-border-0! gl-shadow-none!" icon="ellipsis_v"
category="tertiary"
:text="dropdownText"
:text-sr-only="true"
no-caret no-caret
right right
> >
<template #button-content>
<gl-icon name="ellipsis_v" />
<span class="gl-sr-only">{{ dropdownText }}</span>
</template>
<gl-dropdown-item v-if="canCreateIssue" :href="newIssuePath"> <gl-dropdown-item v-if="canCreateIssue" :href="newIssuePath">
{{ newIssueTypeText }} {{ newIssueTypeText }}
</gl-dropdown-item> </gl-dropdown-item>
......
...@@ -412,7 +412,7 @@ export default { ...@@ -412,7 +412,7 @@ export default {
:text="commentButtonTitle" :text="commentButtonTitle"
class="gl-mr-3 js-comment-button js-comment-submit-button comment-type-dropdown" class="gl-mr-3 js-comment-button js-comment-submit-button comment-type-dropdown"
category="primary" category="primary"
variant="success" variant="confirm"
:disabled="disableSubmitButton" :disabled="disableSubmitButton"
data-testid="comment-button" data-testid="comment-button"
data-qa-selector="comment_button" data-qa-selector="comment_button"
......
...@@ -11,18 +11,18 @@ ...@@ -11,18 +11,18 @@
- refs_path = refs_namespace_project_path(@project.namespace, @project, search: '') - refs_path = refs_namespace_project_path(@project.namespace, @project, search: '')
.create-mr-dropdown-wrap.d-inline-block.full-width-mobile.js-create-mr{ data: { project_path: @project.full_path, project_id: @project.id, can_create_path: can_create_path, create_mr_path: create_mr_path, create_branch_path: create_branch_path, refs_path: refs_path, is_confidential: can_create_confidential_merge_request?.to_s } } .create-mr-dropdown-wrap.d-inline-block.full-width-mobile.js-create-mr{ data: { project_path: @project.full_path, project_id: @project.id, can_create_path: can_create_path, create_mr_path: create_mr_path, create_branch_path: create_branch_path, refs_path: refs_path, is_confidential: can_create_confidential_merge_request?.to_s } }
.btn-group.btn-group-sm.unavailable .btn-group.unavailable
%button.btn.btn-grouped{ type: 'button', disabled: 'disabled' } %button.gl-button.btn{ type: 'button', disabled: 'disabled' }
.spinner.align-text-bottom.mr-1.hide .spinner.align-text-bottom.gl-button-icon.hide
%span.text %span.text
Checking branch availability… Checking branch availability…
.btn-group.btn-group-sm.available.hidden .btn-group.available.hidden
%button.gl-button.btn.js-create-merge-request.btn-success.btn-inverted{ type: 'button', data: { action: data_action } } %button.gl-button.btn.js-create-merge-request.btn-confirm{ type: 'button', data: { action: data_action } }
.spinner.js-spinner.gl-mr-2.gl-display-none .spinner.js-spinner.gl-mr-2.gl-display-none
= value = value
%button.btn.gl-button.create-merge-request-dropdown-toggle.dropdown-toggle.btn-success.btn-inverted.js-dropdown-toggle.gl-flex-grow-0.gl-h-7{ type: 'button', data: { dropdown: { trigger: '#create-merge-request-dropdown' }, display: 'static' } } %button.gl-button.btn.btn-confirm.btn-icon.dropdown-toggle.create-merge-request-dropdown-toggle.js-dropdown-toggle{ type: 'button', data: { dropdown: { trigger: '#create-merge-request-dropdown' }, display: 'static' } }
= sprite_icon('chevron-down') = sprite_icon('chevron-down')
.droplab-dropdown .droplab-dropdown
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#js-issuable-header-warnings #js-issuable-header-warnings
= issuable_meta(issuable, @project) = issuable_meta(issuable, @project)
%a.btn.gl-button.btn-default.float-right.gl-display-block.d-sm-none.gutter-toggle.issuable-gutter-toggle.js-sidebar-toggle{ href: "#" } %a.btn.gl-button.btn-default.btn-icon.float-right.gl-display-block.d-sm-none.gutter-toggle.issuable-gutter-toggle.js-sidebar-toggle{ href: "#" }
= sprite_icon('chevron-double-lg-left') = sprite_icon('chevron-double-lg-left')
.js-issue-header-actions{ data: issue_header_actions_data(@project, issuable, current_user) } .js-issue-header-actions{ data: issue_header_actions_data(@project, issuable, current_user) }
---
title: Update buttons on issue page
merge_request: 56425
author:
type: changed
...@@ -6,11 +6,11 @@ exports[`Design management upload button component renders inverted upload desig ...@@ -6,11 +6,11 @@ exports[`Design management upload button component renders inverted upload desig
> >
<gl-button-stub <gl-button-stub
buttontextclasses="" buttontextclasses=""
category="primary" category="secondary"
icon="" icon=""
size="small" size="small"
title="Adding a design with the same filename replaces the file in a new version." title="Adding a design with the same filename replaces the file in a new version."
variant="default" variant="confirm"
> >
Upload designs Upload designs
...@@ -31,11 +31,11 @@ exports[`Design management upload button component renders upload design button ...@@ -31,11 +31,11 @@ exports[`Design management upload button component renders upload design button
<div> <div>
<gl-button-stub <gl-button-stub
buttontextclasses="" buttontextclasses=""
category="primary" category="secondary"
icon="" icon=""
size="small" size="small"
title="Adding a design with the same filename replaces the file in a new version." title="Adding a design with the same filename replaces the file in a new version."
variant="default" variant="confirm"
> >
Upload designs Upload designs
......
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