Skip to content

refactor(modules): retire the redundant child-component modules - #317

Merged
damyanpetev merged 6 commits into
masterfrom
dpetev/child-modules-cleanup
Aug 21, 2026
Merged

refactor(modules): retire the redundant child-component modules#317
damyanpetev merged 6 commits into
masterfrom
dpetev/child-modules-cleanup

Conversation

@damyanpetev

@damyanpetev damyanpetev commented Aug 6, 2026

Copy link
Copy Markdown
Member

Summary

Left out from #286
IgbCardActionsModule, IgbTreeItemModule, IgbStepModule and 19 more like them were public registration types for components that are never used on their own — they only ever appear inside a parent (IgbCard, IgbTree, IgbStepper, …) that already registers its own children. Those, plus three leftover base modules, that only ever served as code organizational units and were never meant to be user facing, all go [Obsolete].

Note: Radio should be the sole exception to this rule, since it can be standalone and in group.

Changes

  • 26 module types become obsolete no-ops
  • 23 cases deleted from Loader.ts (base classes were already removed)

Children load the parent module

A parent's register() registers every child element — verified across all 13 families:

// node_modules/igniteui-webcomponents/components/rating/rating.js
static register() {
  registerComponent(IgcRatingComponent, IgcIconComponent, IgcRatingSymbolComponent);
}

So the child only needs the parent's module, and asks for it the same way every other component does:

 protected override void EnsureModulesLoaded()
 {
-    if (!IgbRatingSymbolModule.IsLoadRequested(IgBlazor))
+    if (!IgbRatingModule.IsLoadRequested(IgBlazor))
     {
-        IgbRatingSymbolModule.Register(IgBlazor);
+        IgbRatingModule.Register(IgBlazor);
     }
 }

Note: This registration in normal use is likely redundant (RequestLoad caches), but is there for completeness and the e2e bulk automation that does init those on their own.

Parent description modules register their children

Element registration was only half of what a case did. The other half — Web<Child>DescriptionModule.register(cr.context) — registers the renderer's type description: the igc-* tag name and property marshalling table. That comes from src/src/ig/igniteui-core/, not from igniteui-webcomponents.

Seven of the thirteen families already did this (WebTreeDescriptionModule registers WebTreeItemDescriptionModule, etc.). The other six were moved to the same pattern:

 export class WebCardDescriptionModule extends Base {
 	static register(context: TypeDescriptionContext): void {
+		WebCardActionsDescriptionModule.register(context);
+		WebCardContentDescriptionModule.register(context);
+		WebCardHeaderDescriptionModule.register(context);
+		WebCardMediaDescriptionModule.register(context);
 		WebCardDescriptionMetadata.register(context);
 	}
 }

Touched: WebCard, WebCarousel, WebList, WebNavDrawer, WebRating, WebSlider, WebRangeSlider description modules. This is the load-bearing part of the PR — see Validation.

Validation

tests/IgniteUI.Blazor.Lite.IntegrationTests renders every BaseRendererControl subclass standalone in Chromium and asserts zero client errors — including each child outside its parent. That makes it the exact test for this change, and it caught a wrong first attempt: deleting the cases while relying on element registration alone failed 7 of 71.

There were errors : Property value mismatch after setting. Prop name: ColSpan.
Expected:1.0, but got the following on the client: ,

IgbSelectItem, IgbDropdownItem, IgbStep, IgbTreeItem, IgbTile and IgbToggleButton all rendered but could not take property values — the renderer had the element and no description for it. The description registrations above are what turn that green.

  • dotnet test tests/IgniteUI.Blazor.Lite.IntegrationTests71/71 passed
  • dotnet test tests/IgniteUI.Blazor.Tests — 902 passed / 21 skipped on net8.0, net9.0, net10.0
  • dotnet build IgniteUI.Blazor.Lite.slnx — 0 errors, no new warnings
  • npm run build — webpack bundle clean
  • grep — no "Web<Child>Module" string left in C# or TS, no reference to any of the 26 obsolete types outside its own file.

@damyanpetev damyanpetev added 📖 documentation Improvements or additions to documentation refactoring labels Aug 20, 2026
@damyanpetev damyanpetev changed the title refactor(modules): [WIP] retire the redundant child-component modules refactor(modules): retire the redundant child-component modules Aug 20, 2026
Copilot AI and others added 2 commits August 21, 2026 09:12
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: damyanpetev <3198469+damyanpetev@users.noreply.github.com>
* Initial plan

* Fix IgbTab EnsureModulesLoaded to register parent IgbTabsModule

Co-authored-by: damyanpetev <3198469+damyanpetev@users.noreply.github.com>

