Skip to content
Snippets Groups Projects
Commit 552f6218 authored by Coung Ngo's avatar Coung Ngo
Browse files

Add UX improvements

parent a38e5f09
No related branches found
No related tags found
No related merge requests found
Pipeline #744690130 skipped
This commit is part of merge request !108582. Comments created here will be created in the context of that merge request.
...@@ -98,6 +98,7 @@ export default { ...@@ -98,6 +98,7 @@ export default {
const workItemId = getParameterByName('work_item_id'); const workItemId = getParameterByName('work_item_id');
return { return {
hasTaskListItemActions: false,
preAnimation: false, preAnimation: false,
pulseAnimation: false, pulseAnimation: false,
initialUpdate: true, initialUpdate: true,
...@@ -367,6 +368,7 @@ export default { ...@@ -367,6 +368,7 @@ export default {
this.addPointerEventListeners(item, '.task-list-item-actions'); this.addPointerEventListeners(item, '.task-list-item-actions');
this.insertNextToTaskListItemText(this.createTaskListItemActions(), item); this.insertNextToTaskListItemText(this.createTaskListItemActions(), item);
this.hasTaskListItemActions = true;
}); });
}, },
addHoverListeners(taskLink, id) { addHoverListeners(taskLink, id) {
...@@ -491,6 +493,7 @@ export default { ...@@ -491,6 +493,7 @@ export default {
:class="{ :class="{
'issue-realtime-pre-pulse': preAnimation, 'issue-realtime-pre-pulse': preAnimation,
'issue-realtime-trigger-pulse': pulseAnimation, 'issue-realtime-trigger-pulse': pulseAnimation,
'has-task-list-item-actions': hasTaskListItemActions,
}" }"
class="md" class="md"
></div> ></div>
......
<script> <script>
import { GlDropdown, GlDropdownItem, GlIcon } from '@gitlab/ui'; import { GlDropdown, GlDropdownItem } from '@gitlab/ui';
import { __, s__ } from '~/locale'; import { __, s__ } from '~/locale';
import eventHub from '../event_hub'; import eventHub from '../event_hub';
...@@ -11,7 +11,6 @@ export default { ...@@ -11,7 +11,6 @@ export default {
components: { components: {
GlDropdown, GlDropdown,
GlDropdownItem, GlDropdownItem,
GlIcon,
}, },
methods: { methods: {
deleteTaskListItem() { deleteTaskListItem() {
...@@ -25,15 +24,15 @@ export default { ...@@ -25,15 +24,15 @@ export default {
<gl-dropdown <gl-dropdown
class="task-list-item-actions-wrapper" class="task-list-item-actions-wrapper"
category="tertiary" category="tertiary"
icon="ellipsis_v"
lazy lazy
right
no-caret
size="small" size="small"
toggle-class="task-list-item-actions gl-opacity-0 gl-p-0!" :text="$options.i18n.taskActions"
text-sr-only
toggle-class="task-list-item-actions gl-opacity-0"
> >
<template #button-content>
<gl-icon class="gl-mr-0!" name="ellipsis_v" />
<span class="gl-sr-only">{{ $options.i18n.taskActions }}</span>
</template>
<gl-dropdown-item variant="danger" @click="deleteTaskListItem"> <gl-dropdown-item variant="danger" @click="deleteTaskListItem">
{{ $options.i18n.delete }} {{ $options.i18n.delete }}
</gl-dropdown-item> </gl-dropdown-item>
......
...@@ -15,8 +15,8 @@ ...@@ -15,8 +15,8 @@
.task-list-item-actions-wrapper { .task-list-item-actions-wrapper {
position: absolute; position: absolute;
inset-block-start: 0.3rem; inset-block-start: -0.3rem;
inset-inline-end: -0.3rem; inset-inline-end: -1.5rem;
} }
.task-list-item-actions-wrapper.show .task-list-item-actions, .task-list-item-actions-wrapper.show .task-list-item-actions,
...@@ -25,6 +25,10 @@ ...@@ -25,6 +25,10 @@
} }
} }
.md.has-task-list-item-actions > :is(ul, ol) > li {
margin-inline-end: 1.5rem;
}
ul.task-list > li.task-list-item { ul.task-list > li.task-list-item {
margin-inline-start: 0.5rem !important; /* Override typography.scss */ margin-inline-start: 0.5rem !important; /* Override typography.scss */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment