refactor(ui5-table): resolve row selector/action components lazily via features - #14013
Open
aborjinik wants to merge 1 commit into
Open
refactor(ui5-table): resolve row selector/action components lazily via features#14013aborjinik wants to merge 1 commit into
aborjinik wants to merge 1 commit into
Conversation
aborjinik
temporarily deployed
to
netlify-preview
September 1, 2026 21:32 — with
GitHub Actions
Inactive
|
🚀 Deployed on https://pr-14013--ui5-webcomponents-preview.netlify.app |
aborjinik
force-pushed
the
refactor/table-row-lazy-deps
branch
from
September 2, 2026 05:58
0c4abf7 to
03cd11a
Compare
aborjinik
temporarily deployed
to
netlify-preview
September 2, 2026 05:58 — with
GitHub Actions
Inactive
…ly via features Move ownership of the concrete controls rendered inside table rows and header cells from the templates to the owning slotted feature, child element, or the header cell itself, so a plain table only pulls in the components it uses. Previously the row templates and the header-cell template statically imported concrete components (CheckBox, RadioButton, Button, Icon) plus their enum/icon modules. Because a component's `.ts` value-imports its template `.tsx`, and the template value-imported those components, importing TableRow / TableHeaderCell always dragged all of them into the bundle even for a read-only, unsorted table with no selection or row actions. Instead of hard-coding the components, the templates now ask the owning feature/element for the component class to render at render time: - TableSelection(Base/Single/Multi) expose getSelectionComponent(), getClearAllComponent() and getClearAllIcon(). Single returns RadioButton, Multi returns CheckBox plus the ClearAll Icon; the base returns undefined. - TableRowActionBase exposes overflowButtonComponent / overflowButtonIcon and owns the Button + overflow icon imports. - TableHeaderCell exposes _sortIconComponent / _sortIcon, returning the Icon class and sort-ascending/descending icon only while the column is sorted, so an unsorted table no longer bundles Icon or the sort icon modules. - TableRowBase/TableRow/TableHeaderRow surface these via _selectionComponent, _clearAllComponent, _overflowButtonComponent getters that delegate to the active feature/action. The templates render the resolved components (<SelectionComponent>, <ClearAllComponent>, <OverflowButton>, <SortIconComponent>), guarded so nothing renders when the feature/action/sort state is absent. Enum values are passed as string literals now that the concrete component owns its types. Net effect: CheckBox, RadioButton, Button, Icon and their icons are imported by the selection features, row actions and header cell rather than by the row, so a plain read-only table no longer bundles selection/action/sort controls.
aborjinik
force-pushed
the
refactor/table-row-lazy-deps
branch
from
September 2, 2026 07:48
03cd11a to
dbc6ab0
Compare
aborjinik
temporarily deployed
to
netlify-preview
September 2, 2026 07:48 — with
GitHub Actions
Inactive
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.
Move ownership of the concrete controls rendered inside table rows from the row templates to the slotted selection feature and the row action, so a row only pulls in the components it actually needs.
Previously the row templates imported CheckBox, RadioButton, Button and Icon directly. Because template modules are eagerly evaluated, every table dragged in all of these dependencies even when no selection or row actions were used.
Instead of hard-coding the components, the templates now ask the owning feature for the component class to render:
The templates render , and resolved at render time, guarded so nothing renders when the feature/action is absent. Enum values are passed as string literals ("Default", "Transparent", "Decorative") now that the concrete component owns its types.
Net effect: CheckBox, RadioButton, Button and the icons are imported by the selection features and row actions rather than the row, so a plain read-only table no longer bundles selection/action controls.