docs: render live examples on the pages still using preview fences - #530
Merged
Conversation
footer, icon, form control, checks & radios, grid, columns and gutters still carried the pre-Astro ```jsx preview fences. The docs engine has no handler for the `preview` meta, so all 60 of them rendered as code blocks with no demo. Move each snippet to an `examples/*.tsx` file mounted through <Example>, the pattern every other page already uses.
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.
Seven pages still carried the pre-Astro ```jsx preview fences:
components/footer, `components/icon`, `forms/form-control`, `forms/checks-radios`, `layout/grid`, `layout/columns` and `layout/gutters`. The docs engine has no handler for the `preview` meta, so all 60 examples rendered as plain code blocks with no demo above them.Each snippet moved to an
examples/*.tsxfile mounted through<Example>withclient:only="react"— the pattern every other page already uses. Markup, props and section order are unchanged; only theclassNameon the fence moved to the<Example className>prop (dropping thedocs-example m-0 border-0part, which<Example>already applies itself).Per page: footer 1, icon 3, form-control 8, checks-radios 17, gutters 6, columns 12, grid 13.
Verified with
npm run docs:buildplus a headless pass over the built site: every page renders the expected number of demo boxes, none of them empty, and no console errors.Same change lands in coreui-react-pro (the pages are byte-identical there, so the files were copied 1:1 to keep future upstream merges conflict-free).