-
Notifications
You must be signed in to change notification settings - Fork 634
feat: show active jobs label in top menu #8169
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
Changes from 2 commits
fc67e3b
0ad40f5
3e61580
4256640
4ee048a
6111d09
29628f7
a194df5
a8d80b9
1c442ea
5558474
c51a65a
bd6effb
a3a5ace
a452daa
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 |
|---|---|---|
|
|
@@ -44,19 +44,16 @@ | |
| <Button | ||
| v-tooltip.bottom="queueHistoryTooltipConfig" | ||
| type="destructive" | ||
| size="icon" | ||
| size="md" | ||
| :aria-pressed="isQueueOverlayExpanded" | ||
| :aria-label=" | ||
| t('sideToolbar.queueProgressOverlay.expandCollapsedQueue') | ||
| " | ||
| class="px-3" | ||
| @click="toggleQueueOverlay" | ||
| > | ||
| <i class="icon-[lucide--history] size-4" /> | ||
| <span | ||
| v-if="queuedCount > 0" | ||
| class="absolute -top-1 -right-1 min-w-[16px] rounded-full bg-primary-background py-0.25 text-[10px] font-medium leading-[14px] text-base-foreground" | ||
| > | ||
| {{ queuedCount }} | ||
| <span class="text-sm font-normal tabular-nums"> | ||
| {{ activeJobsLabel }} | ||
| </span> | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
| </Button> | ||
| <CurrentUserButton | ||
|
|
@@ -117,7 +114,7 @@ const rightSidePanelStore = useRightSidePanelStore() | |
| const managerState = useManagerState() | ||
| const { isLoggedIn } = useCurrentUser() | ||
| const isDesktop = isElectron() | ||
| const { t } = useI18n() | ||
| const { t, n } = useI18n() | ||
| const { toastErrorHandler } = useErrorHandling() | ||
| const commandStore = useCommandStore() | ||
| const queueStore = useQueueStore() | ||
|
|
@@ -128,7 +125,17 @@ const { shouldShowRedDot: showReleaseRedDot } = storeToRefs(releaseStore) | |
| const { shouldShowRedDot: shouldShowConflictRedDot } = | ||
| useConflictAcknowledgment() | ||
| const isTopMenuHovered = ref(false) | ||
| const queuedCount = computed(() => queueStore.pendingTasks.length) | ||
| const activeJobsCount = computed( | ||
| () => queueStore.pendingTasks.length + queueStore.runningTasks.length | ||
| ) | ||
|
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. Seems like it wants to be a property of the store
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. OK, moved to store
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. Check again
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. Ah, I forgot to delete the usage after adding it to the store. Fixed now. |
||
| const activeJobsLabel = computed(() => { | ||
| const count = activeJobsCount.value | ||
| return t( | ||
| 'sideToolbar.queueProgressOverlay.activeJobsShort', | ||
| { count: n(count) }, | ||
| count | ||
| ) | ||
| }) | ||
|
christian-byrne marked this conversation as resolved.
christian-byrne marked this conversation as resolved.
Outdated
|
||
| const isIntegratedTabBar = computed( | ||
| () => settingStore.get('Comfy.UI.TabBarLayout') === 'Integrated' | ||
| ) | ||
|
|
||
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.
🧹 Nitpick | 🔵 Trivial
Prefer accessible/text-based queries over data-testid in tests.
Data-testid makes the test less aligned with user-facing behavior. Consider selecting by text/role instead.
♻️ Proposed refactor
📝 Committable suggestion
🤖 Prompt for AI Agents