Repository navigation
refactor: expose the JS runtime on IIgniteUIBlazor - #554
Merged
Merged
Conversation
An IIgniteUIBlazor registered without AddIgniteUIBlazor gets a runtime of its own, with a one-time deprecation warning, until such registrations are dropped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The focused interface addition, compatibility bridge, and regression tests have no identified blocking issues.
No open issues 🎉
What changed in this PR
Exposes the JavaScript runtime through IIgniteUIBlazor so the full package can preload modules using the shared runtime infrastructure.
Changes:
- Adds an infrastructure-only
JsRuntimeaccessor, hidden from IntelliSense. - Adds a temporary compatibility bridge for the full package’s deprecated runtime while continuing to reject other implementations.
- Adds tests for runtime access, compatibility module loading, and unsupported registrations.
| File | Description |
|---|---|
tests/IgniteUI.Blazor.Tests/ServiceRegistrationTests.cs |
Tests the accessor and compatibility registration behavior. |
src/componentsBase/IIgniteUIBlazorRuntime.cs |
Adopts recognized legacy runtime instances through a weakly cached bridge. |
src/componentsBase/IgbComponentBase.cs |
Exposes IJSRuntime on the public service interface. |
Review effort: Balanced
dkamburov
approved these changes
Oct 22, 2026
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.
The full IgniteUI.Blazor package is moving onto this package's runtime:
AddIgniteUIBlazorregisters it, and the full package keeps its own runtime state alongside. What it needs from this package is the JS runtime.Apps preload modules by listing them in
AddIgniteUIBlazor. The runtime calls each listed module's staticRegister(IIgniteUIBlazor)as it is constructed, and that call is the only thing a full-package module receives. To request its client code it needs anIJSRuntime, which the emptyIIgniteUIBlazordid not carry. So its preloads had to wait for the first full-package component to bring one, or were never sent on pages without one.IIgniteUIBlazor.JsRuntimereturns the runtime'sIJSRuntime. It is[EditorBrowsable(Never)]: infrastructure for the full package, not app API. Nothing else on the runtime becomes public.Also, while the full package deprecates its own
IgniteUIBlazorclass, that class registered in place ofAddIgniteUIBlazorno longer makes the components throw: it gets a runtime of its own. It is recognized by type and assembly name, since that package depends on this one. Any otherIIgniteUIBlazorimplementation is still rejected. This bridge goes away with that class.Verification
HtmlRendererwith a stubIJSRuntime:AddIgniteUIBlazor, a preloaded full-package module is requested when the runtime is created, also on a page with only a Lite component.IgniteUIBlazoras the registered service, both a full-package chart and a Lite button render and request their modules.🤖 Generated with Claude Code