From 950fb5f0b2743e941b65738c7570e9920edbc633 Mon Sep 17 00:00:00 2001 From: Edwin van den Houdt Date: Mon, 20 Jul 2026 13:39:13 +0200 Subject: [PATCH] fix(cibg): wizard fields render as grey fieldset groups Wizard steps rendered bare .form-group divs, so CIBG's ".form-horizontal fieldset { background:#f1f5f9; margin-bottom:1.25em }" never matched and inputs showed on white instead of the grey CIBG surface. Wrap each logical field group per step in a
(intake, herregistratie and registratie wizards); CIBG then gives every group its grey surface with a 1.25em gap between groups. The shell stays group-agnostic (no outer fieldset, which would hide the white gaps). address-fields already used a
. Adds intake-wizard.component.spec.ts asserting the buitenland step renders its groups as separate fieldsets (guards against the wrapping being dropped again). Co-Authored-By: Claude Opus 4.8 --- .../herregistratie-wizard.component.ts | 106 +++++----- .../intake-wizard.component.spec.ts | 36 ++++ .../intake-wizard/intake-wizard.component.ts | 188 +++++++++--------- .../registratie-wizard.component.ts | 184 +++++++++-------- .../wizard-shell/wizard-shell.component.ts | 4 + 5 files changed, 292 insertions(+), 226 deletions(-) create mode 100644 src/app/herregistratie/ui/intake-wizard/intake-wizard.component.spec.ts diff --git a/src/app/herregistratie/ui/herregistratie-wizard/herregistratie-wizard.component.ts b/src/app/herregistratie/ui/herregistratie-wizard/herregistratie-wizard.component.ts index 5ad99fe..f2cc4ad 100644 --- a/src/app/herregistratie/ui/herregistratie-wizard/herregistratie-wizard.component.ts +++ b/src/app/herregistratie/ui/herregistratie-wizard/herregistratie-wizard.component.ts @@ -64,59 +64,63 @@ import { UploadState, initialUpload, deliveryRefs } from '@shared/upload/upload. > @switch (step()) { @case (1) { - - - - - - +
+ + + + + + +
} @case (2) { - - - +
+ + + +
} @case (3) { blocks (`.form-horizontal fieldset` ⇒ #f1f5f9, 1.25em gap). If the fieldset +// wrapping is dropped, the inputs revert to bare white. The buitenland step with +// buitenlandGewerkt='ja' has two groups (the question + the land/uren follow-up), so it +// must render ≥2 fieldsets, each holding a form-group. +const buitenlandJa: IntakeState = { + tag: 'Answering', + answers: { buitenlandGewerkt: 'ja' }, + cursor: 0, + errors: {}, + scholingThreshold: 1000, +}; + +describe('IntakeWizardComponent', () => { + it('renders each field group as its own grey
', () => { + TestBed.configureTestingModule({ + providers: [provideHttpClient(), provideApiClient()], + }); + const fixture = TestBed.createComponent(IntakeWizardComponent); + fixture.componentInstance.dispatch({ tag: 'Seed', state: buitenlandJa }); + fixture.detectChanges(); + + const fieldsets: HTMLElement[] = Array.from( + fixture.nativeElement.querySelectorAll('form.form-horizontal fieldset'), + ); + expect(fieldsets.length).toBeGreaterThanOrEqual(2); + fieldsets.forEach((fs) => expect(fs.querySelector('.form-group')).toBeTruthy()); + }); +}); diff --git a/src/app/herregistratie/ui/intake-wizard/intake-wizard.component.ts b/src/app/herregistratie/ui/intake-wizard/intake-wizard.component.ts index 744ee52..007a4c3 100644 --- a/src/app/herregistratie/ui/intake-wizard/intake-wizard.component.ts +++ b/src/app/herregistratie/ui/intake-wizard/intake-wizard.component.ts @@ -71,105 +71,115 @@ import { IntakePolicyStore } from '@herregistratie/application/intake-policy.sto > @switch (step()) { @case ('buitenland') { - - - +
+ + + +
@if (answers().buitenlandGewerkt === 'ja') { - - - - - - +
+ + + + + + +
} } @case ('werk') { - - - - @if (scholingZichtbaar()) { +
- - - } - @if (answers().scholingGevolgd === 'ja') { - +
+ @if (scholingZichtbaar()) { +
+ + + +
+ } + @if (answers().scholingGevolgd === 'ja') { +
+ + + +
} } @case ('review') { diff --git a/src/app/registratie/ui/registratie-wizard/registratie-wizard.component.ts b/src/app/registratie/ui/registratie-wizard/registratie-wizard.component.ts index 72f1d92..714b298 100644 --- a/src/app/registratie/ui/registratie-wizard/registratie-wizard.component.ts +++ b/src/app/registratie/ui/registratie-wizard/registratie-wizard.component.ts @@ -130,40 +130,44 @@ const NL_TAALVAARDIGHEID_VRAAG = 'nl-taalvaardigheid'; }" (fieldChange)="set($event.key, $event.value)" /> - - - - @if (draft().correspondentie === 'email') { +
- +
+ @if (draft().correspondentie === 'email') { +
+ + + +
} } } @@ -171,21 +175,23 @@ const NL_TAALVAARDIGHEID_VRAAG = 'nl-taalvaardigheid'; @if (duoData(); as data) { - - - +
+ + + +
@if (handmatigActief()) { - - - +
+ + + +
} @else if (draft().beroep) {
} - @for (q of actieveVragen(data); track q.id) { - - @if (q.type === 'ja-nee') { - - } @else { - + @if (actieveVragen(data).length) { +
+ @for (q of actieveVragen(data); track q.id) { + + @if (q.type === 'ja-nee') { + + } @else { + + } + } - +
} } diff --git a/src/app/shared/layout/wizard-shell/wizard-shell.component.ts b/src/app/shared/layout/wizard-shell/wizard-shell.component.ts index a129169..f7577fd 100644 --- a/src/app/shared/layout/wizard-shell/wizard-shell.component.ts +++ b/src/app/shared/layout/wizard-shell/wizard-shell.component.ts @@ -90,6 +90,10 @@ export type WizardStatus = 'editing' | 'submitting' | 'submitted' | 'failed'; * verplichte velden
+