-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(component): helper function observeResize to observe size change via global ResizeObserver #7241
Conversation
CatsJuice
commented
Jun 18, 2024
•
edited
Loading
edited
Your org has enabled the Graphite merge queue for merging into canaryAdd the label “merge” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix. You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link. |
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @CatsJuice and the rest of your teammates on Graphite |
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 98e3538. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution ✅ Successfully ran 6 targets
Sent with 💌 from NxCloud. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## canary #7241 +/- ##
==========================================
- Coverage 59.49% 59.47% -0.03%
==========================================
Files 847 848 +1
Lines 37922 37945 +23
Branches 3957 3964 +7
==========================================
+ Hits 22561 22567 +6
- Misses 15066 15083 +17
Partials 295 295
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! TIL it is better to use single instance of ResizeObserver
WICG/resize-observer#59
Merge activity
|
299f0dc
to
baf5e69
Compare
baf5e69
to
4738da5
Compare
… via global ResizeObserver (#7241) ```ts import { observeResize } from "@affine/component"; useEffect(() => { const dispose = observeResize(element entry => { console.log(entry.contentRect); }); return () => dispose(); }, []); ```
4738da5
to
98e3538
Compare