Repository navigation
feat(storybook): copyable snippets, usage guides on docs pages, toolbar globals and RTL fixes - #415
Merged
Merged
Conversation
|
📦 Preview published for commit Install the preview with dist-tag: npm install @vc-shell/framework@pr-415Or pin to the exact commit: npm install @vc-shell/framework@2.11.0-pr415.60da4d1Published packages (dist-tag
|
maksimzinchuk
force-pushed
the
feat/storybook-audit-fixes
branch
2 times, most recently
from
November 16, 2026 13:15
6eb8eb8 to
97520fc
Compare
…ar globals and RTL fixes Docs pages - "Show code" prints a story as a <script setup> + <template> SFC with @vc-shell/framework imports (source-snippet.ts). - The component's *.docs.md is rendered under "Usage guide"; its links open the matching Storybook page or the docs site. - Guides load in a separate chunk, prefetched only in the top frame, so the VcDataTable docs page no longer freezes. - Docs pages scroll the window instead of an inner div, so popups teleported to body (date picker) are no longer cut off. - Toast stories reserve the height of their toast; long toasts were clipped. Toolbar - Theme, language (every framework locale) and direction (auto/ltr/rtl). - Language also emulates navigator.language, which the framework uses for date, number and money formats. - Stories rendered in nested docs iframes follow the toolbar. Checks and tooling - yarn check:story-argtypes fails when a story documents a prop, event or slot the component no longer has; runs in yarn check and CI. - yarn generate:component-manifest writes cli/vc-app-skill/runtime/knowledge/components.json for the vc-app skill; regenerated on release. - Play functions on key stories; deprecated stories hidden from docs pages; stale argTypes removed. - Removed the unused chromatic and onboarding addons; pre-bundled new preview deps to avoid cold-cache test failures. RTL fixes in the framework - VcDatePicker: the field and the calendar follow the page direction. - VcBadge: custom position uses inset-inline-end. - DraggableDashboard: gridstack mirrors when the page is right-to-left.
maksimzinchuk
force-pushed
the
feat/storybook-audit-fixes
branch
from
November 16, 2026 13:24
97520fc to
60da4d1
Compare
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.
Why
A Storybook audit found these problems:
*.docs.mdusage guides never appeared in Storybook.What changes
Docs pages
<script setup>+<template>SFC with@vc-shell/frameworkimports (.storybook/source-snippet.ts). An explicitdocs.source.codestill wins. The same snippet appears in the Code panel of every story (docs.codePanel).*.docs.mdis rendered under "Usage guide" (.storybook/docs-page.ts). Its links open the matching Storybook page, or the docs site when the target is not in Storybook.```mermaidblocks become diagrams. Mermaid loads only on a page that has one.!!! tip "...") become coloured callouts.body, such as the date picker calendar, were cut off at the viewport edge.position: absolute.Toolbar
navigator.language, which the framework uses for date, number and money formats.--additional-50), not Storybook's white, so the dark theme looks as it does in apps.--neutrals-*;Checks and tooling
yarn check:story-argtypes. Fails when a story documents a prop, event or slot the component no longer has. It runs inyarn checkand CI. Stale entries are removed in VcStatus and VcScheduler.yarn generate:component-manifest. Writescli/vc-app-skill/runtime/knowledge/components.jsonwith props, events, slots, docs path and story ids for the vc-app skill. The release regenerates it.@chromatic-com/storybookand@storybook/addon-onboarding.yarn test:storybook..storybook/README.mdis rewritten.RTL fixes in the framework
inset-inline-endinstead ofright.rtl: 'auto'reads only the element's inline style. Covered by unit tests.The RTL fixes come from an audit of all 679 stories in both directions. The mirrored element boxes were compared, and popups were checked separately.
Not changed
The framework still formats dates and money by the browser locale, not the app language. That is documented behavior, and changing it is a separate decision.
Verification
yarn checkis green: lint, format, stylelint, typecheck, locales, circular, layers, story argTypes.yarn test:storybook: 95 files, 684 tests passed.