Repository navigation
refactor(rozier): migrate stories to convention - #553
Merged
Merged
Conversation
added 8 commits
October 30, 2026 10:48
The story imported rzButton from app/utils/storybook/renderer/, which does not exist, so build-storybook failed. Use the component renderer with its current single options signature (tertiary/sm, as in editSource.html.twig), declare the render once in meta, file the story under Patterns/LivePreview and rename the first story to Default.
The a11y addon is not installed, so the parameter had no effect.
Apply lib/Rozier/docs/storybook.md to every story file: - Titles follow the Foundations / Components/<Group> / Patterns tree; sub-components use <Parent>/Root and <Parent>/Item. - Foundation files lose the RZ prefix (Colors, Text, FontFamily, Icons); RzThemeSwitcher becomes RzColorSchemeSwitcher. - Story option types move into their renderer as Rz<Name>Options: renderers no longer import types from stories, stories no longer import Args from each other. - render is declared once in meta; stories vary through args. Stories that hard-coded values in render now pass them as args (Badge, Input, Link, Tree child-nodes layout, Toast stack). - First story is Default; app imports use ~/. - Drop the RzEntityThumbnail side-effect import (registered globally) and options the renderers ignored (additionalClasses, extra render arguments), replaced by attributes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #539 — Phase 0 (#531), PR 2 of 3.
Applies the Storybook convention from #538 (
lib/Rozier/docs/storybook.md, ADR 0004) to the existing stories. No new stories (PR 3), no component or runtime renderer change.What changes
Foundations/,Components/<Group>/(Actions, Form, Overlay, Navigation, Data display, Feedback) orPatterns/; sub-components use<Parent>/Root+<Parent>/Item. Foundation files drop theRzprefix,RzThemeSwitcherbecomesRzColorSchemeSwitcher.Headeris filed underPatterns/as the tree requires.Rz<Name>Options). Renderers no longer import types from story files, and stories no longer importArgsfrom each other. Changes inapp/utils/storybook/renderer/are type-only;app/utils/component-renderer/is untouched.renderis declared once inmeta; stories vary throughargs, so controls drive every story. Values that were hard-coded inside per-story renders (Badge variants, Input min/max/checked, Link class, Tree child-nodes layout, Toast stack) are now args. Story-specific renders remain only for compositions fed by args.RzLivePreview.stories.tsimported a renderer that does not exist (Storybook build failed);additionalClasses, which no renderer reads, replaced byattributes.class; deada11yparameter removed from.storybook/preview.ts.storybook/renderer/rzColorSchemeSwitcher.tsreplaces the hand-written markup and mirrorsincludes/rz_color_scheme_switcher.html.twig; the Header renderer now includes it, asadmin/rz_header.html.twigdoes..rz-page__bodysplit view, toggle inrz-actions-menu) and renders each story in its own docs iframe.--screen-md-min) instead of 1280px (--screen-lg-min), inrz-live-preview.css.Defaultfirst,*Drawersuffix dropped, PageHeaderItem→ItemClasses).Out of scope / follow-ups
rz-page,rz-bulk-section, …) andPatterns/Aside: PR 3.RzPopover.stories.tskeeps a local popover renderer that duplicatesstorybook/renderer/rzPopover.tswith different options; merging them changes the story args, left for a follow-up.iconClassarg.Verification
pnpm lint,pnpm build:check,pnpm build-storybookpass (in thenodecontainer); before this branchbuild-storybookfailed on therzButtonimport.index.jsonlists 51 titles / 199 stories matching the tree instorybook.md.markdown-editor-button-h*), FileUpload, RepeatablechildNodes)Merge Danger
Door: two-way
Stories, Storybook renderers and Storybook config, plus one backoffice CSS change: the live preview breakpoint.
Blast Radius: Storybook — bookmarked story URLs break because story IDs change. Backoffice — on the node-source edit page of headless installations, the live preview toggle and split view now appear between 960px and 1279px, where they were hidden; the form shrinks to about 520px next to a 360px preview at 960px.