Skip to content

Feat/blazor templates#198

Open
dkalinovInfra wants to merge 5 commits into
masterfrom
feat/blazor_templates
Open

Feat/blazor templates#198
dkalinovInfra wants to merge 5 commits into
masterfrom
feat/blazor_templates

Conversation

@dkalinovInfra
Copy link
Copy Markdown
Contributor

Description

Introduces IgniteUI.Blazor.Templates, a dotnet new template pack that scaffolds a ready-to-run Blazor Web App preconfigured with IgniteUI for Blazor (Lite + GridLite). The pack exposes the igb-blazor short name and supports parameterized hosting model (Server / Wasm / Auto), theme (bootstrap / material / fluent / indigo), color variant (light / dark), and an opt-in Weather demo page (IgbGridLite + ApexCharts). Generated projects target net10.0 and ship with the IgniteUI theme <link>s and app.bundle.js <script> already wired into Components/App.razor. Localized template strings are included for en, ja, and ko. The template lives under templates/IgniteUI.Blazor.Templates/ and packs as a standalone NuGet template package; no source in IgniteUI.Blazor.Lite.csproj is modified.

Motivation / Context

Consumers adopting IgniteUI for Blazor currently have to start from the stock Blazor Web App template and manually add the IgniteUI package reference, theme <link> tags, JS bundle <script>, and DI registration before they can use any component. This template pack removes that boilerplate: dotnet new igb-blazor -n MyApp (or the VS "New Project" dialog) produces a project that builds, runs, and renders IgniteUI components on first launch, including a working sample page that exercises IgbGridLite and a chart.

Type of Change (check all that apply):

  • Bug fix
  • New functionality
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactoring (no functional changes)
  • Documentation
  • Demos
  • CI/CD
  • Tests
  • Changelog

Component(s) / Area(s) Affected:

  • New: templates/IgniteUI.Blazor.Templates/ (template pack project, template.json, ide.host.json, localized strings, content tree)
  • New: templates/README.md (local pack/install/smoke-test loop documentation)
  • No changes to IgniteUI.Blazor.Lite library sources

How Has This Been Tested?

  • Unit tests
  • Manual testing
  • Automated e2e tests

Manual smoke loop per templates/README.md:

  1. dotnet pack the template project, then dotnet new install the produced nupkg.
  2. dotnet new igb-blazor -h lists the expected parameter surface (--Hosting, --Theme, --Variant, --IncludeWeatherSample, --SkipRestore).
  3. Generated each hosting model (Server, Wasm, Auto) into a fresh directory; verified the output layout (Server produces a single project, Wasm/Auto produce host + .Client + .sln from CLI, no .sln from VS) and that namespaces in Program.cs, _Imports.razor, Models/, Services/ are renamed to match -n.
  4. Built and ran the generated app; confirmed /, /counter, and /weather return 200; navbar/nav-drawer render; with --IncludeWeatherSample true the grid + chart render and the igc-* custom elements are present in the DOM.
  5. Verified theme/variant replacement by switching --Theme and --Variant and confirming the generated App.razor <link> URLs and chart light/dark mode match.
  6. Verified VS 2026 "New Project" path picks up the template (host bound to HostIdentifier) and omits the .sln so VS can create its own .slnx.
  7. Localized help spot-checked via DOTNET_CLI_UI_LANGUAGE=ja dotnet new igb-blazor -h.

Test Configuration:

  • .NET version: .NET 10 SDK (template targets net10.0)
  • Hosting model: Blazor Web App — verified Server, WebAssembly, and Auto
  • Browser(s): Edge, Chrome
  • OS: Windows 11

Screenshots / Recordings

N/A — no visual changes to the library itself. The generated sample app renders the stock IgniteUI navbar / nav-drawer / IgbGridLite chrome.

Checklist:

  • All relevant tags have been applied to this PR
  • This PR includes unit tests covering all the new code
  • This PR includes API docs for newly added methods/properties
  • This PR includes general feature table updates in the root README.MD
  • This PR includes CHANGELOG.MD updates for newly added functionality
  • This PR contains breaking changes
  • This PR includes behavioral changes and the feature specification has been updated with them
  • Accessibility (ARIA, keyboard navigation, focus management) has been verified

Closes #

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants