Repository navigation
fix(animation): map ease-out and ease-in-out to the correct CSS bezie… - #7931
Conversation
…r curves Signed-off-by: Charan Rathore <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (4)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. WalkthroughThe named ChangesNamed easing curves
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~8 minutes Change: Bug fix · Severity of issue fixed: Low Merge Risk: ⚪ Minimal · up to The named easing curves now match the requested CSS mappings, and the corresponding tests cover them. No material merge risk was identified. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Bundle ReportBundle size has no change ✅ |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7931 +/- ##
=======================================
Coverage 88.97% 88.97%
=======================================
Files 647 647
Lines 15872 15872
Branches 4172 4169 -3
=======================================
Hits 14122 14122
Misses 1556 1556
Partials 194 194 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Test Results SummaryThis comment shows the latest test results for this pull request.
ℹ️ About Flakiness.io in GitHubYour team has set up Flakiness.io pull request comments. This comment is updated when
Flakiness.io rewrites the comment in place, so it always reflects the most recently tested commit. |
Description
src/animation/easing.tshad the two named CSS curves crossed:ease-outreturned[0.42, 0, 0.58, 1]andease-in-outreturned[0, 0, 0.58, 1]. This swaps the two control-point tuples so they match the CSS Easing spec (ease-out=cubic-bezier(0, 0, 0.58, 1),ease-in-out=cubic-bezier(0.42, 0, 0.58, 1)).Related Issue
Fixes #7930
Motivation and Context
Any animation prop set to
easing="ease-out"was actually running theease-in-outcurve, and the other way round. At 25% progressease-outshould produce ≈ 0.378; recharts produced ≈ 0.129.How Has This Been Tested?
test/animation/easing.spec.tsexpectations — the previous values pinned the swapped curves — and theJavascriptAnimateprogress spec (progress 0.7 now yields 0.87, was 0.81).test/animation/easing.named.spec.ts, which asserts each named curve matches its explicit bezier across several progress values.tscclean for both lib and tests, eslint clean.Screenshots (if appropriate):
Types of changes
Summary by CodeRabbit
ease-outandease-in-outanimation presets, changing how animations progress over time when these easing options are used. Animations using either preset may now feel different, with progress following the updated curve. Other easing options are unchanged.