-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
fix: remove forced synchronous layout in Drawer #33665
Merged
spmonahan
merged 2 commits into
microsoft:master
from
spmonahan:fix/drawer-forced-recalc
Jan 22, 2025
Merged
fix: remove forced synchronous layout in Drawer #33665
spmonahan
merged 2 commits into
microsoft:master
from
spmonahan:fix/drawer-forced-recalc
Jan 22, 2025
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Drawer was forcing synchronous layout by reading scrollTop, scrollHeight and clientHeight in its getScrollState() function. This change defers the read with a requestAnimationFrame() so the browser can read the values from the previous frame, removing the forced synchronous layout.
spmonahan
force-pushed
the
fix/drawer-forced-recalc
branch
from
January 15, 2025 18:56
9975f60
to
23e9e1d
Compare
microsoft-github-policy-service
bot
added
the
Component: Drawer
The Fluent v9 Drawer component
label
Jan 15, 2025
📊 Bundle size report
Unchanged fixtures
|
Pull request demo site: URL |
fabricteam
reviewed
Jan 15, 2025
khmakoto
approved these changes
Jan 16, 2025
khmakoto
approved these changes
Jan 21, 2025
marcosmoura
approved these changes
Jan 22, 2025
marcosmoura
added a commit
that referenced
this pull request
Jan 23, 2025
…/chore--slot-API-react-v17/18-support * chore/react-18-support: (516 commits) update some deps to React 18 test(react-color-picker): Added cy and a11y tests for sliders (#33609) fix(react-charting): Centre align Gauge chart (#33710) fix(vr-tests): set a fixed value for culture prop in charts (#33690) release: applying package updates - react v8 feat(react-charting): Heatmap text color based on Contrast Ratio (#33659) test(color-picker): Added VR tests for ColorSlider and AlphaSlider (#33672) fix: remove forced synchronous layout in Drawer (#33665) feat(declarative-chart): Support for Dashed and Dotted lines (#33694) release: applying package updates - react-components feat: add vite sandbox template (#33631) ci: trigger VRT PR workflow only against testing branch (#33701) chore(deps-dev): bump vite from 6.0.7 to 6.0.9 (#33698) release: applying package updates - react v8 BaseFloatingPicker - Release references held by Async (#33685) feature(react-tag-picker): single line layout (#32247) feature(react-tree): introduces navigationMode property (#33658) bugfix: secondaryContent not displaying properly (#33689) release: applying package updates - react v8 fix(react-charting): resolve overlapping bars issue in histogram (#33695) ...
marcosmoura
added a commit
that referenced
this pull request
Jan 23, 2025
…/chore--slot-API-react-v17/18-support * chore/react-18-support: (516 commits) update some deps to React 18 test(react-color-picker): Added cy and a11y tests for sliders (#33609) fix(react-charting): Centre align Gauge chart (#33710) fix(vr-tests): set a fixed value for culture prop in charts (#33690) release: applying package updates - react v8 feat(react-charting): Heatmap text color based on Contrast Ratio (#33659) test(color-picker): Added VR tests for ColorSlider and AlphaSlider (#33672) fix: remove forced synchronous layout in Drawer (#33665) feat(declarative-chart): Support for Dashed and Dotted lines (#33694) release: applying package updates - react-components feat: add vite sandbox template (#33631) ci: trigger VRT PR workflow only against testing branch (#33701) chore(deps-dev): bump vite from 6.0.7 to 6.0.9 (#33698) release: applying package updates - react v8 BaseFloatingPicker - Release references held by Async (#33685) feature(react-tag-picker): single line layout (#32247) feature(react-tree): introduces navigationMode property (#33658) bugfix: secondaryContent not displaying properly (#33689) release: applying package updates - react v8 fix(react-charting): resolve overlapping bars issue in histogram (#33695) ...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Previous Behavior
Drawer was forcing synchronous layout by reading scrollTop, scrollHeight and clientHeight in its getScrollState() function.
This change defers the read with a
requestAnimationFrame()
so the browser can read the values from the previous frame, removing the forced synchronous layout.New Behavior
No forced synchronous layout
Related Issue(s)
useDrawerBody()
forces style recalculations #33655References
Before profile
After profile