Skip to content

feat(templates): add item templates for Ignite UI Blazor components#226

Open
dkalinovInfra wants to merge 14 commits into
masterfrom
dkalinov/blazor_item_templates
Open

feat(templates): add item templates for Ignite UI Blazor components#226
dkalinovInfra wants to merge 14 commits into
masterfrom
dkalinov/blazor_item_templates

Conversation

@dkalinovInfra

@dkalinovInfra dkalinovInfra commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Description

Adds item templates for the individual Ignite UI for Blazor components to the IgniteUI.Blazor.Templates pack, which previously shipped only the igb-blazor project template. Users can now scaffold a ready-to-use component page either from the CLI (dotnet new <igb-component>) or from the Visual Studio Add New Item dialog.

  • Added templates/item/** with 43 component templates, each with its .template.config (template.json + ide.host.json + icon.png).
  • Each template generates a .razor page with @page routing, a scoped .razor.css, and inline IgniteUI.Blazor.Lite setup instructions in an @code comment (package install, AddIgniteUIBlazor(), _Imports, theme link, render mode).
  • In Visual Studio, templates appear under Add New Item → Ignite UI for Blazor\<Group> with per-component icons (via ide.host.json).

Supporting change: to host the item templates alongside the existing project template, the pack layout was reorganized — the project template moved from content/igb-blazor/** to templates/project/igb-blazor/** (pure file moves, no content changes), with IgniteUI.Blazor.Templates.csproj and the READMEs updated to the new templates/ content root.

Motivation / Context

The project template alone gets users a running app, but there is no first-class way to drop a working, conventionally-wired component sample into an existing page. These item templates give a fast, copy-paste-free starting point for each component — discoverable directly from the VS New Item UI (grouped under Ignite UI for Blazor\<Group>), not just the CLI — and the generated code follows the bridge/render-mode conventions of the Lite package.

Type of Change (check all that apply):

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

Component(s) / Area(s) Affected:

IgniteUI.Blazor.Templates — new item-template pack covering 43 components across all groups: Buttons & Actions, Inputs & Forms, Data (Grid), Charts (ApexCharts), Layout, Scheduling/Pickers, Navigation, Notifications, and Data Display. The existing igb-blazor project template is moved (no functional change).

How Has This Been Tested?

  • Unit tests
  • Manual testing
  • Automated e2e tests

Installed the pack from source (dotnet new install), scaffolded a Blazor Server app, then generated every item template into the app's Components/Pages and wired each into the nav. The project builds clean (0 warnings, 0 errors) and the pages render and behave correctly at runtime. Verified VS Add New Item grouping/icons via ide.host.json.

Test Configuration:

  • .NET version: .NET 10 SDK (templates multi-target net8.0/net9.0/net10.0)
  • Hosting model: Blazor Server
  • Browser(s): Chrome / Edge
  • OS: Windows 11

Screenshots / Recordings

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 #224

<h3>IgbAvatarComponent</h3>

<div class="component-host">
<IgbAvatar Initials="AZ" Shape="AvatarShape.Circle" />

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<h3>IgbBadgeComponent</h3>

<div class="component-host">
<IgbBadge Variant="StyleVariant.Success">5</IgbBadge>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Create badge variations in context, based on this example: https://igniteui.github.io/igniteui-webcomponents/?path=/story/badge--in-context

<h3>IgbButtonComponent</h3>

<div class="component-host">
<IgbButton Variant="ButtonVariant.Contained" @onclick="OnClick">@Label</IgbButton>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Create button and button size variations example similar to this one: https://www.infragistics.com/products/ignite-ui-angular/angular/components/button#size

- Updated IgbSwitchComponent styles for better layout and usability.
- Enhanced IgbTabsComponent with alignment and activation options, improved tab content descriptions, and added state display.
- Improved IgbTileManagerComponent with dynamic column count, resize and drag modes, and layout saving/restoring functionality.
- Refined IgbToastComponent to include position, display time, and options for keeping the toast open.
- Enhanced IgbToggleButtonComponent with selection modes and disabled state options.
- Improved IgbTooltipComponent with customizable placement, offset, and display options.
- Enhanced IgbTreeComponent with selection modes and improved state display.
- Added test scripts for smoke-testing the IgniteUI.Blazor.Templates package.
@MayaKirova MayaKirova self-requested a review June 26, 2026 13:38
<div class="actions">
<IgbButton Variant="ButtonVariant.Outlined" @onclick="Prev">Prev</IgbButton>
<IgbButton Variant="ButtonVariant.Outlined" @onclick="Next">Next</IgbButton>
<IgbButton Variant="ButtonVariant.Outlined" @onclick="Play">Play</IgbButton>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Play/Pause buttons don't seem to do anything.

@MayaKirova MayaKirova left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed that there's no template for TextArea. Not sure if we may want one for it.

…gallery

Replace the line/area/bar radio toggle with a 19-kind chart selector
  (Bubble, Candlestick, BoxPlot, RangeBar, RangeArea, Funnel, Mixed,
  circular types, etc.), each mapping to its appropriate series component.

  - Add ChartKind enum + IgbSelect dropdown driving series selection
  - Build a fresh ApexChartOptions per render to avoid mutation corruption
  - Bind Dark theme directly and fold theme handling into BuildOptions
  - Guard single-series kinds so only the first series is drawn
  - Refresh sample data to 2025/2026 and switch Value to int
  The prefix icon never rendered because the material signal_wifi_off glyph was never registered, and DismissCount stayed at 0 because the Closed event only fires from the banner's built-in action button, not the programmatic Hide/Toggle that the custom action buttons call.

  - Register the signal_wifi_off SVG on first render via the icon ref
  - Track open state in C# and increment DismissCount on every open->closed action (Dismiss/Retry/Hide/Toggle), since hide()/toggle() emit no events
  - Theme the banner parts (spacer/illustration/content) with surface tokens
  - Drop a stray comment from the avatar template CSS
MayaKirova
MayaKirova previously approved these changes Jun 30, 2026
@dkamburov

Copy link
Copy Markdown
Contributor

Calendar template is throwing an error when selecting a date
image

@dkamburov

Copy link
Copy Markdown
Contributor

One thing that's been on my mind: doesn't the number of templates feel a bit overwhelming?
image

I get that the goal is to showcase all the available samples, but from a user perspective, someone who just wants to explore our components would need to create each template separately. That doesn't seem like the best experience.

It might be worth considering a single template that includes all components—or at least the most commonly used ones—so users can quickly get a broad overview of the library before diving into more specialized templates.

@MayaKirova MayaKirova self-requested a review July 1, 2026 10:16
@dkamburov

Copy link
Copy Markdown
Contributor

Switching to small icons is not showing the names of the templates:

small-icons.mp4

@dkamburov dkamburov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Besides my previous comments, templates are working and behaving as expected

@kdinev

kdinev commented Jul 2, 2026

Copy link
Copy Markdown
Member

Switching to small icons is not showing the names of the templates:

small-icons.mp4

@dkalinovInfra Is this a VS-related issue, or something we need to address?

@dkalinovInfra

dkalinovInfra commented Jul 3, 2026 via email

Copy link
Copy Markdown
Contributor Author

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.

Add Ignite UI component item templates to the Blazor template pack

4 participants