Skip to content

Fix km-tab label regression introduced by #8049#8059

Open
KhizerRehan wants to merge 1 commit intokubermatic:mainfrom
KhizerRehan:fix/tab-label-content-query
Open

Fix km-tab label regression introduced by #8049#8059
KhizerRehan wants to merge 1 commit intokubermatic:mainfrom
KhizerRehan:fix/tab-label-content-query

Conversation

@KhizerRehan
Copy link
Copy Markdown
Contributor

@KhizerRehan KhizerRehan commented May 7, 2026

What this PR does / why we need it:
This PR fixes the regression introduced by #8049 that broke the Clusters Overview page by causing the label-template content query to capture unrelated TemplateRef instances produced by structural directives inside the tab body (e.g. *matHeaderCellDef from mat-table).

image

Why It Broke

@ContentChild(TemplateRef) matches the first TemplateRef instance in projected content. Angular structural directives such as *matHeaderCellDef, *matCellDef, *matRowDef, *ngIf, etc. desugar to and produce TemplateRef instances.

Which issue(s) this PR fixes:

Fixes #

What type of PR is this?
/kind bug
/kind regression

Special notes for your reviewer:

Does this PR introduce a user-facing change? Then add your Release Note here:

NONE

Documentation:

NONE

Test issue:

NONE

@kubermatic-bot kubermatic-bot added kind/bug Categorizes issue or PR as related to a bug. release-note-none Denotes a PR that doesn't merit a release note. docs/none Denotes a PR that doesn't need documentation (changes). test-issue/none Denotes a PR that doesn't need a test issue (changes). kind/regression Categorizes issue or PR as related to a regression from a prior release. dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. labels May 7, 2026
@kubermatic-bot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign ahmadhamzh for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubermatic-bot kubermatic-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label May 7, 2026
@KhizerRehan KhizerRehan changed the title Add TabLabelDirective and update tab components to use it for label t… Fix km-tab label regression introduced by #8049 May 7, 2026
@KhizerRehan KhizerRehan requested a review from ahmadhamzh May 7, 2026 07:39
@KhizerRehan
Copy link
Copy Markdown
Contributor Author

I could have reverted #8049 PR but IMO, directive approach is still better as it would help incase Angular migrations run. There won't be issue due to duplicate names.

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

Labels

dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. docs/none Denotes a PR that doesn't need documentation (changes). kind/bug Categorizes issue or PR as related to a bug. kind/regression Categorizes issue or PR as related to a regression from a prior release. release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. test-issue/none Denotes a PR that doesn't need a test issue (changes).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants