Commit 38f6481
ref(cmdk): Move slot outlets from CommandPaletteProvider into navigation
CommandPaletteProvider previously rendered a hidden div with three slot
outlet elements. Because the global test wrapper includes
CommandPaletteProvider, that hidden div showed up in every test's
container, breaking tests that assert toBeEmptyDOMElement().
Move the outlets into UserAndOrganizationNavigation in navigation/index.tsx
so they only exist when the full nav is mounted. CommandPaletteProvider
becomes a pure context provider with no DOM output. Slot consumers and
presortBySlotRef already degrade gracefully when outlets are absent, so
tests unrelated to CMDK are unaffected.
Slot-specific tests in commandPalette.spec.tsx and modal.spec.tsx now
render a local SlotOutlets component explicitly, making their dependency
on outlets visible rather than relying on a hidden side-effect in the
provider.
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 2dd2c88 commit 38f6481
File tree
4 files changed
+83
-27
lines changed- static/app
- components/commandPalette/ui
4 files changed
+83
-27
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
62 | 59 | | |
63 | 60 | | |
64 | 61 | | |
65 | 62 | | |
66 | 63 | | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
| 64 | + | |
81 | 65 | | |
82 | 66 | | |
83 | 67 | | |
| |||
Lines changed: 30 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
461 | 461 | | |
462 | 462 | | |
463 | 463 | | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
464 | 483 | | |
465 | 484 | | |
466 | 485 | | |
| 486 | + | |
467 | 487 | | |
468 | 488 | | |
469 | 489 | | |
| |||
481 | 501 | | |
482 | 502 | | |
483 | 503 | | |
| 504 | + | |
484 | 505 | | |
485 | 506 | | |
486 | 507 | | |
| |||
497 | 518 | | |
498 | 519 | | |
499 | 520 | | |
| 521 | + | |
500 | 522 | | |
501 | 523 | | |
502 | 524 | | |
| |||
514 | 536 | | |
515 | 537 | | |
516 | 538 | | |
| 539 | + | |
517 | 540 | | |
518 | 541 | | |
519 | 542 | | |
| |||
533 | 556 | | |
534 | 557 | | |
535 | 558 | | |
536 | | - | |
537 | | - | |
| 559 | + | |
| 560 | + | |
538 | 561 | | |
539 | 562 | | |
| 563 | + | |
540 | 564 | | |
541 | 565 | | |
542 | 566 | | |
| |||
556 | 580 | | |
557 | 581 | | |
558 | 582 | | |
| 583 | + | |
559 | 584 | | |
560 | 585 | | |
561 | 586 | | |
| |||
578 | 603 | | |
579 | 604 | | |
580 | 605 | | |
581 | | - | |
582 | | - | |
| 606 | + | |
| 607 | + | |
583 | 608 | | |
584 | 609 | | |
585 | 610 | | |
| |||
591 | 616 | | |
592 | 617 | | |
593 | 618 | | |
| 619 | + | |
594 | 620 | | |
595 | 621 | | |
596 | 622 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
50 | 69 | | |
51 | 70 | | |
52 | 71 | | |
| |||
62 | 81 | | |
63 | 82 | | |
64 | 83 | | |
| 84 | + | |
65 | 85 | | |
66 | 86 | | |
67 | 87 | | |
| |||
86 | 106 | | |
87 | 107 | | |
88 | 108 | | |
| 109 | + | |
89 | 110 | | |
90 | 111 | | |
91 | 112 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
32 | 56 | | |
33 | 57 | | |
34 | 58 | | |
| |||
50 | 74 | | |
51 | 75 | | |
52 | 76 | | |
| 77 | + | |
53 | 78 | | |
54 | 79 | | |
55 | 80 | | |
| |||
0 commit comments