Gallery 3 catalog service#58
Conversation
Enables correct rendering of material icons inside the sandboxed preview iframe running the ng-basic-catalog app.
* Use `QueryParser.` instead of `this.` when calling static functions * Ensure returned config.json doesn't have "JSON hijacking" prefixes
Remove the showComponentsGallery signal to expose the components gallery link in the primary navigation sidebar. Adds test coverage checking link visibility using shell harnesses.
There was a problem hiding this comment.
Code Review
This pull request introduces a components gallery feature, including a CatalogSchemaResolver to parse component schemas, a GalleryCatalog service to manage gallery state and presets, and default presets for various components. It also enables the Components Gallery link by default in the sidebar, handles JSON safety prefixes in StartupResolution, and updates QueryParser to use static checks. The review feedback highlights potential prototype pollution vulnerabilities in CatalogSchemaResolver when using the in operator, recommending hasOwnProperty instead, and points out a bug in GalleryCatalog where a required id property could overwrite the root component's default "target" ID.
⚡ A2UI Composer PR PreviewYour automated preview is successfully live:
|
Adds CatalogSchemaResolver to recursively resolve allOf arrays and internal $defs schema references within catalog component definitions. Maps properties into clean type objects for tabular representation.
Adds GalleryCatalogService to maintain component selection and cache parsed schema properties. Groups components into sorted categories and maps selection to usage JSON payloads using mock presets.
9d1ef96 to
a1cfaf7
Compare
Description
implement gallery catalog state service and visual presets
Adds GalleryCatalogService to maintain component selection and cache parsed schema properties. Groups components into sorted categories and maps selection to usage JSON payloads using mock presets.
This is the 3rd in a series of PRs which culminates in a dynamically generated page to show the components of the current catalog:

Pre-launch Checklist