| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
…d initialize dark mode check in ThemeDesigner after first render
…r message formatting in SampleContainer
|
✅ All tests passed successfully Details on your Workflow / Core Tests page. |
Sorry, something went wrong.
Summary - Unit Tests Code CoverageSummary
CoverageMicrosoft.FluentUI.AspNetCore.Components - 98.9%
|
Sorry, something went wrong.
There was a problem hiding this comment.
This PR updates the FluentUI demo app to default to static (SSR) rendering and applies interactivity selectively (via @rendermode) to specific UI boundaries (header, navigation, providers/aside, and samples). This improves the demo’s suitability for external tooling by reducing always-interactive rendering.
Changes:
Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.
Show a summary per file| File | Description |
|---|---|
| examples/Tools/FluentUI.Demo.DocViewer/Components/SampleContainer.razor.cs | New wrapper component that resolves a sample component type from a serializable name inside an interactive boundary. |
| examples/Tools/FluentUI.Demo.DocViewer/Components/SampleContainer.razor | Renders the resolved type via DynamicComponent or a not-found message. |
| examples/Tools/FluentUI.Demo.DocViewer/Components/MarkdownViewer.razor.cs | Adds a parameter to pass a render mode through to sample rendering. |
| examples/Tools/FluentUI.Demo.DocViewer/Components/MarkdownViewer.razor | Replaces direct DynamicComponent rendering with SampleContainer and applies @rendermode per sample. |
| examples/Demo/FluentUI.Demo/Components/App.razor | Removes render mode from the whole Routes tree; applies render mode to HeadOutlet via DocViewer.DemoRenderMode. |
| examples/Demo/FluentUI.Demo.Client/Layout/DemoMainLayout.razor.cs | Removes header-related JS logic from the layout code-behind (now handled in DemoHeader). |
| examples/Demo/FluentUI.Demo.Client/Layout/DemoMainLayout.razor | Applies @rendermode to header/nav/aside/providers to keep the rest SSR by default. |
| examples/Demo/FluentUI.Demo.Client/Layout/DemoHeader.razor.cs | New interactive header component containing JS interop for theme/dir switching and external navigation. |
| examples/Demo/FluentUI.Demo.Client/Layout/DemoHeader.razor | New header markup extracted from the main layout. |
| examples/Demo/FluentUI.Demo.Client/DocViewer.razor | Passes a centralized demo render mode into MarkdownViewer and exposes the render mode for other components. |
| examples/Demo/FluentUI.Demo.Client/Documentation/General/Theme/Designer/ThemeDesigner.razor.cs | Defers system dark-mode detection to OnAfterRenderAsync(firstRender). |
Sorry, something went wrong.
| protected override void OnParametersSet() | ||
| { | ||
| _componentType = DocViewerService.ComponentsAssembly? | ||
| .GetTypes() | ||
| .Where(t => t.IsSubclassOf(typeof(ComponentBase)) && !t.IsAbstract) | ||
| .FirstOrDefault(i => i.Name == ComponentName); | ||
| } | ||
| } |
| } | ||
| else | ||
| { | ||
| <div class="component-not-found">⚠ The component {{ @ComponentName }} was not found.</div> |
| protected override async Task OnInitializedAsync() | ||
| { | ||
| _isDark = await ThemeService.IsSystemDarkAsync(); | ||
|
|
||
| } | ||
|
|
|
|
||
| @code | ||
| { | ||
| public static IComponentRenderMode DemoRenderMode = new InteractiveServerRenderMode(false); |
| Back | FazBrowse Home | New Git URL |
[dev-v5] Demo site - Implement static rendering
In order to provide documentation that is more easily usable by MCP servers and other external tools, we switche the demo application's default render mode from Interactive Server to Static (SSR), and apply interactivity selectively only where it is actually needed: the navigation, the header, the providers/aside, and all samples.
Previously the whole Routes tree was rendered with InteractiveServerRenderMode. Now the page is statically rendered by default, and @rendermode is applied per-component.
TODO