v0.157.2
Patch Changes
-
#1302
a850f19cThanks @tenphi! -DisplayTransition: finish the collapse when the flow is interrupted one frame before it starts,
soDisclosurecan no longer render an open panel under a collapsed header.Hiding is a two-step flow: the main effect sets the internal
exit-pendingphase, and the
[phase]effect then schedules the double-rAF that advances it toexitand on tounmounted.
Anything that re-ran the main effect whileexit-pendingwas still on screen cancelled that rAF
— and becausephasehad not changed, the[phase]effect never re-ran to replace it. The
component was stranded inexit-pending, which reports asentered: the content stayed at full
height indefinitely whileisShownwas alreadyfalse, recovering only on the next toggle. The
pending exit is now re-armed by whoever cancels it, mirroring how the enter flow already behaved.Disclosureis the one consumer that changestransitionDurationat runtime, so it is where this
surfaced: a caller that disables the animation on the same event that collapses the panel — for
exampletransitionDuration={isBusy ? 0 : undefined}— hit it whenever the two landed in separate
renders. The trigger read as collapsed while the panel below it stayed fully expanded.Also adds a browser test tier for
DisplayTransitionandDisclosure. The
duration === undefinedpath, which times the exit off the element's owntransitionendand is
what most consumers use, could not be tested under jsdom — with no layout, transition events never
fire and the fallback timer always won — andDisclosure'sheight: 0 → max-contentanimation has
no measurable height there either.