Conversation
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.
Summary
Integrate md-react-preview (mrp) into docs.tailor.tech to provide live interactive previews for AppShell component documentation pages.
Background
AppShell's component documentation is authored as Markdown in the app-shell repository and synced to this repository (docs.tailor.tech) for rendering with VitePress.
In tailor-platform/app-shell#250, mrp was integrated on the AppShell side to enable local component preview via
pnpm docs:preview. This PR is the counterpart on the docs.tailor.tech side — it adds the VitePress plugin so that the same preview blocks render as live interactive components in production.What is mrp?
md-react-preview (mrp) is a toolchain that enables Storybook-like live React component previews directly inside Markdown documentation. It provides both a Vite plugin and a VitePress plugin sharing the same rendering core:
pnpm docs:previewto preview documentation locally (viamrp dev)@izumisy/vitepress-plugin-react-preview)This allows documentation authors to write
```tsx previewcode blocks in Markdown and get identical interactive results both locally and in production.Changes
@izumisy/vitepress-plugin-react-preview(^0.3.0),@tailor-platform/app-shell,react, andreact-domas dev dependencies.vitepress/config.mts— registers the Vite plugin and markdown-it plugin with AppShell's CSS (@tailor-platform/app-shell/styles)PreviewBlockVue component globally in.vitepress/theme/index.tsdocs/app-shell/components/button.mdto use the newpreviewfence syntax (export default (...)with fragment wrappers)How to test
Open http://localhost:5173/app-shell/components/button and verify that the "Basic Usage" section renders live interactive Button components.