feat(react-utilities): create useAnimationFrame hook#28948
Merged
marcosmoura merged 4 commits intoAug 23, 2023
Conversation
Collaborator
Perf Analysis (
|
| Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
|---|---|---|---|---|---|
| FluentProviderWithTheme | virtual-rerender-with-unmount | 80 | 76 | 10 | Possible regression |
All results
| Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
|---|---|---|---|---|---|
| Avatar | mount | 598 | 621 | 5000 | |
| Button | mount | 308 | 308 | 5000 | |
| Field | mount | 1126 | 1112 | 5000 | |
| FluentProvider | mount | 688 | 684 | 5000 | |
| FluentProviderWithTheme | mount | 81 | 78 | 10 | |
| FluentProviderWithTheme | virtual-rerender | 71 | 72 | 10 | |
| FluentProviderWithTheme | virtual-rerender-with-unmount | 80 | 76 | 10 | Possible regression |
| InfoButton | mount | 13 | 12 | 5000 | |
| MakeStyles | mount | 871 | 839 | 50000 | |
| Persona | mount | 1721 | 1689 | 5000 | |
| SpinButton | mount | 1379 | 1361 | 5000 |
|
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 80eac6c:
|
Collaborator
📊 Bundle size reportUnchanged fixtures
|
Asset size changesSize Auditor did not detect a change in bundle size for any component! Baseline commit: 1fdfe8d9ac8f83790d1d49c123e1eab52b7b2fd9 (build) |
Collaborator
🕵 fluentuiv9 No visual regressions between this PR and main |
marcosmoura
enabled auto-merge (squash)
August 22, 2023 15:24
bsunderhus
approved these changes
Aug 23, 2023
marcosmoura
added a commit
to marcosmoura/fluentui
that referenced
this pull request
Aug 23, 2023
* master: chore: update CODEOWNERS to some components to tag the current owner (microsoft#28949) fix(react-popover): Only apply modal attributes if the PopoverSurface traps focus (microsoft#28613) feat(react-table, react-components): export DataGridContextProvider (microsoft#28955) chore: decrease bundle size & adds fixtures (microsoft#28962) feat(react-utilities): create useAnimationFrame hook (microsoft#28948) fix(react-utilities): `useOnClickOutside` should consider text selection from inside to outside as inside click (microsoft#28765) docs(react-accordion): Added subcomponents to index story (microsoft#28956) applying package updates bugfix: ensure interop between assertSlots and old API (microsoft#28957) chore: rename imports from react-tree to react-components (microsoft#28946) applying package updates fix: Autofill queries the inputElement ownerDocument instead of document (microsoft#27312)
marcosmoura
added a commit
to marcosmoura/fluentui
that referenced
this pull request
Aug 23, 2023
* master: (27 commits) feat: Add documentKeyboardEvent to OnVisibleChangeData when Tooltip is hidden via Escape (microsoft#28951) RFC: Component CSS Transitions/Animations on mount/unmount (microsoft#27328) 8.0 Azure Theme: Details list row focus contrast a11y bug fix (microsoft#28966) chore: update CODEOWNERS to some components to tag the current owner (microsoft#28949) fix(react-popover): Only apply modal attributes if the PopoverSurface traps focus (microsoft#28613) feat(react-table, react-components): export DataGridContextProvider (microsoft#28955) chore: decrease bundle size & adds fixtures (microsoft#28962) feat(react-utilities): create useAnimationFrame hook (microsoft#28948) fix(react-utilities): `useOnClickOutside` should consider text selection from inside to outside as inside click (microsoft#28765) docs(react-accordion): Added subcomponents to index story (microsoft#28956) applying package updates bugfix: ensure interop between assertSlots and old API (microsoft#28957) chore: rename imports from react-tree to react-components (microsoft#28946) applying package updates fix: Autofill queries the inputElement ownerDocument instead of document (microsoft#27312) Accordion : updated styles for accordion header cursor (microsoft#28850) Additional VR tests Charting Library (microsoft#28777) feat(react-motion): create react-motion-preview package scaffolding (microsoft#28947) chore: updates generator to use new slot API (microsoft#28916) chore: bumps version of esbuild-loader to v3.2.0 (microsoft#28878) ...
marcosmoura
added a commit
to marcosmoura/fluentui
that referenced
this pull request
Aug 25, 2023
…e-motion * feat/use-motion-presence-hook: (25 commits) fix: revert changes to CODEOWNERS fix: remove duplicated code due to a merge conflict fix: upgrade tests fix: set motion as active when animations are disabled fix: remove debug function feat: refactor useMotion to a much more clean/performant logic fix: use correct type for MotionOptions fix: improve typings and documentation feat: Add documentKeyboardEvent to OnVisibleChangeData when Tooltip is hidden via Escape (microsoft#28951) fix: use correct boolean values RFC: Component CSS Transitions/Animations on mount/unmount (microsoft#27328) 8.0 Azure Theme: Details list row focus contrast a11y bug fix (microsoft#28966) fix: remove outdated changefile chore: update CODEOWNERS to some components to tag the current owner (microsoft#28949) fix(react-popover): Only apply modal attributes if the PopoverSurface traps focus (microsoft#28613) feat(react-table, react-components): export DataGridContextProvider (microsoft#28955) chore: decrease bundle size & adds fixtures (microsoft#28962) feat(react-utilities): create useAnimationFrame hook (microsoft#28948) fix(react-utilities): `useOnClickOutside` should consider text selection from inside to outside as inside click (microsoft#28765) docs(react-accordion): Added subcomponents to index story (microsoft#28956) ...
This file contains hidden or 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
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.

Create a new useAnimationHook. This hook is a helper to manage a browser requestAnimationFrame. It ensures that the requestAnimationFrame isn't set multiple times at once and is cleaned up when the component is unloaded.
As this new Hook share almost the same implementation of the useTimeout, I created a third hook to control browser timers (such as setTimeout, requestAnimationFrame, setInterval)