2.7 KiB
Widget Manifest Report
Scope
Sprint 8 introduced a generic widget manifest and data-source engine for the runtime homepage path. The implementation stays within the frozen architecture and does not change Product Domain, Category Domain, authentication, payment, or backend APIs.
The widget engine now resolves widget metadata, supported layouts, supported data sources, settings schema, and default settings from a manifest. Widgets receive only the section config and resolved data.
Implemented Changes
Widget Manifest
src/app/widgets/contracts/widget-manifest.contract.tssrc/app/widgets/registry/widget-manifest.service.tssrc/assets/mock/bootstrap/widget-manifest.json
Added widget metadata for:
- Hero
- Categories
- ProductCollection
- Banner
- Html
- Partners
- Footer
Each widget definition now exposes:
- supported layouts
- supported data sources
- settings schema
- default settings
Data Source Resolver
src/app/widgets/resolvers/data-source-resolver.service.ts
Added a generic resolver that delegates to the existing facades:
CategoryFacadefor root and parent category dataProductFacadefor featured, latest, category, manual, and related product data
Supported data source modes include:
- ProductCollection:
featured,latest,category,manual,related,future - Categories:
root,parent,manual,future
Widget Rendering
src/app/dynamic-renderer/widget-host/widget-host.service.tssrc/app/layouts/containers/dynamic-page-layout.component.tssrc/app/widgets/ui/hero-widget.component.tssrc/app/widgets/ui/categories-widget.component.tssrc/app/widgets/ui/product-carousel-widget.component.tssrc/app/widgets/ui/footer-navigation-widget.component.ts
Widgets now receive section config plus resolved data only. The layout resolves widgets asynchronously through the host service and renders the resolved component with those two inputs.
Homepage Bootstrap
src/assets/mock/bootstrap/bootstrap.jsonsrc/assets/mock/bootstrap/homepage.jsonsrc/app/pages/home/home.component.tssrc/app/pages/home/home.component.html
The homepage now resolves from the runtime section collection and includes:
- Hero
- Categories
- ProductCollection
Validation
Completed checks:
- Existing homepage still renders.
- ProductCollection works through the data-source resolver.
- Categories work through the data-source resolver.
- Widget metadata exists in the manifest.
- Data-source resolution is isolated from widget components.
- Build passes.
Build validation:
npm run build
Stop Point
Sprint 8 widget-manifest and data-source-engine work is complete. Stop here and wait for approval before extending the manifest system to more pages or adding new widget types.