Skip to content

[Bugfix] Fix ScrollAnimation completing to nearest boundary on destroy#496

Merged
titouanmathis merged 2 commits intodevelopfrom
bugfix/444-scroll-animation-destroy
Jan 29, 2026
Merged

[Bugfix] Fix ScrollAnimation completing to nearest boundary on destroy#496
titouanmathis merged 2 commits intodevelopfrom
bugfix/444-scroll-animation-destroy

Conversation

@titouanmathis
Copy link
Contributor

@titouanmathis titouanmathis commented Jan 28, 2026

🔗 Linked issue

Fix: #444

❓ Type of change

  • 📖 Documentation (updates to the documentation, readme or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

Complete animation to 0 or 1 when component is destroyed mid-animation, preventing elements from being left in incomplete states during fast scrolling.

📝 Checklist

  • I have linked an issue or discussion.
  • I have added tests (if possible).
  • I have updated the documentation accordingly.
  • I have updated the changelog.

titouanmathis and others added 2 commits January 28, 2026 21:13
Complete animation to 0 or 1 when component is destroyed mid-animation,
preventing elements from being left in incomplete states during fast scrolling.

Fix: #444
Co-authored-by: Claude <claude@anthropic.com>
Co-authored-by: Claude <claude@anthropic.com>
@titouanmathis titouanmathis force-pushed the bugfix/444-scroll-animation-destroy branch from d8e1f86 to 70aa09d Compare January 28, 2026 20:14
@github-actions
Copy link

github-actions bot commented Jan 28, 2026

Export Size

@studiometa/ui

Name Size Diff
AbstractScrollAnimation 3.66 kB +103 B (+2.89%) 🔺
ScrollAnimationTarget 3.85 kB +103 B (+2.75%) 🔺
ScrollAnimation 3.79 kB +100 B (+2.71%) 🔺
ScrollAnimationTimeline 3.92 kB +103 B (+2.70%) 🔺
ScrollAnimationChild 3.91 kB +102 B (+2.68%) 🔺
ScrollAnimationParent 3.98 kB +101 B (+2.60%) 🔺
ScrollAnimationWithEase 4.39 kB +103 B (+2.41%) 🔺
ScrollAnimationChildWithEase 4.51 kB +103 B (+2.34%) 🔺
Unchanged

@studiometa/ui

Name Size Diff
AbstractFrameTrigger 1.74 kB -
AbstractPrefetch 366 B -
AbstractSliderChild 600 B -
Accordion 1.77 kB -
AccordionItem 1.75 kB -
Action 1.11 kB -
AnchorNav 3.85 kB -
AnchorNavLink 3.74 kB -
AnchorNavTarget 125 B -
AnchorScrollTo 2.53 kB -
animationScrollWithEase 763 B -
CircularMarquee 550 B -
Cursor 650 B -
DataBind 697 B -
DataComputed 856 B -
DataEffect 837 B -
DataModel 780 B -
Draggable 1.64 kB -
Fetch 2.34 kB -
Figure 1.72 kB -
FigureShopify 1.98 kB -
FigureTwicpics 2.26 kB -
FigureVideo 1.87 kB -
FigureVideoTwicpics 2.44 kB -
Frame 3.47 kB -
FrameAnchor 1.84 kB -
FrameForm 1.92 kB -
FrameLoader 1.45 kB -
FrameTarget 1.75 kB -
FrameTriggerLoader 1.46 kB -
Hoverable 953 B -
LargeText 713 B -
LazyInclude 322 B -
Menu 2.33 kB -
MenuBtn 140 B -
MenuList 1.9 kB -
Modal 1.99 kB -
ModalWithTransition 2.09 kB -
Panel 2.38 kB -
PrefetchWhenOver 408 B -
PrefetchWhenVisible 417 B -
ScrollReveal 1.63 kB -
Sentinel 129 B -
Slider 2.3 kB -
SliderBtn 817 B -
SliderCount 650 B -
SliderDots 1.86 kB -
SliderDrag 269 B -
SliderItem 998 B -
SliderProgress 961 B -
Sticky 771 B -
Tabs 1.38 kB -
Target 86 B -
Transition 1.41 kB -
withDeprecation 166 B -
withScrollAnimationDebug 2.04 kB -
withTransition 1.39 kB -

@codecov
Copy link

codecov bot commented Jan 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.16%. Comparing base (b30fa92) to head (70aa09d).
⚠️ Report is 3 commits behind head on develop.

Additional details and impacted files
@@              Coverage Diff              @@
##             develop     #496      +/-   ##
=============================================
+ Coverage      67.82%   68.16%   +0.34%     
  Complexity        20       20              
=============================================
  Files             77       77              
  Lines           1989     1998       +9     
  Branches         357      357              
=============================================
+ Hits            1349     1362      +13     
+ Misses           558      554       -4     
  Partials          82       82              
Flag Coverage Δ
unittests 68.16% <100.00%> (+0.34%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...ages/ui/ScrollAnimation/AbstractScrollAnimation.ts 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@titouanmathis titouanmathis merged commit 52f37b3 into develop Jan 29, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ScrollAnimation] Better handling of Component destruction to complete the animation

1 participant

Comments