angular / angular/components

feat(MatIconRegistry): reactive signatures

Open
#29,437 3 comments 2 reactions 0 assignees View on GitHub
area: material/icon feature P4
Dominant language
TypeScript
Stars
25k
Forks
6.8k
Avg merge
1d 8h
Merged PRs (30d)
91

Description

### Feature Description

When I use MatIconRegistry, and I add an "iconSet" using "addSvgIconSet", I don't see any way of subscribing to what's internally doing: loading file -> generating an html/svg representation -> etc

And I don't know when all that computation has finished.

I'm using a little "hack" to subscribe to that workflow using:

`matIconRegistry.getNamedSvgIcon().subscribe(...)`

But that's kinda weak since I have to know the contents (what SVGs are included) in the iconSet.

I would like to have a robust API so that I can subscribe to that internal workflow and know when it has finished its calculations, something like:

`matIconRegistry.addSvgIconSet().subscribe(...)`

Even more interesting, allow this registry to load multiple files at once:

`matIconRegistry.addSvgIconSet([, ...]).subscribe(...)`

### Use Case

Synchronize APP Icons configuration at bootstrap.

Thanks

Contributor guide

Open the contributing guide

Research direction

Start with the MatIconRegistry.addSvgIconSet and getNamedSvgIcon entry points named in the issue, and trace the existing icon-set loading workflow. Done should include a clear reactive completion signal for loading one or more icon-set files, with behavior documented or covered by the registry's existing tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, typescript
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.