Skip to content

Configure the global theme from Blazor - #564

Open
MayaKirova wants to merge 3 commits into
masterfrom
mkirova/config-theme
Open

MayaKirova wants to merge 3 commits into
masterfrom
mkirova/config-theme

Conversation

@MayaKirova

Copy link
Copy Markdown
Contributor

Description

Add ConfigureThemeAsync on IIgniteUIBlazor, backed by a new api.js
configureTheme export, and update the theming skill to pair it with
the stylesheet swap.

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

How Has This Been Tested?

  • Unit tests
  • Manual testing
  • Automated e2e tests

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

MayaKirova and others added 2 commits November 12, 2026 15:35
Add ConfigureThemeAsync on IIgniteUIBlazor, backed by a new api.js
configureTheme export, and update the theming skill to pair it with
the stylesheet swap. The theme state now loads at startup (~4 KB gzip).

Closes #562

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Let vite read the tsconfig paths (resolve.tsconfigPaths) instead of
repeating each deep import as an alias.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MayaKirova MayaKirova added the ❌ status: awaiting-test PRs awaiting manual verification label Nov 12, 2026
Copilot AI balanced review requested due to automatic review settings November 12, 2026 13:41

Copilot AI 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.

🟡 Changes recommended

The shared theming recipe directs full-product users to an unavailable api.js module and needs Lite-only labeling plus guidance to use IgbThemeProvider with a stylesheet swap.

1 open issue
What changed in this PR

Adds page-wide theme configuration to the Blazor library, addressing #562 by allowing runtime stylesheet swaps to update component structural styles too.

Changes:

  • Adds ConfigureThemeAsync and the JavaScript configureTheme export.
  • Adjusts bundling to preserve lazy component loading and adds API tests.
  • Updates theming guidance, adds a page-wide theme story, and documents the feature.
File Description
vite.config.mts Resolves direct theming imports and separates shared theme dependencies.
tsconfig.json Maps the direct web-components theme configuration import.
tests/​js/​static-web-assets.test.mjs Checks theme events, default variant, and lazy loading.
tests/​IgniteUI.Blazor.Tests/​ThemeConfigurationTests.cs Tests interop arguments, defaults, module reuse, and null handling.
stories/​Components/​Stories/​ThemeProvider.stories.razor Adds a page-wide structural theme-switching example.
src/​src/​api.ts Exports configureTheme and standalone theme types.
src/​componentsBase/​InteropModule.cs Defines the public API module path.
src/​componentsBase/​IgniteUIBlazorThemeExtensions.cs Adds the Blazor theme configuration extension.
skills/​igniteui-blazor-theming/​SKILL.md Clarifies structural styles versus stylesheet colors.
skills/​igniteui-blazor-theming/​references/​common-patterns.md Pairs runtime stylesheet swaps with theme configuration.
CHANGELOG.md Records the new page-wide theming APIs.

Review effort: Balanced

```

Register `IgbThemeProviderModule`. Providers nest — an inner one overrides the outer for its subtree.
A theme has two parts: the stylesheet (palette and other CSS variables) and the structural styles each component picks for the active theme and variant, read from the stylesheet once and then cached. A runtime switch changes both: swap the stylesheet, and tell the components — page-wide with `ConfigureThemeAsync`, or for a subtree with `IgbThemeProvider`. Swapping only the stylesheet gives the new colors on the old shapes; telling only the components gives the new shapes in the old colors.
Replace the optional variant with overloads, so the client applies its
own default, and complete the XML docs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

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

Labels

❌ status: awaiting-test PRs awaiting manual verification

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Configure the global theme from Blazor

3 participants