Signature pad requires window resize after checkbox to initialize #4

Closed
opened 2026-03-24 15:54:21 +00:00 by forgejo_admin · 3 comments

Type

Bug

Lineage

plan-wkq → Phase 14 → discovered during e2e testing

Repo

forgejo_admin/westside-contracts

What Broke

Signature pad canvas initializes on mount with 0 dimensions because the signature area is hidden (CSS visibility toggle) until the "I agree" checkbox is checked. When revealed, the pad is broken — drawing doesn't register. A window resize event re-initializes it, but users shouldn't need to do that.

Repro Steps

  1. Open contract page
  2. Check "I have read and agree"
  3. Try to draw on the signature pad
  4. Observe: nothing draws, pad is unresponsive
  5. Resize browser window
  6. Observe: pad now works

Expected Behavior

Signature pad should be immediately usable after checking "I agree" — no resize needed. The pad should re-initialize when the signature area becomes visible.

Environment

  • Cluster/namespace: westside-contracts (prod)
  • Service version: latest (manual deploy 2026-03-24)
  • File: src/routes/contract/[token]/+page.svelteinitSignaturePad() and agreed state

Acceptance Criteria

  • Bug no longer reproduces
  • Manual verification: check agree checkbox, confirm signature pad initializes and accepts drawing, confirm submit button enables
  • Works on mobile touch and desktop mouse
  • project-westside-basketball
  • westside-app #72
### Type Bug ### Lineage `plan-wkq` → Phase 14 → discovered during e2e testing ### Repo `forgejo_admin/westside-contracts` ### What Broke Signature pad canvas initializes on mount with 0 dimensions because the signature area is hidden (CSS visibility toggle) until the "I agree" checkbox is checked. When revealed, the pad is broken — drawing doesn't register. A window resize event re-initializes it, but users shouldn't need to do that. ### Repro Steps 1. Open contract page 2. Check "I have read and agree" 3. Try to draw on the signature pad 4. Observe: nothing draws, pad is unresponsive 5. Resize browser window 6. Observe: pad now works ### Expected Behavior Signature pad should be immediately usable after checking "I agree" — no resize needed. The pad should re-initialize when the signature area becomes visible. ### Environment - Cluster/namespace: westside-contracts (prod) - Service version: latest (manual deploy 2026-03-24) - File: `src/routes/contract/[token]/+page.svelte` — `initSignaturePad()` and `agreed` state ### Acceptance Criteria - [ ] Bug no longer reproduces - [ ] Manual verification: check agree checkbox, confirm signature pad initializes and accepts drawing, confirm submit button enables - [ ] Works on mobile touch and desktop mouse ### Related - `project-westside-basketball` - westside-app #72
Author
Owner

Scope Review: NEEDS_REFINEMENT

Review note: review-312-2026-03-27
Bug diagnosis verified — initSignaturePad() runs on mount when canvas has 0 dimensions (hidden by CSS max-height: 0). File targets confirmed accurate.

Two issues found:

  • Arch label mismatch: Board item #312 has arch:westside-app but fix is in westside-contracts. Should be arch:westside-contracts.
  • Playwright AC not feasible: No Playwright infrastructure exists in this repo (no config, no e2e tests). Criterion "Playwright test: check agree → draw → submit enabled" needs rewriting as manual verification, or Playwright setup needs its own ticket first.
## Scope Review: NEEDS_REFINEMENT Review note: `review-312-2026-03-27` Bug diagnosis verified — `initSignaturePad()` runs on mount when canvas has 0 dimensions (hidden by CSS `max-height: 0`). File targets confirmed accurate. Two issues found: - **Arch label mismatch**: Board item #312 has `arch:westside-app` but fix is in `westside-contracts`. Should be `arch:westside-contracts`. - **Playwright AC not feasible**: No Playwright infrastructure exists in this repo (no config, no e2e tests). Criterion "Playwright test: check agree → draw → submit enabled" needs rewriting as manual verification, or Playwright setup needs its own ticket first.
Author
Owner

Scope Review Corrections Needed

From review-312-2026-03-27:

Fix 1: Board label corrected: arch:westside-apparch:westside-contracts (done).

Fix 2: Drop AC #3 (Playwright test). No Playwright config or e2e directory exists in westside-contracts. Replace with: "Manual verification: check agree checkbox, confirm signature pad initializes and accepts drawing, confirm submit button enables."

Once fixed → READY for next_up.

## Scope Review Corrections Needed From `review-312-2026-03-27`: **Fix 1:** Board label corrected: `arch:westside-app` → `arch:westside-contracts` (done). **Fix 2:** Drop AC #3 (Playwright test). No Playwright config or e2e directory exists in westside-contracts. Replace with: "Manual verification: check agree checkbox, confirm signature pad initializes and accepts drawing, confirm submit button enables." Once fixed → READY for next_up.
Author
Owner

Issue body updated per scope review corrections.

Issue body updated per scope review corrections.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
forgejo_admin/westside-contracts#4
No description provided.