From cf8952e205fe62799124307aec2986351834b591 Mon Sep 17 00:00:00 2001 From: Benjamin Lu Date: Sun, 22 Feb 2026 00:25:51 -0800 Subject: [PATCH] fix: keep queue overlay clear action static (#9031) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary Make the Queue Progress Overlay header clear action label static text (`Clear queue`) and remove queued-count text from that header area. ## Changes - Replace dynamic header text (`{count} queued`) with static `Clear queue` text. - Keep the existing icon clear button behavior/style in the header. - Keep the clear action visible when queue is empty, but disabled. - Add disabled visual treatment for the static text when queue is empty. - Update `QueueOverlayHeader` tests to cover the new static label and disabled behavior. image Design: https://www.figma.com/design/LVilZgHGk5RwWOkVN6yCEK/Queue-Progress-Modal?node-id=4024-28153&m=dev image image ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-9031-fix-keep-queue-overlay-clear-action-static-30d6d73d365081f8b908fa54775ab4d4) by [Unito](https://www.unito.io) --------- Co-authored-by: Johnpaul Chiwetelu <49923152+Myestery@users.noreply.github.com> Co-authored-by: GitHub Action --- src/components/queue/QueueOverlayHeader.test.ts | 16 +++++++++------- src/components/queue/QueueOverlayHeader.vue | 11 ++++------- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/src/components/queue/QueueOverlayHeader.test.ts b/src/components/queue/QueueOverlayHeader.test.ts index b902fce6c..9487bd30b 100644 --- a/src/components/queue/QueueOverlayHeader.test.ts +++ b/src/components/queue/QueueOverlayHeader.test.ts @@ -54,6 +54,8 @@ const i18n = createI18n({ running: 'running', queuedSuffix: 'queued', clearQueued: 'Clear queued', + clearQueueTooltip: 'Clear queue', + clearAllJobsTooltip: 'Cancel all running jobs', moreOptions: 'More options', clearHistory: 'Clear history', dockedJobHistory: 'Docked Job History' @@ -101,23 +103,23 @@ describe('QueueOverlayHeader', () => { expect(wrapper.find('.inline-flex.items-center.gap-1').exists()).toBe(false) }) - it('shows queued summary and emits clear queued', async () => { + it('shows clear queue text and emits clear queued', async () => { const wrapper = mountHeader({ queuedCount: 4 }) - expect(wrapper.text()).toContain('4') - expect(wrapper.text()).toContain('queued') + expect(wrapper.text()).toContain('Clear queue') + expect(wrapper.text()).not.toContain('4 queued') const clearQueuedButton = wrapper.get('button[aria-label="Clear queued"]') await clearQueuedButton.trigger('click') expect(wrapper.emitted('clearQueued')).toHaveLength(1) }) - it('hides clear queued button when queued count is zero', () => { + it('disables clear queued button when queued count is zero', () => { const wrapper = mountHeader({ queuedCount: 0 }) + const clearQueuedButton = wrapper.get('button[aria-label="Clear queued"]') - expect(wrapper.find('button[aria-label="Clear queued"]').exists()).toBe( - false - ) + expect(clearQueuedButton.attributes('disabled')).toBeDefined() + expect(wrapper.text()).toContain('Clear queue') }) it('emits clear history from the menu', async () => { diff --git a/src/components/queue/QueueOverlayHeader.vue b/src/components/queue/QueueOverlayHeader.vue index e84256713..3de6005cb 100644 --- a/src/components/queue/QueueOverlayHeader.vue +++ b/src/components/queue/QueueOverlayHeader.vue @@ -20,18 +20,15 @@
- - {{ queuedCount }} - {{ - t('sideToolbar.queueProgressOverlay.queuedSuffix') - }} - + {{ + t('sideToolbar.queueProgressOverlay.clearQueueTooltip') + }}