Repository navigation
Commit 4633ea6
committed
Convert Settings tabs to a left sidebar, fix two latent Tabs bugs
Switched Settings' tab bar from horizontal-at-top to a vertical sidebar
(orientation="vertical"), which surfaced two real bugs in the
previously-unused ui/tabs.tsx component - nobody had wired it into the
app until now, so neither had ever been exercised:
1. The component's orientation-conditional classes
(group-data-vertical/tabs:flex-col etc.) depend on Tailwind variants
named `data-vertical`/`data-horizontal`, but this project's Tailwind
v4 config never defined them - only `dark` was registered as a
custom variant. Without them, those classes silently matched
nothing, so "vertical" orientation looked identical to horizontal.
Fixed by adding the two missing @custom-variant rules to index.css,
mapping them to [data-orientation=vertical/horizontal].
2. Switching tabs left both the outgoing and incoming panel visible at
once. Base UI's Tabs.Panel marks the outgoing panel `inert` and
keeps it mounted to support an exit transition, but the component
shipped no CSS to actually hide it once no transition is defined -
so it just sat there, fully visible, forever. Fixed by hiding any
panel carrying the `inert` attribute.
Verified end-to-end in a live browser session (with window.api mocked
in place of the Electron bridge, since Settings only renders inside
Electron): confirmed the sidebar actually stacks vertically via
computed flex-direction, and clicked through all 6 tabs confirming
each one's content is fully isolated with no bleed-through.1 parent 85d4d2d commit 4633ea6
3 files changed
Lines changed: 21 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
75 | 79 | | |
76 | 80 | | |
77 | 81 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
3 | 5 | | |
4 | 6 | | |
5 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
581 | 581 | | |
582 | 582 | | |
583 | 583 | | |
584 | | - | |
| 584 | + | |
585 | 585 | | |
586 | 586 | | |
587 | 587 | | |
588 | 588 | | |
589 | 589 | | |
590 | | - | |
591 | | - | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
592 | 597 | | |
593 | 598 | | |
594 | 599 | | |
| |||
597 | 602 | | |
598 | 603 | | |
599 | 604 | | |
600 | | - | |
| 605 | + | |
601 | 606 | | |
602 | 607 | | |
603 | 608 | | |
| |||
780 | 785 | | |
781 | 786 | | |
782 | 787 | | |
783 | | - | |
| 788 | + | |
784 | 789 | | |
785 | 790 | | |
786 | 791 | | |
| |||
1047 | 1052 | | |
1048 | 1053 | | |
1049 | 1054 | | |
1050 | | - | |
| 1055 | + | |
1051 | 1056 | | |
1052 | 1057 | | |
1053 | 1058 | | |
| |||
1242 | 1247 | | |
1243 | 1248 | | |
1244 | 1249 | | |
1245 | | - | |
| 1250 | + | |
1246 | 1251 | | |
1247 | 1252 | | |
1248 | 1253 | | |
| |||
1297 | 1302 | | |
1298 | 1303 | | |
1299 | 1304 | | |
1300 | | - | |
| 1305 | + | |
1301 | 1306 | | |
1302 | 1307 | | |
1303 | 1308 | | |
| |||
1622 | 1627 | | |
1623 | 1628 | | |
1624 | 1629 | | |
1625 | | - | |
| 1630 | + | |
1626 | 1631 | | |
1627 | 1632 | | |
1628 | 1633 | | |
| |||
0 commit comments