@@ -283,7 +283,7 @@ describe("sidebar list motion", () => {
283283 expect ( a . animations [ 0 ] ! . cancel ) . toHaveBeenCalledOnce ( ) ;
284284 expect ( fresh . animate ) . toHaveBeenLastCalledWith (
285285 [
286- { opacity : 0 , transform : "translateY(0px )" } ,
286+ { opacity : 0 , transform : "translateY(83px )" } ,
287287 { opacity : 1 , transform : "translateY(0px)" } ,
288288 ] ,
289289 {
@@ -308,7 +308,7 @@ describe("sidebar list motion", () => {
308308 expect ( clone . animate ) . toHaveBeenCalledWith (
309309 [
310310 { opacity : 1 , transform : "translateY(0px)" } ,
311- { opacity : 0 , transform : "translateY(0px )" } ,
311+ { opacity : 0 , transform : "translateY(-83px )" } ,
312312 ] ,
313313 {
314314 duration : 150 ,
@@ -355,6 +355,26 @@ describe("sidebar list motion", () => {
355355 ) ;
356356 } ) ;
357357
358+ it ( "rides new rows on a retained header's unfinished travel" , ( ) => {
359+ const header = new TestRow ( "header" , 32 ) ;
360+ const above = new TestRow ( "above" , 39 ) ;
361+ const incoming = new TestRow ( "incoming" , 36 ) ;
362+ const { motion, layout } = fixture ( [ header ] ) ;
363+ motion . update ( true ) ;
364+ layout ( [ above , header ] ) ;
365+ motion . update ( true ) ;
366+ header . animations [ 0 ] ! . progress = 0.25 ;
367+ layout ( [ above , header , incoming ] ) ;
368+ motion . update ( true ) ;
369+ expect ( incoming . animate ) . toHaveBeenLastCalledWith (
370+ [
371+ { opacity : 0 , transform : "translateY(-30px)" } ,
372+ { opacity : 1 , transform : "translateY(0px)" } ,
373+ ] ,
374+ { duration : 150 , easing : "ease-out" } ,
375+ ) ;
376+ } ) ;
377+
358378 it ( "cancels in-flight row travel when a bulk update skips animation" , ( ) => {
359379 const a = new TestRow ( "a" ) ;
360380 const b = new TestRow ( "b" ) ;
0 commit comments