chore: retire in-Storybook docs, wire Storybook <-> docs links#1245
Open
Fabian Hüske (fabianhueske) wants to merge 5 commits into
Open
chore: retire in-Storybook docs, wire Storybook <-> docs links#1245Fabian Hüske (fabianhueske) wants to merge 5 commits into
Fabian Hüske (fabianhueske) wants to merge 5 commits into
Conversation
Storybook becomes a component playground + autodocs only; meteor.shopware.com (apps/docs) is the single documentation site. They cross-link per component. Storybook (packages/component-library): - Remove all custom docs MDX (components, foundations, getting-started), the _components React helpers, preview-head.html styling, remark-gfm, @storybook/blocks, and STORYBOOK_DOCS_STANDARD.md - Rely on global autodocs; simplify main.ts/preview.ts; fix stale storySort - Add a dynamic toolbar 'Documentation' button linking each component to its meteor.shopware.com page (declare @storybook/components + @storybook/icons) - Use the shared shopware-meteor-logo.svg; drop old vercel logo URLs Docs (apps/docs): - Add a per-component 'Storybook' header button (custom i-custom:storybook icon) - Move inset to /utilities/components (layout utility, like theme-provider) - Replace hard-coded section redirects with section-redirect.global.ts, which resolves the first sidebar entry from the live navigation tree
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
Arnold Stoba (arnoldstoba)
approved these changes
Jul 2, 2026
@shopware-ag/meteor-admin-sdk
@shopware-ag/meteor-component-library
@shopware-ag/create-meteor-extension
@shopware-ag/meteor-icon-kit
@shopware-ag/meteor-prettier-config
@shopware-ag/stylelint-plugin-meteor
@shopware-ag/meteor-tokens
commit: |
…llback - Detect section roots from the navigation tree instead of a hard-coded path regex, so new top-level (or nested) sections redirect automatically - Add a fallback map for the header-linked roots so they never 404 if the navigation tree can't be loaded (e.g. transient content failure) - Drop the redundant redirect comment from nuxt.config.ts (the middleware is self-documenting)
… links - Read the navigation tree Docus already fetched via useNuxtData instead of fetching a second copy under a separate key (avoids serialising the whole nav tree into the payload twice on every docs page); query directly only as an SSR fallback - Extract shared componentSlug/componentSourcePaths computeds so the GitHub and Storybook link builders no longer duplicate the route guard and source lookup
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.
What?
Retires the custom documentation layer that lived inside Storybook and establishes a clear split:
apps/docs) is the single source of documentation.packages/component-library) becomes a component playground + auto-generated API docs only.The two now cross-link per component: every docs component page links out to its Storybook page, and every Storybook component view links back to its docs page.
Storybook (
packages/component-library)src/docs/_componentsReact helpers,preview-head.htmldocs styling,STORYBOOK_DOCS_STANDARD.md,remark-gfm, and the now-unused@storybook/blocksdep.autodocsfor every component; simplifiedmain.ts/preview.tsand fixed a stalestorySortorder.meteor.shopware.compage (declared@storybook/components+@storybook/icons, which were previously phantom deps).shopware-meteor-logo.svgand the brand link tometeor.shopware.com; dropped the old absolute vercel logo URLs.Docs (
apps/docs)i-custom:storybookicon.insetfrom/componentsto/utilities/components(it's a layout utility, liketheme-provider).Why?
apps/docsand as MDX inside Storybook. Maintaining two copies is error-prone, and Storybook's custom docs styling/standards added upkeep with no payoff now that the docs site exists./components→/components/action-menu, etc.) silently broke whenever the sidebar was reordered or a higher-sorted page was added, pointing users at the wrong page.How?
tags: ["autodocs"]generate a default docs page per component.addon-essentialsprovides docs; the splitaddon-docs+remark-gfmsetup (only needed for MDX tables) was removed.useStorybookApi().getCurrentStoryData()(re-rendering on navigation) and mapsComponents/<Name>→meteor.shopware.com/components/<kebab-slug>; non-component views fall back to the docs home.storybook.meteor.shopware.com/?path=/docs/components-<slug>(Storybook auto-resolves the shortened path to the component's autodocs). Gated on the samecomponentSourcePathsmap as the existing GitHub button so the two buttons pair up.app/middleware/section-redirect.global.tsqueriesqueryCollectionNavigation('docs'), finds the node for the requested section path, walks to its first leaf, and issues a302. This replaces the entirerouteRulesredirect block and always tracks the sidebar's actual order.Testing?
nuxt typecheck(docs): 0 errors.eslint(component-library): 0 errors.prettier --check: clean in both packages.build:storybooksucceeds; 45 autodocs pages generated (one per component)./components/badge) and falls back to home on directives./components→/components/action-menu,/documentation→.../getting-started/installation/utilities→/utilities/components/inset,/utilities/composables→.../use-future-flags(previously hard-coded to the wronguse-snackbar)/components/inset→ 404 (moved),/components/badge→ 200 (leaf pages untouched)/components/pages have matching Storybook pages;data-table-filterandsegmented-controlare intentionally hidden internal companions.Anything Else?
storybook.meteor.shopware.commust serve this Storybook, andmeteor.shopware.commust hostapps/docs, for the cross-links to resolve. Both are the assumed hosts inapp.config.ts/shopwareTheme.js.Components/*;Directives/Tooltip(and future composable stories) currently link to the docs home rather than/utilities/....docscollection with no locale prefix; would need adjusting if docs i18n is enabled.302(not301) is used for the dynamic redirects on purpose, since the computed target can change and must not be hard-cached by browsers.main, unrelated to this branch.