• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

humanspeak / svelte-motion / 26126372335
68%
main: 3%

Build:
Build:
LAST BUILD BRANCH: fix/release-cleanup-always-run
DEFAULT BRANCH: main
Ran 19 May 2026 09:43PM UTC
Jobs 1
Files 221
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

19 May 2026 09:27PM UTC coverage: 68.465%. First build
26126372335

push

github

web-flow
feat(layout): add layoutScroll prop for FLIP inside scroll containers (+ nested ancestor support) (#352)

* feat(layout): add layoutScroll prop for FLIP inside scroll containers

Add framer-motion's `layoutScroll` prop. Mark a `motion.*` element as a
scroll container with `layoutScroll` so descendant `layout` animations
measure rects in that container's coordinate space. Without it,
scrolling the container mid-animation makes FLIP measurements read the
viewport-relative offset as movement and the animation visibly drifts.

```svelte
<motion.div layoutScroll style="overflow: auto; height: 320px;">
    <motion.div layout>resize me, then scroll the container</motion.div>
</motion.div>
```

Closes #313. Top of the layout-animation cluster; subsequent props
(LayoutGroup #311, layoutDependency #314, layoutRoot #315) will follow.

Implementation:
  - src/lib/types.ts: new `layoutScroll?: boolean` on `MotionProps`
  - src/lib/components/layoutScroll.context.ts (new): publish/consume
    a deferred element-ref via Svelte context. The thunk pattern is
    required because the parent's `element` ref binds after mount but
    descendants need to find it at measure-time
  - src/lib/utils/layout.ts: `measureRect` gains an optional
    `scrollContainer` arg; when provided, the returned rect is shifted
    into that container's scroll coordinate space (scrollTop/scrollLeft
    added to top/left). FLIP deltas computed across two such
    measurements stay zero when only scroll changes between them.
  - src/lib/html/_MotionContainer.svelte: capture ancestor's scroll-
    container ref at init (BEFORE shadowing the context with our own),
    thread the ancestor's element through all four measureRect call
    sites (own-layout, layoutId-snapshot, layoutId-FLIP-from)

Coverage:
  - src/lib/utils/layout.spec.ts: 3 new cases — ignores scrollContainer
    when absent; adds scrollTop/scrollLeft when present; zero delta
    when only scroll changes between two measurements
  -... (continued)

466 of 620 branches covered (75.16%)

Branch coverage included in aggregate %.

19 of 28 new or added lines in 3 files covered. (67.86%)

1768 of 2643 relevant lines covered (66.89%)

10.27 hits per line

Uncovered Changes

Lines Coverage ∆ File
8
60.47
src/lib/html/_MotionContainer.svelte
1
80.0
src/lib/components/layoutScroll.context.ts
Jobs
ID Job ID Ran Files Coverage
1 node-22 - 26126372335.1 19 May 2026 09:43PM UTC 221
68.46
GitHub Action Run
Source Files on build 26126372335
  • Tree
  • List 221
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #26126372335
  • 07c15c70 on github
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc