-
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(react-utilities): avoid calling requestAnimationFrame when in SSR #29015
Merged
marcosmoura
merged 11 commits into
microsoft:master
from
marcosmoura:fix/useAnimationFrame-on-ssr
Aug 30, 2023
Merged
fix(react-utilities): avoid calling requestAnimationFrame when in SSR #29015
marcosmoura
merged 11 commits into
microsoft:master
from
marcosmoura:fix/useAnimationFrame-on-ssr
Aug 30, 2023
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
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 0b18813:
|
Perf Analysis (
|
Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
---|---|---|---|---|---|
Avatar | mount | 607 | 618 | 5000 | |
Button | mount | 299 | 310 | 5000 | |
Field | mount | 1083 | 1105 | 5000 | |
FluentProvider | mount | 692 | 684 | 5000 | |
FluentProviderWithTheme | mount | 78 | 89 | 10 | |
FluentProviderWithTheme | virtual-rerender | 59 | 63 | 10 | |
FluentProviderWithTheme | virtual-rerender-with-unmount | 78 | 76 | 10 | |
InfoButton | mount | 7 | 6 | 5000 | |
MakeStyles | mount | 856 | 869 | 50000 | |
Persona | mount | 1701 | 1702 | 5000 | |
SpinButton | mount | 1373 | 1338 | 5000 |
📊 Bundle size reportUnchanged fixtures
|
Asset size changesSize Auditor did not detect a change in bundle size for any component! Baseline commit: 6785ad731df26a388b8efda4e40d75931c6c3c13 (build) |
🕵 fluentuiv9 No visual regressions between this PR and main |
packages/react-components/react-utilities/src/hooks/useAnimationFrame.ts
Outdated
Show resolved
Hide resolved
marcosmoura
commented
Aug 30, 2023
packages/react-components/react-utilities/src/hooks/useAnimationFrame.ts
Outdated
Show resolved
Hide resolved
layershifter
approved these changes
Aug 30, 2023
tudorpopams
approved these changes
Aug 30, 2023
marcosmoura
added a commit
to marcosmoura/fluentui
that referenced
this pull request
Sep 3, 2023
* master: (32 commits) refactor(react-drawer): change DrawerHeaderTitle slot creation while keeping the same API (microsoft#29042) test(react-drawer): add render tests for drawer subcomponents (microsoft#29043) Grouped vertical bar chart - Component tests (microsoft#29031) docs: add Fluent UI Insights EP06 to README (microsoft#29051) chore: use swc-plugin-de-indent-template-literal for consoles (microsoft#29040) chore: adds swc-plugin-de-indent-template-literal (microsoft#29037) feat(react-jsx-runtime): v9 packages to use importSource (microsoft#28959) chore: update swc build dependencies (microsoft#28989) fix(react-tags-preview): add hover/pressed style for windows high contrast (microsoft#29035) chore(react-tags-preview): use InteractionTag for TagGroup's stories (microsoft#29024) chore(react-tags-preview): use makeResetStyles for base styles (microsoft#29022) chore: fix codesandbox export for preview component by making @fluentui/react-components required dependency (microsoft#29016) applying package updates feat(react-motion): create useReducedMotion and apply to useMotion to skip animations (microsoft#29014) ReAdd: Keytips: Align keytipData with visible instance for dupes (microsoft#28992) feat(react-drawer): add motion to Drawer (microsoft#28999) fix(react-utilities): avoid calling requestAnimationFrame when in SSR (microsoft#29015) fix(ssr-tests-v9): use correct path for ssr-tests-v9 stories (microsoft#29025) chore: updates devcontainer to use v16-bookworm image (microsoft#28997) feat(docsite): add Application Insights telemetry (microsoft#28709) ...
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.
Use simple timeout when in SSR environment. This is due to requestAnimationFrame not being available on the server. The setTimeout will be immediate in this case and will keep the code working async.