Skip to content

Add Sandcastle, remove WizardExtra, fix wizard height (#1405, #1436) - #1

Open
ArendPeter wants to merge 349 commits into
mainfrom
sandcastle/issue-1436
Open

Add Sandcastle, remove WizardExtra, fix wizard height (#1405, #1436)#1
ArendPeter wants to merge 349 commits into
mainfrom
sandcastle/issue-1436

Conversation

@ArendPeter

Copy link
Copy Markdown
Owner

Summary

Test plan

  • Run docker compose up and open the election creation wizard
  • Verify the wizard does not change height as you click through race-type options
  • Verify "Customize in editor" navigates to /admin/build_ballot with sensible defaults (open access, device-ID auth)
  • Run Playwright regression test: cd testing && npx playwright test tests/create-election.spec.ts --reporter=list
  • Confirm ConfirmationDialogProvider dismissable (X button) works in dialogs that opt in

🤖 Generated with Claude Code

JonBlauvelt and others added 30 commits May 2, 2026 13:26
…_yarn/multi-c6f6658ed3

Bump path-to-regexp and express
fix(security): prevent X-Forwarded-For IP spoofing
…commented out

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Corrected a comment typo regarding the return of roundResults.
…ults preview link, and fix layout/styling across components
…esults viewers regardless of vote count, and render DraftWarning and AdminResultControls independently
… result visibility and election state labels
ArendPeter and others added 22 commits July 13, 2026 13:38
…_yarn/form-data-4.0.6

Bump form-data from 4.0.5 to 4.0.6
…_yarn/esbuild-0.28.1

Bump esbuild from 0.28.0 to 0.28.1
…_yarn/qs-6.15.2

Bump qs from 6.15.1 to 6.15.2
Moves the QA step into Phase 2 alongside implement/review, scoped to
each issue's own branch, and posts results as a comment on the issue
being worked instead of creating a separate QA issue at the end.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Reviewer now posts the QA summary/steps comment on the issue itself
after finishing its review, removing the need for a separate QA
sandbox run. Merging completed branches into main is now gated behind
a --merge flag instead of running automatically every invocation.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Prevents an issue that already has a QA comment from being re-selected
by future planning runs before it's merged.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Removes WizardExtra.tsx and the two-page sliding animation. Election
creation via "Customize in editor" or multi-race "Next" now applies
sensible defaults (open access, device-ID auth) and navigates directly
to /admin/build_ballot.

Key decisions:
- onCustomize sets voter_access='open', voter_id=true, contact_email
  from authenticated user (or empty string if anonymous)
- ConfirmationDialogProvider gains optional dismissable field: X button
  resolves the confirm promise with null; callers that omit it are
  unaffected (still get boolean)
- MultiRaceTitleSection sub-component (defined in Wizard.tsx) reads/
  writes election title and description via useElection; "Next" button
  disabled until title is non-empty
- wizard.publish_confirm.cancel changed from "See more options" to
  "Customize in editor"
- Old template-picker tests removed; new tests cover Customize path,
  multi-race default auth, and dismiss-dialog-returns-to-page-1

Files changed:
- packages/frontend/src/components/ElectionForm/Wizard/Wizard.tsx (rewritten)
- packages/frontend/src/components/ElectionForm/Wizard/WizardExtra.tsx (deleted)
- packages/frontend/src/components/ConfirmationDialogProvider.tsx
- packages/frontend/src/i18n/en.yaml
- testing/tests/create-election.spec.ts

Notes:
- E2E tests not runnable in this env (requires docker compose up);
  tsc and backend unit tests pass
- TransitionBox animation removed; multi-race section appears/hides
  via conditional render instead

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Merge duplicate ElectionContextProvider imports into a single default+
named import, and drop the redundant `.length < 1` check on the
already-falsy title guard.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Task: QA regression where the wizard started small and snapped tall as
the user clicked through options (introduced by the WizardExtra removal
in Equal-Vote#1405).

Key decisions:
- Replaced conditional rendering ({condition && <Component/>}) with
  TransitionBox wrappers so both RaceForm and MultiRaceTitleSection are
  always in the layout (only visibility/opacity changes)
- RaceForm uses a non-absolute TransitionBox so it holds space and
  keeps the wizard at its maximum height from the start
- MultiRaceTitleSection uses absolute={true} so it overlays the RaceForm
  without adding extra height (matching the old two-page layout approach)
- Added a Playwright regression test that asserts the wizard height
  before race-type selection is within 80% of the height after selecting
  "Just one" (single race)

Files changed:
- packages/frontend/src/components/ElectionForm/Wizard/Wizard.tsx
- testing/tests/create-election.spec.ts

Notes:
- E2E tests require docker compose up; tsc errors in wizard files are
  pre-existing (unbuilt shared module), not introduced here

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Reword the inline comments to describe why each measurement/assertion
exists (regression-guard for the snap-taller behavior) instead of
narrating what the next line does. Also drop the misleading "Scroll to
wizard" comment — the click on Create Election is what brings it into
view.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The wizard now keeps both branches mounted for height consistency,
so multiple "Next" buttons exist in the DOM at once — scope clicks
with .first() to avoid strict-mode violations. full-runthrough.spec.ts
was also stale from before wizard page 2 was removed: it filled the
title after the (now disabled-until-filled) Next click and expected
an intermediate voter-restriction page that no longer exists; updated
it to match the new direct-to-build_ballot flow with device-ID auth
applied by default.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@ArendPeter
ArendPeter force-pushed the sandcastle/issue-1436 branch from 8b6b9c2 to e36eca2 Compare July 15, 2026 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants