Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 0 additions & 33 deletions .changeset/fix-enter-anim-detached-element.md

This file was deleted.

8 changes: 8 additions & 0 deletions apps/docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# docs

## 0.0.27

### Patch Changes

- Updated dependencies [ec2ad34]
- @effex/dom@1.4.4
- @effex/router@1.3.4

## 0.0.26

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "docs",
"version": "0.0.26",
"version": "0.0.27",
"private": true,
"type": "module",
"scripts": {
Expand Down
34 changes: 34 additions & 0 deletions packages/dom/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,39 @@
# @effex/dom

## 1.4.4

### Patch Changes

- ec2ad34: Fix enter animations firing against a detached element on nested
client-mode re-mounts (e.g. router nav-back on pages with animations
deep inside the route's tree).

`forkSlotEnter` forks the animation fiber via `Effect.forkIn(slotScope)`
from inside `addSlot`. Effect's scheduler can hand that fiber control
on the next microtask, before the outer synchronous render flow has
finished appending the wrapper's ancestor chain into the document.
When that happens, `onBeforeEnter` fires against a node whose ancestors
aren't yet in the DOM — `getComputedStyle` returns empty strings on
disconnected nodes, and browsers won't compute or transition styles
against them, so the enter transition never fires and the animation
stalls to the timeout.

On first render this didn't surface because hydration walks pre-existing
DOM: every element was already connected when the fiber ran. It only
broke on subsequent client-mode mounts, and only when the animated
block sat inside another wrapper element (its own ancestor had to be
appended AFTER the fork).

The animation fiber now yields microtasks until the element is
connected, up to a small bound. In practice the outer flow completes
within one or two microtasks; the bound ensures callers that never
insert their result (e.g. tests that yield an animated element without
appending it to the document) still make progress instead of hanging.

Regression test in `Control.test.ts` asserts `element.isConnected` is
true at `onBeforeEnter` on both the initial mount AND the toggle-back
of a `when`-nested animated block that lives two wrappers deep.

## 1.4.3

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/dom/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@effex/dom",
"version": "1.4.3",
"version": "1.4.4",
"description": "DOM rendering for Effex - a reactive UI framework built on Effect.ts",
"type": "module",
"license": "MIT",
Expand Down
7 changes: 7 additions & 0 deletions packages/router/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @effex/router

## 1.3.4

### Patch Changes

- Updated dependencies [ec2ad34]
- @effex/dom@1.4.4

## 1.3.3

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/router/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@effex/router",
"version": "1.3.3",
"version": "1.3.4",
"description": "Router for Effex applications",
"type": "module",
"license": "MIT",
Expand Down
Loading