-
Notifications
You must be signed in to change notification settings - Fork 423
Fix job details popover sticking after cancel/delete #6930
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -36,12 +36,13 @@ | |
| </template> | ||
|
|
||
| <script setup lang="ts"> | ||
| import { ref } from 'vue' | ||
| import { computed, onBeforeUnmount, ref, watch } from 'vue' | ||
|
|
||
| import QueueJobItem from '@/components/queue/job/QueueJobItem.vue' | ||
| import type { JobGroup, JobListItem } from '@/composables/queue/useJobList' | ||
|
|
||
| defineProps<{ displayedJobGroups: JobGroup[] }>() | ||
| const props = defineProps<{ displayedJobGroups: JobGroup[] }>() | ||
| const displayedJobGroups = computed(() => props.displayedJobGroups) | ||
|
|
||
| const emit = defineEmits<{ | ||
| (e: 'cancelItem', item: JobListItem): void | ||
|
|
@@ -89,4 +90,23 @@ const onDetailsLeave = (jobId: string) => { | |
| hideTimer.value = null | ||
| }, 150) | ||
| } | ||
|
|
||
| const allJobIds = computed(() => | ||
| displayedJobGroups.value.flatMap((group) => | ||
| group.items.map((item) => item.id) | ||
| ) | ||
| ) | ||
|
|
||
| watch(allJobIds, (ids) => { | ||
| if (activeDetailsId.value && !ids.includes(activeDetailsId.value)) { | ||
| clearHideTimer() | ||
| clearShowTimer() | ||
| activeDetailsId.value = null | ||
| } | ||
| }) | ||
|
|
||
| onBeforeUnmount(() => { | ||
| clearHideTimer() | ||
| clearShowTimer() | ||
| }) | ||
|
Comment on lines
+94
to
+111
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How expensive is this with a long history?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We have a maxhistory of 64, if that gets removed, then it might be bad after a few thousand? Technically speaking this can be removed and each case handled on its own.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We do plan to allow scrolling through history and not removing the tail and the maxhistory is configurable right? This isn't really blocking though |
||
| </script> | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Props should be reactive by default.