fix(templates,ci,docs): unblock chart/pie-chart/dashboard-02, fix preview pipeline, correct component count#13
Merged
Merged
Conversation
Updated the tooltip HTML structure in PieChart.razor, ChartVariantsTemplate.cs, and PieChartTemplate.cs to ensure proper rendering by fixing quotation marks. This change enhances the display of tooltips in the charts, improving user experience.
…late Updated the breadcrumb item label quotation in DashboardLayout02Template.cs to use proper syntax, ensuring consistent rendering of the home link in the dashboard layout.
Introduced a new test class, TemplateCompileTests, to ensure that the generated content of C# and Razor templates parses correctly. This addition helps catch potential syntax errors in templates, improving the reliability of the component library. Also, added Microsoft.CodeAnalysis.CSharp package for syntax tree parsing.
Added a new smoke test step in the CI workflow to validate the CLI scaffolding process, ensuring that generated projects function correctly. This includes packing the CLI project, installing it as a tool, and running a series of commands to verify the setup. Additionally, enabled automatic deployment of GitHub Pages in the preview workflow to streamline the publishing process.
…8 installable components This commit updates the README, versioning strategy, and various documentation files to accurately represent the current status of ShellUI, which now includes 68 installable components. Changes include adjustments to component counts, installation instructions, and examples throughout the documentation to ensure clarity for users. The version has been bumped to v0.3.0-alpha.3 to reflect these updates.
…for smoke tests Updated comments in the CI workflow to clarify the purpose of the smoke tests for CLI scaffolding. Additionally, explicitly added the Blazor-ApexCharts package to the smoke test setup to isolate and address specific bug classes related to template escapes, ensuring a more robust testing process.
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
Three things that needed to land together before tagging
0.3.0-alpha.4:0.3.0-alpha.1. Aftershellui add chart,pie-chart, ordashboard-02, consumer projects faildotnet buildimmediately. Root cause: incorrect quote escaping inside C# verbatim strings emitted by templateContentstrings.Get Pages site failed. HttpError: Not Found—actions/configure-pages@v4was failing because Pages isn't enabled on the repo and the action wasn't asked to enable it.SidebarTrigger,DialogContent, …) and variants (ButtonVariants, …) that auto-install as dependencies.Maps to Fixes 2, 9, 10 in shellui-fixes-for-lib.md plus the preview-pipeline failure and the count audit you requested.
Changes
Template escape bugs (Fixes 2, 9, 10)
src/ShellUI.Templates/Templates/ChartVariantsTemplate.cs— 16 JS-attribute quotes inside the tooltipCustom = @"..."block:""x""→""""x""""(so the generated.cscarries the proper""x""verbatim-string escape).src/ShellUI.Templates/Templates/PieChartTemplate.cs— was using\""x\""which decoded to\"x\"and produced both a compile error and visible backslashes in rendered HTML. Fixed to""""x"""".src/ShellUI.Templates/Templates/DashboardLayout02Template.cs:86— unterminated empty-string literal:segments[0] == ""))→segments[0] == """")).src/ShellUI.Components/Components/PieChart.razor— same backslash bug in the live library; NuGet consumers were seeingclass=\"custom-tooltip\"in rendered HTML.Regression guard
ShellUI.Tests/TemplateCompileTests.cs— RoslynCSharpSyntaxTree.ParseTextover each template's generatedContent. Pure-C# templates parse whole content; Razor templates extract@code { … }via a quote/comment-aware brace-balancing tokenizer. When extraction fails (unterminated string ate the closing brace) it falls back to a class-wrapped parse filtered to literal-related Roslyn diagnostic IDs (CS1010,CS1002,CS1003,CS1026,CS1513,CS1525,CS1056) so the failure points right at the offending line.ShellUI.Tests/ShellUI.Tests.csproj—Microsoft.CodeAnalysis.CSharp4.11.0..github/workflows/ci.yml— smoke-test step packs the CLI, installs it, runsdotnet new blazor→shellui init→shellui add chart pie-chart dashboard-02→dotnet buildas an end-to-end guard for anything the syntactic check misses.Preview-pages pipeline
.github/workflows/preview-pages.yml—actions/configure-pages@v4now passesenablement: trueso the action creates the Pages site on first run instead of erroring withHttpError: Not Found. Requirespages: writeonGITHUB_TOKEN, already set.Component count audit
Authoritative count from
ComponentRegistry(IsAvailable = true, top-level only): 68 installable = 17 Form + 12 Layout + 7 Navigation + 8 Overlay + 13 Data Display + 9 Feedback + 2 Utility. Updated every doc that claimed otherwise:README.md— main banner, status section, category breakdowns (was internally inconsistent: section header claimed 14 Form but listed 13),shellui listexample, comparison table, footer status line.docs/ARCHITECTURE.md— registry-stats line, category counts table.docs/COMPONENT_ROADMAP.md— status header, completed-list breakdown, timeline entry.docs/PROJECT_STATUS.md— version line, registry stats, category breakdowns, milestone targets.docs/CLI_SYNTAX.md,docs/QUICKSTART.md,docs/COMPARISON.md,docs/FAQ.md— inline "100" / "100+" references.VERSIONING_STRATEGY.md— current-release facts, single-source-of-truth list.src/ShellUI.CLI/README.md,src/ShellUI.Components/README.md,src/ShellUI.Templates/README.md— package-level claims.Intentionally left alone:
docs/RELEASE_NOTES.mdhistorical sections — frozen archive of what we said at the time of each release.docs/PROJECT_STATUS.mdfuture-state goals ("100+ components", "100+ community members") — aspirational, not current state.0 0% 100%— those are HSL lightness, not counts.Verification
dotnet test ShellUI.Tests— 15/15 passing.DashboardLayout02Template.cs:86(removed the fix only) → test red-bars withCS1010: Newline in constant at 26,76. Restoring the fix returns to green. Confirms the guard bites.grep -n '\b100\b' **/*.md— remaining hits are all intentional (CSS values, future-state goals, historical release notes).Test plan
dotnet new blazor, runshellui init+shellui add chart pie-chart dashboard-02, thendotnet build— expect 0 errors<PieChart>and confirm the hover tooltip's HTML no longer shows literal\"charactersshellui listcount matches the docs (68)