-
Notifications
You must be signed in to change notification settings - Fork 46.2k
perf(frontend): Debounce scrollbar detection in DialogWrap #11647
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
base: dev
Are you sure you want to change the base?
Conversation
### Changes 🏗️ Chat should be disabled by default; otherwise, it flashes, and if Launch Darkly fails to fail, it is dangerous. ### Checklist 📋 #### For code changes: - [x] I have clearly listed my changes in the PR description - [x] I have made a test plan - [x] I have tested my changes according to the test plan: - [x] Run locally with Launch Darkly disabled and test the above
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Comment |
|
This PR targets the Automatically setting the base branch to |
|
Thank you for this performance improvement PR! The debounce implementation looks good and should effectively address the infinite layout shifting issue. However, there are a couple of things that need to be addressed before this can be merged:
Once these items are addressed, the PR will be ready for re-review. |
|
Thank you for this performance improvement to fix the infinite layout shift issue in DialogWrap! Before we can merge this PR, there are a few things that need to be addressed:
Please:
The technical approach to debouncing the scrollbar detection looks solid and should fix the issue effectively. The cleanup for the debounced function to prevent memory leaks is a good practice. |
|
This was made as a test to see if we could fix the "Maximum update depth exceeded." error but not 100% sure, need to test so keeping as draft for now |
Fixes BUILDER-5C1. The issue was that: Dialog's ResizeObserver triggers state update, changing
marginRight, causing layout shift, re-triggering observer infinitely.Changes 🏗️
debouncefromlodashto optimize performance.updatefunction) triggered byResizeObserverand window resize events inDialogWrap.This fix was generated by Seer in Sentry, triggered by Bently. 👁️ Run ID: 7764080
Not quite right? Click here to continue debugging with Seer.
Checklist 📃
For code changes:
Example test plan
For configuration changes:
.env.defaultis updated or already compatible with my changesdocker-compose.ymlis updated or already compatible with my changesExamples of configuration changes