fix(loader-overlay)!: errors following a full review of the component (#DS-5482) - #1982
Draft
artembelik wants to merge 1 commit into
Draft
fix(loader-overlay)!: errors following a full review of the component (#DS-5482)#1982artembelik wants to merge 1 commit into
artembelik wants to merge 1 commit into
Conversation
`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>
|
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 |
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.
What
A full review of
loader-overlay, in the same shape as the 20.3.0 component reviews.textandcaptionlied about being requiredThe automated signal migration skipped both — it saw them read inside
@ifblocks and would not risk the narrowing. They areinput<string>()now and reportstring | undefined, which is what they always held. Same pathology asKbqSplitButton.disabledin the first review wave: the call sites that were already wrong now fail to compile.transparentwas 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. WithbooleanAttributeit meanstrue, and[transparent]="'false'"meansfalse.Closed internals
Everything the template uses to choose between a projected slot and an input is
protectedorprivatenow: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, soisEmptynow tracks a[text]that arrives later instead of relying on whoever happened to run change detection.Migration
loader-overlay-signalsruns fromng update @koobiq/components@20. It rewritestextandcaptionreads to calls — on receivers typedKbqLoaderOverlayand through template reference variables on<kbq-loader-overlay>, in external and inline templates — and reports the rest.size,transparentandcardwere 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 valuelesstransparentattribute,isEmptyreacting to a late[text], and the unbound inputs reportingundefined. 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=falsepath.packages/components(4996 tests) andpackages/schematics(447 tests) suites pass.check-apiis 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