Commit 811426d5 authored by Coung Ngo's avatar Coung Ngo Committed by Mark Florian

Add issue header mobile dropdown loading state

- Add loading state to give user feedback that the action is in progress
- Update error message to be more specific
- Move some specs to more appropriate locations
parent fa85a714
......@@ -150,7 +150,7 @@ export default {
// Dispatch event which updates open/close state, shared among the issue show page
document.dispatchEvent(new CustomEvent('issuable_vue_app:change', payload));
})
.catch(() => createFlash({ message: __('Update failed. Please try again.') }))
.catch(() => createFlash({ message: __('Error occurred while updating the issue status') }))
.finally(() => {
this.toggleStateButtonLoading(false);
});
......@@ -192,22 +192,19 @@ export default {
<template>
<div class="detail-page-header-actions">
<gl-dropdown class="gl-display-block gl-display-sm-none!" block :text="dropdownText">
<gl-dropdown-item
v-if="showToggleIssueStateButton"
:disabled="isToggleStateButtonLoading"
@click="toggleIssueState"
>
<gl-dropdown
class="gl-display-block gl-display-sm-none!"
block
:text="dropdownText"
:loading="isToggleStateButtonLoading"
>
<gl-dropdown-item v-if="showToggleIssueStateButton" @click="toggleIssueState">
{{ buttonText }}
</gl-dropdown-item>
<gl-dropdown-item v-if="canCreateIssue" :href="newIssuePath">
{{ newIssueTypeText }}
</gl-dropdown-item>
<gl-dropdown-item
v-if="canPromoteToEpic"
:disabled="isToggleStateButtonLoading"
@click="promoteToEpic"
>
<gl-dropdown-item v-if="canPromoteToEpic" @click="promoteToEpic">
{{ __('Promote to epic') }}
</gl-dropdown-item>
<gl-dropdown-item v-if="!isIssueAuthor" :href="reportAbusePath">
......
---
title: Add issue header mobile dropdown loading state
merge_request: 49734
author:
type: added
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