fix(picker): stop the dropdown resizing itself inside its own resize observer - #4295
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: Lundalogik/lime-elements/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthrough
ChangesPortal restyle scheduling
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to The deferred restyle lifecycle is mergeable with no concrete current-head risk identified. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Documentation has been published to https://lundalogik.github.io/lime-elements/versions/PR-4295/ |
…observer With `inheritParentWidth` the restyle writes the anchor's width onto the container the observer watches, so the first callback resizes it mid-delivery and the browser reports a ResizeObserver loop. Restyle on the next frame instead. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
7864271 to
b1e960e
Compare
|
🎉 This PR is included in version 40.5.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
A picker dropdown is laid out at its content's width first, then the portal's
ResizeObservercallback writes the anchor's width onto that same container — resizing an observed element from inside its own notification. The browser reportsResizeObserver loop completed with undelivered notifications, which the web client logs as an uncaught error and forwards to Sentry.Skipping writes that change nothing doesn't cover it: that first width is genuinely new, so there is nothing to skip. Restyling on the next frame keeps the write out of the delivery that asked for it.
Verified by serving this build into the web client in place of the CDN's 40.2.5 and driving a column filter's coworker picker: 1 error before, 0 after.
Fixes Lundalogik/crm-client#1269
Review:
Browsers tested:
macOS:
Summary by CodeRabbit