Skip to content

Add optional row FLIP animation with spring/bezier config#1435

Open
dbdsgt wants to merge 1 commit into
juspay:devfrom
dbdsgt:con-branch
Open

Add optional row FLIP animation with spring/bezier config#1435
dbdsgt wants to merge 1 commit into
juspay:devfrom
dbdsgt:con-branch

Conversation

@dbdsgt
Copy link
Copy Markdown

@dbdsgt dbdsgt commented May 22, 2026

Summary

Add opt-in row animation (enableRowAnimation) using hook useRowFlip for automatic FLIP animations when rows are sorted, filtered, or shuffled. Supports spring and cubic-bezier transition types with configurable parameters. Respects prefers-reduced-motion via useReducedMotion hook. Reorder animation demo to place action toolbar below the bezier/spring configuration panel.

  • Implementation: Pure CSS transform-based FLIP via useRowFlip hook (no framer-motion layout dependency at runtime). Uses useLayoutEffect to capture positions before paint, then applies inverse transform + CSS transition.
  • Performance: Only the transform and opacity properties are animated (GPU-composited), avoiding layout recalculations. A cleanup timeout resets inline styles after animation completes.
  • Opt-in: enableRowAnimation defaults to false — no performance cost unless explicitly enabled.

New Exports

  • RowAnimationConfig type
  • enableRowAnimation / rowAnimationConfig props on DataTable
  • useReducedMotion hook (public)
  • useRowFlip hook (public)

Issue Ticket

Related to #1434

Add opt-in row animation (enableRowAnimation) using framer-motion layout
prop for automatic FLIP animations when rows are sorted, filtered, or
shuffled. Supports spring and cubic-bezier transition types with
configurable parameters. Respects prefers-reduced-motion via
useReducedMotion hook. Reorder animation demo to place action toolbar
below the bezier/spring configuration panel.
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 22, 2026

Open in StackBlitz

npm i https://pkg.pr.new/@juspay/blend-design-system@1435

commit: 6c9e8e5

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 22, 2026

Codecov Report

❌ Patch coverage is 87.17949% with 5 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (dev@df2db98). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...blend/lib/components/DataTable/TableBody/index.tsx 85.29% 5 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff           @@
##             dev    #1435   +/-   ##
======================================
  Coverage       ?   44.32%           
======================================
  Files          ?      415           
  Lines          ?    99656           
  Branches       ?     6800           
======================================
  Hits           ?    44175           
  Misses         ?    55481           
  Partials       ?        0           
Flag Coverage Δ
unittests 44.32% <87.17%> (?)

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 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.

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.

2 participants