Repository navigation
feat(icon): register icons without an IgbIcon instance - #563
Open
MayaKirova wants to merge 3 commits into
Open
MayaKirova wants to merge 3 commits into
MayaKirova wants to merge 3 commits into
Conversation
Add RegisterIconAsync, RegisterIconFromTextAsync and SetIconRefAsync on IIgniteUIBlazor, backed by new api.js exports, and obsolete the IgbIcon and IgbIconButton instance methods. The icon registry now loads at startup (~25 KB gzip). Closes #561 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MayaKirova
requested review from
damyanpetev
and
a balanced review from Copilot
and removed request for
Copilot
November 12, 2026 12:58
Copilot stopped reviewing on behalf of
MayaKirova due to an error
November 12, 2026 12:59
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>
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
Browser validation is needed to verify that the eager registry/lit chunk graph shares registrations with subsequently loaded icons, since the added tests do not exercise that path.
No open issues 🎉
What changed in this PR
Addresses #561 by exposing the global icon registry through IIgniteUIBlazor extension methods and the public JavaScript API, removing the need for a hidden icon instance.
Changes:
- Adds asynchronous registration and alias methods while deprecating existing component instance methods.
- Adjusts bundling to load the icon registry at startup while keeping component bundles lazy.
- Adds interop tests and updates stories, usage guidance, and the changelog.
| File | Description |
|---|---|
vite.config.mts |
Adds path resolution and separate registry/Lit chunks. |
tsconfig.json |
Maps the direct icon registry import. |
tests/js/static-web-assets.test.mjs |
Checks registry exports and lazy component loading. |
tests/IgniteUI.Blazor.Tests/IconTests.cs |
Retains legacy method tests with obsolete warnings suppressed. |
tests/IgniteUI.Blazor.Tests/IconRegistryTests.cs |
Tests service interop arguments, import reuse, and null checks. |
tests/IgniteUI.Blazor.Tests/IconButtonTests.cs |
Retains legacy method tests with obsolete warnings suppressed. |
stories/wwwroot/icons/star.svg |
Supplies an icon for URL registration examples. |
stories/Components/Stories/Icon.stories.razor |
Demonstrates registration, metadata stripping, and aliases. |
stories/Components/Shared/IconRegistrar.razor |
Replaces the hidden icon with service-based registration. |
src/src/api.ts |
Exposes registry functions and standalone TypeScript types. |
src/componentsBase/InteropModule.cs |
Defines the public API module path. |
src/componentsBase/IgniteUIBlazorIconExtensions.cs |
Adds asynchronous service-based icon registry methods. |
src/components/Blazor/IconButton.cs |
Deprecates instance registration methods. |
src/components/Blazor/Icon.cs |
Deprecates instance registration and alias methods. |
skills/igniteui-blazor-components/references/data-display.md |
Documents service-based and direct JavaScript registration. |
CHANGELOG.md |
Records the new APIs and instance-method deprecations. |
Review effort: Balanced
Replace the optional collection with overloads, leave unset options members out of the call, and complete the XML docs. Assert the JSON sent to api.js and cover WebAssembly with trimming in the smoke app. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Description
Add RegisterIconAsync, RegisterIconFromTextAsync and SetIconRefAsync on IIgniteUIBlazor, backed by new api.js exports, and obsolete the IgbIcon and IgbIconButton instance methods. The icon registry now loads at startup (~25 KB gzip).
Type of Change (check all that apply):
How Has This Been Tested?
Checklist:
README.MDCHANGELOG.MDupdates for newly added functionalityCloses #561