From 492f7c97f799ac86585a3ca986bd62dfe252756f Mon Sep 17 00:00:00 2001 From: TrevorBurgoyne Date: Mon, 19 Oct 2026 09:42:36 -0500 Subject: [PATCH 1/3] fix demo page by copying img path --- .github/tasks.md | 6 ++++++ .github/workflows/deploy-demo.yml | 1 + .vscode/settings.json | 8 +++++++- demo/live_demo.html | 2 +- 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/tasks.md b/.github/tasks.md index 063f5245..946a1424 100644 --- a/.github/tasks.md +++ b/.github/tasks.md @@ -8,3 +8,9 @@ inline Inkscape SVG per row. - [x] AnnotationList: `content-visibility: auto` on rows; id->index map in the grouped view. - [x] Lint, build, jest 515/515. + +## Fix GitHub Pages demo (blank page) + +- [x] `live_demo.html`: load `./cs-demo-0.png` (relative) so it resolves under `/ulabel/`. +- [x] `deploy-demo.yml`: copy `demo/cs-demo-0.png` into `_site`. +- [x] Verified with Playwright against a simulated `/ulabel/` Pages layout. diff --git a/.github/workflows/deploy-demo.yml b/.github/workflows/deploy-demo.yml index d209dae3..17fce4e2 100644 --- a/.github/workflows/deploy-demo.yml +++ b/.github/workflows/deploy-demo.yml @@ -42,6 +42,7 @@ jobs: mkdir -p _site cp demo/live_demo.html _site/index.html cp dist/ulabel.min.js _site/ulabel.min.js + cp demo/cs-demo-0.png _site/cs-demo-0.png - name: Configure Pages uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5 diff --git a/.vscode/settings.json b/.vscode/settings.json index d59504ad..30c678ca 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,3 +1,9 @@ { - "js/ts.tsdk.path": "node_modules\\typescript\\lib" + "js/ts.tsdk.path": "node_modules\\typescript\\lib", + "chat.tools.terminal.autoApprove": { + "/^gh api repos/SenteraLLC/ulabel/pages --jq \\.html_url; git --no-pager log --oneline -5; Get-ChildItem \\.github\\\\workflows \\| Select-Object Name$/": { + "approve": true, + "matchCommandLine": true + } + } } \ No newline at end of file diff --git a/demo/live_demo.html b/demo/live_demo.html index 4aa090d2..38b6b11b 100644 --- a/demo/live_demo.html +++ b/demo/live_demo.html @@ -776,7 +776,7 @@ // Initial ULabel configuration let ulabel = new ULabel({ "container_id": "container", - "image_data": "/cs-demo-0.png", + "image_data": "./cs-demo-0.png", "username": "DemoUser", "submit_buttons": on_submit, "subtasks": subtasks From 918af7b7f2aca68b9f4551ea210721f4d32be7dd Mon Sep 17 00:00:00 2001 From: TrevorBurgoyne Date: Tue, 20 Oct 2026 09:38:02 -0500 Subject: [PATCH 2/3] fix annotation list behavior --- .github/tasks.md | 9 +++++++++ CHANGELOG.md | 3 +++ src/toolbox_items/annotation_list.ts | 3 ++- tests/e2e/isolate.spec.js | 2 ++ 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/tasks.md b/.github/tasks.md index 946a1424..761cfe4f 100644 --- a/.github/tasks.md +++ b/.github/tasks.md @@ -14,3 +14,12 @@ - [x] `live_demo.html`: load `./cs-demo-0.png` (relative) so it resolves under `/ulabel/`. - [x] `deploy-demo.yml`: copy `demo/cs-demo-0.png` into `_site`. - [x] Verified with Playwright against a simulated `/ulabel/` Pages layout. + +## Fix flaky Firefox isolate e2e test + +- [x] AnnotationList: `contain-intrinsic-size` 37px -> 24px. It sizes the content box, so + unrendered rows were 54px vs 41px rendered; the list shifted as rows rendered and the + test's click hit the row instead of the isolate button. +- [x] Test: move the mouse off the list before counting pixels (Firefox hovers the + re-rendered row, drawing a thicker outline). +- [x] Verified: Firefox 50/50 with no settle wait; list-related e2e 156/156; lint; jest 515/515. diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f3c1d83..a4e0aca1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,9 @@ All notable changes to this project will be documented here. ## [Unreleased] +#### Fixed +- `AnnotationList` rows that had not been drawn yet reserved 54px instead of 41px, so the list jumped as rows scrolled into view (most visible in Firefox). + #### Changed - `init()` now returns the `ulabel_init`; typed `Promise` diff --git a/src/toolbox_items/annotation_list.ts b/src/toolbox_items/annotation_list.ts index 6751dbfd..911ad194 100644 --- a/src/toolbox_items/annotation_list.ts +++ b/src/toolbox_items/annotation_list.ts @@ -178,7 +178,8 @@ export class AnnotationListToolboxItem extends ToolboxItem { cursor: pointer; transition: background-color 150ms; content-visibility: auto; - contain-intrinsic-size: auto 37px; + /* Content-box height: a rendered row is 24px of content + 1rem padding + 1px border */ + contain-intrinsic-size: auto 24px; } #toolbox .annotation-list-item:last-child { diff --git a/tests/e2e/isolate.spec.js b/tests/e2e/isolate.spec.js index 28b7a2f7..a8b134da 100644 --- a/tests/e2e/isolate.spec.js +++ b/tests/e2e/isolate.spec.js @@ -86,6 +86,8 @@ test.describe("isolate annotation", () => { const entry = page.locator(".annotation-list-item[data-annotation-id=\"grid-7\"]"); await entry.locator(".annotation-list-item-isolate").click(); + // The re-rendered row lands under the cursor; Firefox hovers it, drawing a thicker outline + await page.mouse.move(5, 5); await page.waitForTimeout(100); expect(await isolated_id(page)).toBe("grid-7"); From 267313e7fdf14270b85eda448984f038a45a01c1 Mon Sep 17 00:00:00 2001 From: TrevorBurgoyne Date: Wed, 21 Oct 2026 08:46:32 -0500 Subject: [PATCH 3/3] Bump version. --- package-lock.json | 4 ++-- package.json | 2 +- src/version.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index d85d8aff..4f319c33 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "ulabel", - "version": "0.30.0", + "version": "0.30.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "ulabel", - "version": "0.30.0", + "version": "0.30.1", "license": "MIT", "devDependencies": { "@eslint/config-inspector": "^1.3.0", diff --git a/package.json b/package.json index 1c5b46d4..2edd0f2e 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ulabel", "description": "An image annotation tool.", - "version": "0.30.0", + "version": "0.30.1", "main": "dist/ulabel.min.js", "module": "dist/ulabel.min.js", "types": "dist/index.d.ts", diff --git a/src/version.js b/src/version.js index e1e7a4da..53812b65 100644 --- a/src/version.js +++ b/src/version.js @@ -1 +1 @@ -export const ULABEL_VERSION = "0.30.0"; +export const ULABEL_VERSION = "0.30.1";