Feat/cat icon registry factory#976
Open
glushkova91 wants to merge 13 commits intomainfrom
Open
Conversation
added 8 commits
March 26, 2026 19:26
…the catalyst library
There was a problem hiding this comment.
Pull request overview
Adds an event-driven, scopeable icon resolution mechanism to cat-icon/CatIconRegistry (inspired by the Context Protocol proposal) to better support micro-frontend use cases and avoid cross-app icon registry conflicts.
Changes:
cat-iconnow dispatches acat-icon-requestevent to let an ancestor registry resolve SVGs, with a fallback to the global registry.CatIconRegistrygainscreateInstance()andattachTo()for isolated, subtree-scoped icon provisioning.- Tests/mocks updated and a new
CatIconRequestDetailtype exported from the package entrypoint.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| pnpm-lock.yaml | Adds new importer entries for Angular dist packages. |
| core/src/index.ts | Exports the new CatIconRequestDetail type. |
| core/src/components/cat-icon/cat-icon.tsx | Dispatches cat-icon-request and renders resolved SVG from provider/global fallback. |
| core/src/components/cat-icon/cat-icon.spec.tsx | Expands unit tests around event dispatch and icon resolution behavior. |
| core/src/components/cat-icon/cat-icon-request.ts | Introduces the event detail contract type and documentation. |
| core/src/components/cat-icon/cat-icon-registry.ts | Adds isolated registry creation and DOM-subtree attachment provider logic. |
| core/src/components/cat-icon/mocks/cat-icon-registry.ts | Extends Jest mock to cover the new registry APIs. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Agent-Logs-Url: https://github.com/haiilo/catalyst/sessions/d80ba7e9-14c0-4359-a1c5-72b2f8ea0faf Co-authored-by: glushkova91 <13402897+glushkova91@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…istener leaks Agent-Logs-Url: https://github.com/haiilo/catalyst/sessions/67b1e587-7be6-4ea6-87cc-af76ee4fa30d Co-authored-by: glushkova91 <13402897+glushkova91@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.
based on the Context Protocol proposal https://github.com/webcomponents-cg/community-protocols/blob/main/proposals/context.md