feat(CdkObserveContent): Enable observing Resize using ResizeObserver
- Ngôn ngữ chính
- TypeScript
- Star
- 25k
- Fork
- 6.8k
- Merge trung bình
- 1 ngày 8 giờ
- Pull request đã merge (30 ngày)
- 91
Mô tả
#### 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.
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu bằng cách đọc các directive và service CdkObserveContent hiện tại, sau đó so sánh cấu trúc của chúng với use case ResizeObserver được mô tả. Xác định những phần nào cần trở nên generic để có thể hỗ trợ các Observer APIs khác, đồng thời xác minh rằng hành vi quan sát nội dung hiện có vẫn được giữ nguyên.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- angular, typescript
- Lĩnh vực
- frontend
- Loại issue
- Tính năng
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100