fix(web): smooth settings sidebar transitions#9811

merged1
main
t3code/settings-sidebar-motion
openedSep 4, 2026byJJulius Marminge
View on GitHubTwo-way sync enabledPR last imported 4d ago
1 unresolved thread · Jump to file
Selected thread: apps/web/src/components/settings/SettingsSidebarNav.tsx:137 — Shared primitives over custom controls: this hand-builds an open/close collapse (grid-rows transition, `inert`/`aria-hidden`, overflow wrapper) that `Collapsible` + `CollapsiblePanel` in `apps/web/src/components/ui/collapsible.tsx` already provide. Consider rendering `<Collapsible open={isActive}><CollapsiblePanel>…</CollapsiblePanel></Collapsible>` instead, and adding a variant/class there if the settings sidebar needs a different duration. <sup>Posted via Macroscope — <a href="https://github.com/pingdotgg/t3code/runs/101193314336">UI Consistency</a></sup> <!-- macroscope-meta: {"kind":"check_run","config":".macroscope/check-run-agents/ui-consistency.md","check":"UI Consistency"} -->
0 / 1 viewed1 file changedLine totals unavailable

apps/web/src/components/settings/SettingsSidebarNav.tsx · Earlier revision ff220453 · right 119–137

Original diff
@@ -114,6 +116,27 @@ function SettingsSectionIcon({ to }: { to: SettingsPath }) {
   return <Icon className="mt-0.5 size-3.5 shrink-0 text-sidebar-muted-foreground/60" />;
 }
 
+function SettingsSubmenuCollapse({
+  open,
+  children,
+}: {
+  readonly open: boolean;
+  readonly children: ReactNode;
+}) {
+  return (
+    <div
+      aria-hidden={open ? undefined : true}
+      inert={open ? undefined : true}
+      className={cn(
+        "grid transition-[grid-template-rows] duration-150 ease-out motion-reduce:transition-none",
+        open ? "grid-rows-[1fr]" : "pointer-events-none grid-rows-[0fr]",
+      )}
+    >
+      <div className="min-h-0 overflow-hidden">{children}</div>
+    </div>
+  );

apps/web/src/components/settings/SettingsSidebarNav.tsx · right 119–137

M
macroscopeappBotSep 4, 2026

Shared primitives over custom controls: this hand-builds an open/close collapse (grid-rows transition, inert/aria-hidden, overflow wrapper) that Collapsible + CollapsiblePanel in apps/web/src/components/ui/collapsible.tsx already provide. Consider rendering <Collapsible open={isActive}><CollapsiblePanel>…</CollapsiblePanel></Collapsible> instead, and adding a variant/class there if the settings sidebar needs a different duration.

Posted via Macroscope — UI Consistency

J
Julius MarmingeSep 4, 2026

Addressed in 5949f65: the sidebar wrapper now uses the shared Collapsible and CollapsiblePanel primitives, with only the settings-specific 150 ms, ease-out, and reduced-motion classes.