arch(sprint1): add unknown widget fallback diagnostics

This commit is contained in:
sdarbinyan
2026-07-03 02:11:07 +04:00
parent 6dfe1291ae
commit 6ea9932aa7
4 changed files with 94 additions and 4 deletions

View File

@@ -1,3 +1,4 @@
export * from './footer-navigation-widget.component';
export * from './hero-widget.component';
export * from './product-carousel-widget.component';
export * from './unknown-widget.component';

View File

@@ -0,0 +1,38 @@
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
@Component({
selector: 'app-unknown-widget',
standalone: true,
template: `
<section class="unknown-widget" role="status" aria-live="polite">
<strong>Widget unavailable</strong>
<p>{{ widgetType }}@{{ widgetVersion }}</p>
</section>
`,
styles: [
`
.unknown-widget {
border: 1px dashed var(--border-color, #d3dad9);
border-radius: var(--radius-md, 12px);
padding: 0.75rem;
color: var(--text-secondary, #667a77);
background: var(--background-secondary, #f5f5f5);
}
.unknown-widget strong {
display: block;
font-size: 0.9rem;
}
.unknown-widget p {
margin: 0.25rem 0 0;
font-size: 0.8rem;
}
`
],
changeDetection: ChangeDetectionStrategy.OnPush
})
export class UnknownWidgetComponent {
@Input() widgetType: string = 'unknown';
@Input() widgetVersion: string = 'unknown';
}