Skip to content

Commit 8c95a3e

Browse files
authored
Release 1.1.0 (#1)
Bug fixes: - Badge count stuck at 0 when panel is closed — moved updateBadge() before the gridEl guard to handle lazy rendering in frontend ≥1.38.x - Reduce sidebar icon badge size (10px/16px → 9px/14px) - Nudge queue tab badge position further to top-right (−7px) New feature: - q keyboard shortcut to toggle queue panel, registered via declarative commands/keybindings API and visible in Settings → Keybindings Compatibility: tested up to frontend 1.39.19 · core 0.16.4 CI: added test.yml (push/PR) and release.yml (semver tag → GitHub Release)
1 parent f10f0b8 commit 8c95a3e

File tree

7 files changed

+115
-6
lines changed

7 files changed

+115
-6
lines changed

.github/workflows/release.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: GitHub Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "[0-9]+.[0-9]+.[0-9]+"
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
test:
13+
name: Run Tests
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- uses: actions/setup-node@v4
19+
with:
20+
node-version: '20'
21+
22+
- run: npm install
23+
24+
- run: npm test
25+
26+
release:
27+
name: Create GitHub Release
28+
needs: test
29+
runs-on: ubuntu-latest
30+
steps:
31+
- uses: actions/checkout@v4
32+
with:
33+
fetch-depth: 0
34+
35+
- name: Generate changelog
36+
run: |
37+
PREV_TAG=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || echo "")
38+
if [ -n "$PREV_TAG" ]; then
39+
CHANGES=$(git log "${PREV_TAG}..HEAD" --pretty=format:"- %s" --no-merges)
40+
else
41+
CHANGES=$(git log --pretty=format:"- %s" --no-merges)
42+
fi
43+
cat << EOF > release_notes.md
44+
## What's Changed
45+
46+
$CHANGES
47+
EOF
48+
49+
- name: Create GitHub Release
50+
uses: softprops/action-gh-release@v2
51+
with:
52+
body_path: release_notes.md
53+
draft: false
54+
prerelease: ${{ contains(github.ref_name, '-') }}
55+
env:
56+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/test.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
9+
jobs:
10+
test:
11+
name: Run Tests
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- uses: actions/setup-node@v4
17+
with:
18+
node-version: '20'
19+
20+
- run: npm install
21+
22+
- run: npm test

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Delete the `comfyui_queue_sidebar` folder from `custom_nodes/`.
6969

7070
## Compatibility
7171

72-
- **ComfyUI frontend** v1.33.1+ (tested on 1.35.9)
72+
- **ComfyUI frontend** v1.33.1+ (tested up to 1.39.19) · **ComfyUI core** tested up to 0.16.4
7373
- Works alongside the built-in bottom-panel queue without conflicts
7474
- The plugin uses the public extension API for registration and events. It additionally hooks a small number of internal APIs (e.g. `app.queuePrompt`, sidebar tab ordering) to provide a seamless experience — all such integration points are centralized in [`comfyAdapter.js`](web/lib/comfyAdapter.js) with feature detection and graceful degradation if the upstream shape changes
7575

README_zhTW.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ git clone https://github.com/Zhen-Bo/comfyui_queue_sidebar.git
6969

7070
## 相容性
7171

72-
- **ComfyUI 前端** v1.33.1+(已在 1.35.9 測試正常)
72+
- **ComfyUI 前端** v1.33.1+(已測試至 1.39.19)· **ComfyUI 核心** 已測試至 0.16.4
7373
- 與內建的底部面板佇列並行運作,不會衝突
7474
- 插件使用公開的擴充 API 進行註冊和事件監聽。此外會掛鉤少量內部 API(如 `app.queuePrompt`、側邊欄分頁排序)以提供無縫體驗——所有此類整合點均集中於 [`comfyAdapter.js`](web/lib/comfyAdapter.js),搭配功能偵測與優雅降級機制
7575

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "comfyui_queue_sidebar",
3-
"version": "1.0.0",
3+
"version": "1.1.0",
44
"private": true,
55
"description": "ComfyUI sidebar extension — brings back the queue panel with image previews",
66
"type": "module",

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "comfyui-queue-sidebar"
3-
version = "1.0.0"
3+
version = "1.1.0"
44
description = "ComfyUI sidebar extension — brings back the queue panel with image previews"
55
license = { file = "LICENSE" }
66

web/queue-sidebar.js

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ function updateBadge() {
203203
}
204204

205205
function render() {
206+
updateBadge()
206207
if (!gridEl) return
207208

208209
const allTasks = [...state.running, ...state.pending, ...state.history]
@@ -214,7 +215,6 @@ function render() {
214215
`color:var(--p-text-muted-color,#888)">` +
215216
`<i class="pi pi-info-circle" style="font-size:2rem;margin-bottom:12px"></i>` +
216217
`<span style="font-size:13px">${t('noTasks')}</span></div>`
217-
updateBadge()
218218
return
219219
}
220220

@@ -248,7 +248,6 @@ function render() {
248248
}
249249

250250
for (const card of existing.values()) card.remove()
251-
updateBadge()
252251
}
253252

254253
// ─── Sidebar setup ────────────────────────────────────────────────────────────
@@ -295,15 +294,47 @@ function onProgressPreview({ detail }) {
295294
render()
296295
}
297296

297+
// ─── Badge style injection ─────────────────────────────────────────────────────
298+
299+
function injectBadgeStyle() {
300+
const id = 'queue-sidebar-badge-style'
301+
if (document.getElementById(id)) return
302+
const style = document.createElement('style')
303+
style.id = id
304+
style.textContent =
305+
'.sidebar-icon-badge{font-size:9px!important;min-width:14px!important;line-height:13px!important}' +
306+
'.sidebar-icon-wrapper:has(.pi-history) .sidebar-icon-badge{top:-7px!important;right:-7px!important}'
307+
document.head.appendChild(style)
308+
}
309+
298310
// ─── Register ─────────────────────────────────────────────────────────────────
299311

300312
app.registerExtension({
301313
name: 'ComfyUI.QueueSidebar',
302314

315+
commands: [
316+
{
317+
id: 'ComfyUI.QueueSidebar.Toggle',
318+
label: () => t('queue'),
319+
icon: 'pi pi-history',
320+
function() {
321+
app.extensionManager.sidebarTab?.toggleSidebarTab('queue')
322+
},
323+
},
324+
],
325+
326+
keybindings: [
327+
{
328+
commandId: 'ComfyUI.QueueSidebar.Toggle',
329+
combo: { key: 'q' },
330+
},
331+
],
332+
303333
async setup() {
304334
// Load translations from web/locales/<locale>.json
305335
await loadI18n()
306336

337+
injectBadgeStyle()
307338
hookQueuePrompt(app, refresh)
308339

309340
api.addEventListener('status', onStatus)

0 commit comments

Comments
 (0)