feat: components shell — sidebar, TOC, mobile nav, live razor:preview - #4
Merged
Conversation
…riants and styles
…preview app with structured layouts and content
… _Imports, App, and Routes for improved structure and routing
…ation, introduction, markdown syntax, theming, and components like Callout and Tabs
…project configuration, and launch settings for local development
…ocs preview app, enhancing user interface and navigation experience
…les for sidebar, package selector, and table of contents, enhancing layout and visual consistency
…ring Markdown with dynamic slots and previews, enhancing content display in ShellDocs preview app
… and navigation support for ShellDocs preview app
…and JavaScript enhancements for code highlighting and table of contents functionality
…n Markdown, adding language badges and copy functionality
… improved service registration for navigation and Markdown rendering
… functionality, enhancing test coverage and reliability
…abling consistent theming across ShellDocs and ShellUI, and document token contract for consumer integration
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
Ships the full Blazor-native docs chrome for Phase 1: sidebar, header, table of contents, prev/next nav, mobile drawer, and — the biggest win — a live
razor:previewblock that renders real Blazor components mid-markdown with a shadcn-style Preview/Code tab frame.What's in it
Sidebar (
DocsSidebar)Header (
DocsHeader)AddNavMenu("Documentation", ...))Table of Contents (
TableOfContents)border-lefton the list, coloured bar rides on top viatransform: translateY#foohrefsContent
MarkdownContent→ new<PreviewFrame>forrazor:previewblocks with Preview/Code tabs, copy button, per-element Prism highlight<Callout>registered viaRegisterComponent<T>()so preview blocks have something real to renderNav (
PrevNextNav)2-3pxon hoverMobile (
MobileNavState)OnChangeeventDocsLayout+DocsSidebar; hamburger inDocsHeaderMarketing pages (Preview app)
Content
callout.mdrewritten with 4 live preview examples covering all four variantscomponents/tabs.md— long-form page for TOC scroll testing (~15 h2 / 20 h3)Notes
razorgrammar; the preview code tab useslanguage-markup(Prism's HTML/XML), which colours tags/attrs/strings cleanly for razor snippets<ComponentPreview>with live prop editing is deferred to Phase 2 (feat/api-reference-primitives)feat/search-primitivesHomeLayout; docs useDocsLayout(unchanged in this branch — floating-sidebar refactor deferred tofeat/floating-sidebar-layout)Test plan
/docs/introduction,/docs/theming,/docs/components/callout,/docs/components/tabs— sidebar auto-opens the right section, active page is highlighted/docs/components/callout— click all 4 Preview/Code tabs, verify live render + syntax-coloured code + copy button flip/docs/components/tabs— scroll slowly, TOC thumb slides smoothly and keeps the active link on-screen