-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ToggleGroupControl: improve animation (#65175)
* Refactor utils and switch Tabs indicator animation to `transform`. * docs tweak * Update packages/components/src/tabs/styles.ts Co-authored-by: Marco Ciampini <marco.ciampo@gmail.com> * Add RTL support. * Addressed @ciampo's comments. * Correct for antialiasing rounding. * Make antialiasing adjustment optional. * Use larger base value and revert antialiasing adjustment code. * DRY RTL * Remove RTL story (redundant since Storybook has a dynamic setting to test RTL). * Fix bug. * Fix bug (for real this time). * Add changelog entry. * De-cleverfy code. * Sync useResizeObserver with #64943 and make useTrackElementOffsetRect resilient. * Deduplicate utility and clean up. * Minor Tabs code improvement. * Replace framer motion animation with faster CSS animation. * DRY antialiasing factor. * Changelogs. * Various improvements, fixes, and feedback addressed. * Simplify. * Simplify using derived state. * Add similar useOnValueUpdate detail to Tabs. * Fix skipping animation. * Add similar detail to Tabs animation. * Fix setState depth issue. * Fix unit test error. * Add changelog entries * Fix changelog * Update test snapshot. * Depends less on React. * Switch to layout effect for `useOnValueUpdate` * Switched to transform strategy. * Fix resizing bug. * Transition border-radius too. * Undo Tabs changes (no longer relevant). * DRY animation code. * Avoid useless re-runs in effect. * Rename `activeElement` -> `selectedElement` for clarity. * Rename `--indicator-` -> `--selected-` for accuracy. * Minor tweak. * Add safe defaults to CSS custom properties. * Tweak `useSubelementAnimation`. * Fix parent missing when there's no selected option. * Update snapshots * Add docs to utility. * Added note about border-radius. --------- Co-authored-by: Marco Ciampini <marco.ciampo@gmail.com> Co-authored-by: DaniGuardiola <daniguardiola@git.wordpress.org> Co-authored-by: ciampo <mciampini@git.wordpress.org> Co-authored-by: tyxla <tyxla@git.wordpress.org> Co-authored-by: mirka <0mirka00@git.wordpress.org>
- Loading branch information
1 parent
5b6b849
commit dbd79a7
Showing
11 changed files
with
395 additions
and
114 deletions.
There are no files selected for viewing
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 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
Oops, something went wrong.