angular / angular/components

feat(CdkObserveContent): Enable observing Resize using ResizeObserver

Aperta
#23,003 3 commenti 4 reazioni 0 assegnatari Vedi su GitHub
area: cdk/observers feature needs: discussion P3
Lingua principale
TypeScript
Stelle
25k
Fork
6.8k
Merge medio
1g 8h
PR unite (30g)
91

Descrizione

#### Feature Description

It would be great, if the current implementation of CdkObserveContent could be made more generic, so that it could be used for implementing other *Observer APIs.

#### Use Case

On my project, we need to observe the resizing of an element - ResizeObserver is great for this. But it's cumbersome to work with on it's own.

I've added some directives and services that basically just extend and wrap the current CdkObserveContent services and directives, which seems to work, but there's some typecasting and I/O handling that is not very pretty. It looks like it would be a fairly small effort to make the generic parts of the current implementation properly generic, which would make it a breeze to support other observer APIs.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia leggendo le direttive e i servizi CdkObserveContent attuali, quindi confronta la loro struttura con il caso d’uso di ResizeObserver descritto. Determina quali parti devono diventare generiche per supportare altre Observer APIs e verifica che il comportamento esistente di osservazione del contenuto rimanga invariato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
angular, typescript
Ambito
frontend
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.