* Retire IgbTabModule, roll registration into parent IgbTabsModule

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: damyanpetev <3198469+damyanpetev@users.noreply.github.com>
@damyanpetev
damyanpetev marked this pull request as ready for review August 21, 2026 06:56
@damyanpetev
damyanpetev requested review from dkamburov and a lite review from Copilot August 21, 2026 06:56

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.

Pull request overview

This PR refactors Ignite UI for Blazor’s module-loading surface by retiring redundant child-component *Module registration types (now [Obsolete] no-ops) and removing their corresponding JS loader cases, relying instead on parent modules to register child elements and description metadata.

Changes:

  • Removed ~23 child-module cases from src/src/Loader.ts, keeping parent modules as the canonical load units.
  • Updated several Web*DescriptionModule implementations to register their child description modules to preserve property marshalling when children render standalone.
  • Updated child Blazor components’ EnsureModulesLoaded() to request the parent module instead of the retired child module, and marked retired module types as [Obsolete] no-ops.

Reviewed changes

Copilot reviewed 72 out of 72 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/src/Loader.ts Removes loader switch cases for retired child modules.
src/src/ig/igniteui-core/WebSliderDescriptionModule.ts Registers slider-label description from the parent slider description module.
src/src/ig/igniteui-core/WebRatingDescriptionModule.ts Registers rating-symbol description from the parent rating description module.
src/src/ig/igniteui-core/WebRangeSliderDescriptionModule.ts Registers slider-label description from the parent range-slider description module.
src/src/ig/igniteui-core/WebNavDrawerDescriptionModule.ts Registers nav-drawer item/header-item descriptions from the parent nav-drawer description module.
src/src/ig/igniteui-core/WebListDescriptionModule.ts Registers list header/item descriptions from the parent list description module.
src/src/ig/igniteui-core/WebCarouselDescriptionModule.ts Registers carousel indicator/slide descriptions from the parent carousel description module.
src/src/ig/igniteui-core/WebCardDescriptionModule.ts Registers card child descriptions from the parent card description module.
src/components/Blazor/TreeModule.cs Stops marking the retired tree-item module as “load requested”.
src/components/Blazor/TreeItemModule.cs Obsoletes the tree-item module and turns it into a no-op.
src/components/Blazor/TreeItem.cs Loads the parent tree module instead of the retired tree-item module.
src/components/Blazor/ToggleButtonModule.cs Obsoletes the toggle-button module and turns it into a no-op.
src/components/Blazor/ToggleButton.cs Loads the parent button-group module instead of the retired toggle-button module.
src/components/Blazor/TileModule.cs Obsoletes the tile module and turns it into a no-op.
src/components/Blazor/TileManagerModule.cs Stops marking the retired tile module as “load requested”.
src/components/Blazor/Tile.cs Loads the parent tile-manager module instead of the retired tile module.
src/components/Blazor/TabsModule.cs Stops marking the retired tab module as “load requested”.
src/components/Blazor/TabModule.cs Obsoletes the tab module and turns it into a no-op.
src/components/Blazor/Tab.cs Loads the parent tabs module instead of the retired tab module.
src/components/Blazor/SwitchModule.cs Stops marking the retired checkbox-base module as “load requested”.
src/components/Blazor/StepperModule.cs Stops marking the retired step module as “load requested”.
src/components/Blazor/StepModule.cs Obsoletes the step module and turns it into a no-op.
src/components/Blazor/Step.cs Loads the parent stepper module instead of the retired step module.
src/components/Blazor/SliderModule.cs Stops marking the retired slider-base module as “load requested”.
src/components/Blazor/SliderLabelModule.cs Obsoletes the slider-label module and turns it into a no-op.
src/components/Blazor/SliderLabel.cs Loads range-slider or slider module (fallback) instead of the retired slider-label module.
src/components/Blazor/SliderBaseModule.cs Obsoletes the slider-base module and turns it into a no-op.
src/components/Blazor/SliderBase.cs Removes module-loading override tied to the retired slider-base module.
src/components/Blazor/SelectModule.cs Stops marking retired select child modules as “load requested”.
src/components/Blazor/SelectItemModule.cs Obsoletes the select-item module and turns it into a no-op.
src/components/Blazor/SelectItem.cs Loads the parent select module instead of the retired select-item module.
src/components/Blazor/SelectHeaderModule.cs Obsoletes the select-header module and turns it into a no-op.
src/components/Blazor/SelectHeader.cs Loads the parent select module instead of the retired select-header module.
src/components/Blazor/SelectGroupModule.cs Obsoletes the select-group module and turns it into a no-op.
src/components/Blazor/SelectGroup.cs Loads the parent select module instead of the retired select-group module.
src/components/Blazor/RatingSymbolModule.cs Obsoletes the rating-symbol module and turns it into a no-op.
src/components/Blazor/RatingSymbol.cs Loads the parent rating module instead of the retired rating-symbol module.
src/components/Blazor/RangeSliderModule.cs Stops marking the retired slider-base module as “load requested”.
src/components/Blazor/NavDrawerItemModule.cs Obsoletes the nav-drawer item module and turns it into a no-op.
src/components/Blazor/NavDrawerItem.cs Loads the parent nav-drawer module instead of the retired nav-drawer item module.
src/components/Blazor/NavDrawerHeaderItemModule.cs Obsoletes the nav-drawer header-item module and turns it into a no-op.
src/components/Blazor/NavDrawerHeaderItem.cs Loads the parent nav-drawer module instead of the retired nav-drawer header-item module.
src/components/Blazor/ListItemModule.cs Obsoletes the list-item module and turns it into a no-op.
src/components/Blazor/ListItem.cs Loads the parent list module instead of the retired list-item module.
src/components/Blazor/ListHeaderModule.cs Obsoletes the list-header module and turns it into a no-op.
src/components/Blazor/ListHeader.cs Loads the parent list module instead of the retired list-header module.
src/components/Blazor/DropdownModule.cs Stops marking retired dropdown child modules as “load requested”.
src/components/Blazor/DropdownItemModule.cs Obsoletes the dropdown-item module and turns it into a no-op.
src/components/Blazor/DropdownItem.cs Loads the parent dropdown module instead of the retired dropdown-item module.
src/components/Blazor/DropdownHeaderModule.cs Obsoletes the dropdown-header module and turns it into a no-op.
src/components/Blazor/DropdownHeader.cs Loads the parent dropdown module instead of the retired dropdown-header module.
src/components/Blazor/DropdownGroupModule.cs Obsoletes the dropdown-group module and turns it into a no-op.
src/components/Blazor/DropdownGroup.cs Loads the parent dropdown module instead of the retired dropdown-group module.
src/components/Blazor/CheckboxModule.cs Stops marking the retired checkbox-base module as “load requested”.
src/components/Blazor/CheckboxBaseModule.cs Obsoletes the checkbox-base module and turns it into a no-op.
src/components/Blazor/CheckboxBase.cs Removes module-loading override tied to the retired checkbox-base module.
src/components/Blazor/CarouselSlideModule.cs Obsoletes the carousel-slide module and turns it into a no-op.
src/components/Blazor/CarouselSlide.cs Loads the parent carousel module instead of the retired carousel-slide module.
src/components/Blazor/CarouselIndicatorModule.cs Obsoletes the carousel-indicator module and turns it into a no-op.
src/components/Blazor/CarouselIndicator.cs Loads the parent carousel module instead of the retired carousel-indicator module.
src/components/Blazor/CardMediaModule.cs Obsoletes the card-media module and turns it into a no-op.
src/components/Blazor/CardMedia.cs Loads the parent card module instead of the retired card-media module.
src/components/Blazor/CardHeaderModule.cs Obsoletes the card-header module and turns it into a no-op.
src/components/Blazor/CardHeader.cs Loads the parent card module instead of the retired card-header module.
src/components/Blazor/CardContentModule.cs Obsoletes the card-content module and turns it into a no-op.
src/components/Blazor/CardContent.cs Loads the parent card module instead of the retired card-content module.
src/components/Blazor/CardActionsModule.cs Obsoletes the card-actions module and turns it into a no-op.
src/components/Blazor/CardActions.cs Loads the parent card module instead of the retired card-actions module.
src/components/Blazor/CalendarModule.cs Stops marking the retired calendar-base module as “load requested”.
src/components/Blazor/CalendarBaseModule.cs Obsoletes the calendar-base module and turns it into a no-op.
src/components/Blazor/CalendarBase.cs Removes module-loading override tied to the retired calendar-base module.
src/components/Blazor/ButtonGroupModule.cs Stops marking the retired toggle-button module as “load requested”.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/src/Loader.ts
Comment on lines 765 to 767
case 'WebTreeModule': {
let { IgcTreeComponent } = await import('igniteui-webcomponents');
let { WebTreeDescriptionModule } = await import('igniteui-core/WebTreeDescriptionModule');
@damyanpetev damyanpetev added the squash-merge Merge PR with "Squash and Merge" option label Aug 21, 2026
@damyanpetev
damyanpetev enabled auto-merge (squash) August 21, 2026 08:10
@damyanpetev
damyanpetev merged commit bb0f672 into master Aug 21, 2026
7 checks passed
@damyanpetev
damyanpetev deleted the dpetev/child-modules-cleanup branch August 21, 2026 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📖 documentation Improvements or additions to documentation refactoring squash-merge Merge PR with "Squash and Merge" option

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants