angular / angular/components

feat(MatIconRegistry): reactive signatures

Ouverte
#29,437 3 commentaires 2 réactions 0 personnes assignées Voir sur GitHub
area: material/icon feature P4
Langage dominant
TypeScript
Étoiles
25k
Forks
6.8k
Merge moyen
1 j 8 h
PR mergées (30 j)
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

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez par les points d’entrée MatIconRegistry.addSvgIconSet et getNamedSvgIcon mentionnés dans l’issue, puis suivez le workflow existant de chargement des ensembles d’icônes. Le travail doit inclure un signal réactif clair indiquant la fin du chargement d’un ou plusieurs fichiers d’ensemble d’icônes, avec un comportement documenté ou couvert par les tests existants du registre.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
angular, typescript
Domaine
frontend
Type d'issue
Fonctionnalité
Difficulté
5/5
Temps estimé
Plus d'une semaine
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
25/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.