Repository navigation
feat(rozier): add missing stories - #557
Merged
Merged
Conversation
added 2 commits
October 30, 2026 15:34
Part of #539, PR 3 of 3. - Add stories and storybook renderers for rz-page, rz-bulk-section, rz-bulk-actions, rz-aside, rz-geotag, rz-node-tree-contextual-menu and rz-save-button; mock their requests with MSW. - Move the tree and contextual menu renderers out of RzTree.stories.ts so the Aside pattern reuses them. - Fix the HeaderNavItem button story: rz-header-nav-item-button. - List the new titles in docs/storybook.md.
ActionsMenu, LivePreview and SaveButton stories each built rz-actions-menu by hand. They now use storybook/renderer/rzActionsMenu.ts, which mirrors macros/rz_actions_menu.html.twig (custom element, data-axis, drag handle).
6 tasks
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 3 of 3.
Summary
Adds the missing stories listed in #539, following
lib/Rozier/docs/storybook.md. Each story has a renderer inapp/utils/storybook/renderer/that mirrors its Twig template. Requests the elements make are mocked with MSW, so the real custom elements run.rz-asiderenders its loading state, fetches the tree gateway (mocked), fades the tree in.Loading: the gateway never answers.data-tab-controls).multiple, click on the map places a marker.DefaultfetchescontextualMenu.html.twig(mocked) on first opening, as in the backoffice.Prefilledis story-only.--scroll-topcommand scrollsrz-pageto the top.Simplifications, stated in the renderer comments: the Aside head has no language switcher and no "add child" variant; the contextual menu content has no node badges; Page drops the legacy overlay, loader and UIkit hooks.
Evidence
index.json51 titles / 199 stories; the seven elements had no story; HeaderNavItemButtonCustomElementrenderedis="rz-header-nav-button", which is never defined, so clicking did nothing.After: 58 titles / 212 stories.
pnpm lint,pnpm build:checkandpnpm build-storybookpass (node container). Each new story checked in Storybook in light and dark themes: interactions above confirmed in the DOM (e.g. BulkSection submit prints["2","3"]; HeaderNavItem button togglesaria-expanded).treeType), Patterns/Pagerz-actions-menuwith its drag handle)Merge Danger
Door: two-way
Stories and story-only renderers; no runtime code, Twig or CSS changes.
Blast Radius: Storybook
Option keys follow the Twig meaning but not yet its spelling (
deleteFormActionvsdelete_form_action,treeTypevstree_type): the renaming is part of the v2.8 template move (ADR 0005). Some controls only change attributes (idon Page,labelon SaveButton,defaultTranslationIdon Aside,deleteFormInputNameon BulkActions). The ActionsMenu story now uses therz-actions-menuelement, which saves its dragged position inlocalStorage(rz-actions-menu-position), as in the backoffice.