| author | |
| committer | |
| log | 47117a7d85b6696e3ad3ae7d59303b3a60e9eea5 |
| tree | 2d8face5721929221dde7a8c049b50bdf2accd4a |
| parent | f62381090323ae15ffab480bdeeb868e61274fbf |
- Replace `SIDEBAR_INSET_BASE_CLASSNAME` with an inline class string in `sidebar.tsx`
- Delete the now-unused `sidebar.logic.ts` helper and its focused unit test3 files changed, 1 insertions(+), 13 deletions(-)
apps/web/src/components/ui/sidebar.logic.ts deleted-2| ... | ... | @@ -1,2 +0,0 @@ |
| 1 | export const SIDEBAR_INSET_BASE_CLASSNAME = | |
| 2 | "relative flex min-w-0 w-full flex-1 flex-col bg-background"; |
apps/web/src/components/ui/sidebar.test.tsx deleted-9| ... | ... | @@ -1,9 +0,0 @@ |
| 1 | import { describe, expect, it } from "vitest"; | |
| 2 | ||
| 3 | import { SIDEBAR_INSET_BASE_CLASSNAME } from "./sidebar.logic"; | |
| 4 | ||
| 5 | describe("SidebarInset", () => { | |
| 6 | it("stays shrinkable inside flex layouts", () => { | |
| 7 | expect(SIDEBAR_INSET_BASE_CLASSNAME).toContain("min-w-0"); | |
| 8 | }); | |
| 9 | }); |
apps/web/src/components/ui/sidebar.tsx+1-2| ... | ... | @@ -18,7 +18,6 @@ import { |
| 18 | 18 | import { Skeleton } from "~/components/ui/skeleton"; |
| 19 | 19 | import { Tooltip, TooltipPopup, TooltipTrigger } from "~/components/ui/tooltip"; |
| 20 | 20 | import { useMediaQuery } from "~/hooks/useMediaQuery"; |
| 21 | import { SIDEBAR_INSET_BASE_CLASSNAME } from "./sidebar.logic"; | |
| 22 | 21 | |
| 23 | 22 | const SIDEBAR_COOKIE_NAME = "sidebar_state"; |
| 24 | 23 | const SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7; |
| ... | ... | @@ -596,7 +595,7 @@ function SidebarInset({ className, ...props }: React.ComponentProps<"main">) { |
| 596 | 595 | return ( |
| 597 | 596 | <main |
| 598 | 597 | className={cn( |
| 599 | SIDEBAR_INSET_BASE_CLASSNAME, | |
| 598 | "relative flex min-w-0 w-full flex-1 flex-col bg-background", | |
| 600 | 599 | "md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ms-2 md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ms-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm/5", |
| 601 | 600 | className, |
| 602 | 601 | )} |