Three dashboard-section stories used a fourth title segment (`Domein/Registratie/Dashboard/<Name>`) that the sidebar rule does not have. Drop the `Dashboard/` segment so all story titles follow the one rule from CLAUDE.md decision 5. Add the two missing stories for sections that have more than one visual state: `wat-moet-ik-regelen` (4 states) and `wat-wilt-u-doen` (2 states, the first story in the new `Domein/Overzicht/` bucket). `beheer-links` gets no story — it has one visual state and its other branch renders nothing. The `MetTaken` story disables the a11y addon with the same reason and WP-11 reference already used on `task-list.stories.ts` and `choice-list.stories.ts`: `app-choice-link`'s host sits between the keuzelijst `<ul>` and its `<li>`, a pre-existing structural gap this ticket does not fix. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
9.6 KiB
RD-04 — Story titles to Domein/<Context>/<Name>, and the two missing stories
Status: done Source: PLAN.md Phase 0 ("Also settle the two deviations the refactor left behind")
Why
CLAUDE.md decision 5 sets one title rule for a component in an app context's ui/:
Domein/<Context>/<Name> — "full stop, regardless of which atomic layer it is". The three
dashboard-section stories break it. They read Domein/Registratie/Dashboard/<Name>, a fourth
segment that invents a sidebar folder the rule does not have. All 66 other story files comply.
RD-03 split the dashboard into two contexts but did not touch the stories. Three of the six sections still have no story at all.
Read first
apps/ssp/src/app/registratie/ui/dashboard/mijn-registratie.section.stories.ts— the shape to copy: astoreStubreturning only the members the template reads, oneapplicationConfigdecorator per story, andloading/success/failurefrom@shared/testing/remote-data.apps/ssp/src/app/registratie/ui/dashboard/wat-moet-ik-regelen.section.ts— needs a story.apps/ssp/src/app/overzicht/ui/wat-wilt-u-doen.section.ts— needs a story.apps/ssp/src/app/registratie/domain/tasks.ts—tasksFromProfile, which decides whether the task list renders full or empty.- CLAUDE.md decision 5, the paragraph starting "Story titles mirror the sidebar's".
Decisions (pre-made, don't relitigate)
-
Retitle the three existing stories. Drop the
Dashboard/segment only.File From To dashboard/mijn-aanvragen.section.stories.tsDomein/Registratie/Dashboard/Mijn AanvragenDomein/Registratie/Mijn Aanvragendashboard/mijn-registratie.section.stories.tsDomein/Registratie/Dashboard/Mijn RegistratieDomein/Registratie/Mijn Registratiedashboard/specialismen.section.stories.tsDomein/Registratie/Dashboard/SpecialismenDomein/Registratie/SpecialismenThe files stay where they are. RD-03 decision 3 keeps the four data sections in
registratie/ui/dashboard/; the folder is not the title. -
Add exactly two story files, not three. PLAN's rule is "add one only where the section has more than one visual state".
wat-moet-ik-regelen.section.stories.ts, titledDomein/Registratie/Wat Moet Ik Regelen— four states.wat-wilt-u-doen.section.stories.ts, titledDomein/Overzicht/Wat Wilt U Doen— two states. This creates theDomein/Overzicht/sidebar bucket; it is the first story in that context.
-
beheer-links.section.tsgets no story. It has one visual state. Its other branch renders nothing at all —@if (adminLinks().length)wraps the whole template — and a story whose canvas is blank documents nothing and gives the a11y addon nothing to check. The capability filter it applies (AccessStore.can) is already covered where it can actually be asserted, in the application layer. Do not add the file. -
wat-moet-ik-regelengets four stories, from a stub with the four members its template and class read —profile(),decisions(),pendingHerregistratie(),reloadProfile():Story profile()decisions()pendingHerregistratie()Renders Loadingloading()loading()falsetwo skeleton bars MetTakensuccess(p)success({ eligibleForHerregistratie: true })falsethe task list, one task NietsOpenstaandsuccess(p)success({ eligibleForHerregistratie: false })falsethe "niets openstaan" text InBehandelingsuccess(p)success({ eligibleForHerregistratie: false })truethe info alert above the above Failedis deliberately absent —<app-async>'s failure template is already exercised byMijn Registratie'sFailedstory, and this section adds nothing to it. -
The task count follows from
tasksFromProfile, so pick the profile deliberately. Withstatus.tag === 'Geregistreerd', the list is empty unlesseligibleForHerregistratieis true. That is what separatesMetTakenfromNietsOpenstaand— the eligibility flag, not the profile. Reuse theprofilefixture frommijn-registratie.section.stories.tsverbatim (copy it; do not export it from the other story file and import it — story files in this repo are self-contained). -
wat-wilt-u-doengets two stories, from aFeatureFlagStorestub whose only member isenabled:Story stub Renders InschrijvingOpen{ enabled: () => true }six actions, "Inschrijven" first InschrijvingDicht{ enabled: () => false }five actions, no "Inschrijven" -
libs/beheer's title stays wrong here.Domein/Beheer/Stamdata Table Editoris a different deviation with a different verdict (the doc changes, not the code). RD-28 owns it. Do not touch it.
Files
apps/ssp/src/app/registratie/ui/dashboard/mijn-aanvragen.section.stories.ts(title only)apps/ssp/src/app/registratie/ui/dashboard/mijn-registratie.section.stories.ts(title only)apps/ssp/src/app/registratie/ui/dashboard/specialismen.section.stories.ts(title only)apps/ssp/src/app/registratie/ui/dashboard/wat-moet-ik-regelen.section.stories.ts(new)apps/ssp/src/app/overzicht/ui/wat-wilt-u-doen.section.stories.ts(new)
Steps
- Retitle the three files per decision 1. Nothing else in those files changes.
- Write
wat-moet-ik-regelen.section.stories.tsper decisions 4 and 5. - Write
wat-wilt-u-doen.section.stories.tsper decision 6. git addall five files, then run the acceptance commands.- Update this ticket's
Status:todoneand the README's RD-04 row todone. - Commit all of it together.
Acceptance criteria
Dry-run against the tree before handover; the "is" numbers are measured, not estimated.
Run these after git add. git grep and git ls-files read tracked files, so a new
story file that is not yet staged does not exist as far as they are concerned.
git grep -l "Domein/Registratie/Dashboard" -- apps | wc -l # is 3 -> MUST be 0
git grep -h "title: 'Domein" -- '*.stories.ts' | grep -c "Domein/[^/]*/[^/]*/" # is 3 -> MUST be 0
git ls-files '*.stories.ts' | wc -l # is 69 -> MUST be 71
The second command counts title lines with a fourth path segment. It is the general form of the rule, so it also catches a retitle that invents a different extra segment.
The two new stories exist, with the exact titles from decisions 2, 4 and 6:
git grep -c "title: 'Domein/Registratie/Wat Moet Ik Regelen'" -- apps/ssp/src/app/registratie/ui/dashboard/wat-moet-ik-regelen.section.stories.ts # MUST be 1
git grep -c "title: 'Domein/Overzicht/Wat Wilt U Doen'" -- apps/ssp/src/app/overzicht/ui/wat-wilt-u-doen.section.stories.ts # MUST be 1
beheer-links still has no story (decision 3):
git ls-files 'apps/ssp/src/app/overzicht/ui/beheer-links.section.stories.ts' | wc -l # MUST be 0
npm run ci --full # exits 0
Verification
--full is required. This ticket adds two story files, and npm run ci does not build
Storybook. A story that fails to compile, or a decorator with a missing provider, is invisible
until the storybook-a11y job runs. Run npm run ci --full, not npm run ci.
Verified for you: layers.mdx deep-links exactly two story ids —
design-system-molecules-application-link--navigatie and
domein-registratie-aanvraag-block--concept. Neither is a dashboard section, so the three
retitles break no link. Do not add a new deep link.
Out of scope
- Moving any story file. The four data sections stay in
registratie/ui/dashboard/(RD-03 decision 3). - A story for
beheer-links.section.ts(decision 3). libs/beheer'sDomein/Beheer/…title (decision 7, RD-28 owns it).- The dashboard's 8 imports. PLAN settled this: accept, do not fix.
- Renaming the
dashboard/folder. The name is stale now that the page lives inoverzicht, but no rule requires the folder to match a title, and the rename would touch every import.
Risks
- A story title is a URL. Storybook derives the story id from the title, so a retitle changes the id. Verified above that nothing links to these three; do not extend the retitle to a story outside the table without re-checking.
success(...)needs the decisions shape, not a boolean.store.decisions()is aRemoteData<Err, HerregistratieDecisions>. The stub returnssuccess({ eligibleForHerregistratie: true }), notsuccess(true).- The stub must cover every member the class reads, not only the template.
WatMoetIkRegelenSectionreadsdecisions()in acomputed, which the template never names. A stub missing it throws at render time, and only--fullcatches that. - Do not import a fixture across story files (decision 5). Copy it.