Commit 8d2e62d
committed
fix(studio): stop the audition reverting itself, and cancel it sideways
Two bugs in the hover-audition that shipped in the commit before this,
both invisible to its tests because a static mount never re-renders and
never moves the pointer between two entries.
**It reverted itself about thirty times a second.** The teardown that
puts the chain back was keyed on `onChainPreview`, which the group passes
as an inline arrow — and the group re-renders on every playhead tick to
move the automation readouts. So React tore the effect down and re-ran it
on every tick, and each teardown saw an audition in progress and undid
it. The preset was heard for one frame and then silently reverted with
the pointer still on the button, during playback, which is the only time
there is anything to audition at all. The handler moves into a ref and
the effect gets empty deps, so it runs on teardown and at no other time.
**Moving to the effect beside it left a measurement in flight.** The
levelling audition was only called off by leaving the whole shelf, so
sliding from Even Out Levels to Reverb kept the decode running — and when
it finished it wrote a levelled version of the chain as it had been, on
top of the reverb being auditioned, through the channel the document
never sees. Exactly the failure the run counter was added to prevent, one
gesture to its left. Every entry in the shelf now calls its neighbours'
auditions off: the effects cancel levelling, levelling cancels the chain
audition, and Tone cancels both despite having none of its own.
The keyboard path was already right — `focusout` bubbles, so a move
within the menu fires the shelf's own handler. Only the mouse leaked.
Falsified: restoring the dep array fails the re-render test, and dropping
the effect buttons' cancel fails the sideways-move one.
studio 3685 passing, 18 todo.1 parent 93457f9 commit 8d2e62d
3 files changed
Lines changed: 124 additions & 22 deletions
File tree
- packages/studio/src/components/editor
Lines changed: 54 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
366 | 366 | | |
367 | 367 | | |
368 | 368 | | |
369 | | - | |
370 | | - | |
371 | 369 | | |
372 | | - | |
373 | | - | |
374 | | - | |
375 | | - | |
376 | | - | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
377 | 375 | | |
378 | | - | |
| 376 | + | |
379 | 377 | | |
380 | 378 | | |
381 | 379 | | |
382 | 380 | | |
383 | 381 | | |
384 | 382 | | |
385 | | - | |
| 383 | + | |
386 | 384 | | |
387 | 385 | | |
388 | 386 | | |
| |||
399 | 397 | | |
400 | 398 | | |
401 | 399 | | |
| 400 | + | |
| 401 | + | |
402 | 402 | | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
403 | 423 | | |
404 | 424 | | |
405 | 425 | | |
| |||
412 | 432 | | |
413 | 433 | | |
414 | 434 | | |
415 | | - | |
416 | | - | |
417 | | - | |
418 | | - | |
419 | | - | |
420 | | - | |
| 435 | + | |
421 | 436 | | |
422 | 437 | | |
423 | 438 | | |
| |||
426 | 441 | | |
427 | 442 | | |
428 | 443 | | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
429 | 468 | | |
430 | 469 | | |
431 | 470 | | |
| |||
Lines changed: 28 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
360 | 360 | | |
361 | 361 | | |
362 | 362 | | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
363 | 391 | | |
364 | 392 | | |
365 | 393 | | |
| |||
Lines changed: 42 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
187 | 201 | | |
188 | 202 | | |
189 | 203 | | |
190 | 204 | | |
191 | 205 | | |
192 | | - | |
| 206 | + | |
193 | 207 | | |
194 | | - | |
| 208 | + | |
195 | 209 | | |
196 | 210 | | |
197 | 211 | | |
| |||
426 | 440 | | |
427 | 441 | | |
428 | 442 | | |
429 | | - | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
430 | 451 | | |
431 | 452 | | |
432 | 453 | | |
| |||
440 | 461 | | |
441 | 462 | | |
442 | 463 | | |
443 | | - | |
444 | | - | |
445 | | - | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
446 | 472 | | |
447 | 473 | | |
448 | 474 | | |
| |||
460 | 486 | | |
461 | 487 | | |
462 | 488 | | |
463 | | - | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
464 | 499 | | |
465 | 500 | | |
466 | 501 | | |
| |||
0 commit comments