Skip to content

fix(loader-overlay)!: errors following a full review of the component (#DS-5482) - #1982

Draft
artembelik wants to merge 1 commit into
mainfrom
fix/loader-overlay-signals
Draft

fix(loader-overlay)!: errors following a full review of the component (#DS-5482)#1982
artembelik wants to merge 1 commit into
mainfrom
fix/loader-overlay-signals

Conversation

@artembelik

Copy link
Copy Markdown
Contributor

What

A full review of loader-overlay, in the same shape as the 20.3.0 component reviews.

text and caption lied about being required

@Input() text: string; // no initializer
@Input() caption: string;

The automated signal migration skipped both — it saw them read inside @if blocks and would not risk the narrowing. They are input<string>() now and report string | undefined, which is what they always held. Same pathology as KbqSplitButton.disabled in the first review wave: the call sites that were already wrong now fail to compile.

transparent was backwards as a valueless attribute

<kbq-loader-overlay transparent> passed the empty string, which is falsy, so the attribute rendered the filled background — the opposite of how it reads. With booleanAttribute it means true, and [transparent]="'false'" means false.

Closed internals

Everything the template uses to choose between a projected slot and an input is protected or private now: isEmpty, isExternalIndicator, isExternalText, isExternalCaption, spinnerSize, and the three content queries (which are signal queries as well). What the overlay renders is the contract, not how it decides.

The three getters became computed, so isEmpty now tracks a [text] that arrives later instead of relying on whoever happened to run change detection.

Migration

loader-overlay-signals runs from ng update @koobiq/components@20. It rewrites text and caption reads to calls — on receivers typed KbqLoaderOverlay and through template reference variables on <kbq-loader-overlay>, in external and inline templates — and reports the rest. size, transparent and card were already signals in 20.2.0 and are not touched.

Documented in docs/guides/migration.{en,ru}.md, section 18.

Testing

  • loader-overlay.component.spec.ts: 5 → 8 tests. The new ones pin the valueless transparent attribute, isEmpty reacting to a late [text], and the unbound inputs reporting undefined. The existing class snapshot is unchanged.
  • loader-overlay-signals/index.spec.ts: 13 tests — auto-fix, idempotence, receiver scoping, template refs, warnings, and the --fix=false path.
  • Full packages/components (4996 tests) and packages/schematics (447 tests) suites pass.
  • check-api is in sync.

No e2e screenshots were regenerated: every e2e case binds [transparent]="false" explicitly, so nothing it renders changed.

BREAKING CHANGE

🤖 Generated with Claude Code

`text` and `caption` were the two inputs the automated signal migration skipped —
it saw them read inside `@if` blocks and would not risk the narrowing. They are
`input()` now, and honest about being optional: both were declared `string` over
a field with no initializer, so an overlay that bound neither reported `undefined`
from a non-nullable type.

`transparent` gained `booleanAttribute`. `<kbq-loader-overlay transparent>` used
to pass the empty string, which is falsy, so the valueless attribute rendered the
filled background — the opposite of how it reads.

Everything the template uses to choose between a projected slot and an input —
`isEmpty`, `isExternalIndicator`, `isExternalText`, `isExternalCaption`,
`spinnerSize` and the three content queries — left the public surface. What the
overlay renders is the contract, not how it decides.

BREAKING CHANGE: `KbqLoaderOverlay.text` and `caption` are signal inputs reporting
`string | undefined`; `transparent` is a `booleanAttribute` input, so a valueless
attribute now means true; the template helpers and content queries are protected
or private. Reported and partly rewritten by the `loader-overlay-signals`
schematic.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions github-actions Bot added bug Something isn't working breaking changes labels Sep 2, 2026
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown

Visit the preview URL for this PR (updated for commit 47fd675):

https://koobiq-next--prs-1982-bsqilact.web.app

(expires Sat, 05 Sep 2026 15:05:29 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: c9e37e518febda70d0317d07e8ceb35ac43c534c

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

Labels

breaking changes bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant