1
0
Fork 0
polaris-task-force/src/components/frontend
Z8MB1E 088b6cefb6 fix(ui): correct sidebar inset layout and Tailwind v4 custom-property widths
The shadcn component update pulled sidebar.tsx using Tailwind v3-style
bare-bracket custom property syntax (w-[--sidebar-width]). Under Tailwind
v4 this compiles to invalid CSS (width: --sidebar-width) which the browser
ignores, so width fell back to auto and the fixed sidebar blew out to its
content's intrinsic width (the 1372px logo header ~ half the page). The
empty spacer div was equally broken, reserving zero space and leaving the
inset m-2 margin as a stray left gap.

Three fixes:
- sidebar.tsx: wrap all 7 bare-bracket custom properties in var() so they
  compile to width: var(--sidebar-width) / var(--sidebar-width-icon) /
  max-width: var(--skeleton-width). The calc(var(...)) rules were already
  valid; only the bare forms were broken.
- layout.tsx: replace the raw <main className="min-h-full bg-background
  w-full"> with <SidebarInset>. AppSidebar uses variant="inset", whose
  peer styling (md:peer-data-[variant=inset]:m-2 / :rounded-xl / :shadow)
  only applies to a SidebarInset sibling, so the inset gap/rounding/shadow
  were silently dropped.
- SiteHeader.tsx: replace the raw <div> + border-gray-800 + p-4 with the
  standard shadcn <header className="flex h-16 shrink-0 items-center gap-2
  border-b px-4"> using semantic border-b, plus -ml-1 on SidebarTrigger
  and an ml-auto wrapper for NotificationsBell (which takes no className).

Verified via the running dev server: SSR HTML carries
data-variant="inset", a single <main> with the peer-data-[variant=inset]
classes, <header ... border-b>, and zero border-gray-800 occurrences.
tsc --noEmit clean for the changed files.
2026-08-16 23:27:51 -04:00
..
account feat(users): add discordId and Discord notification preferences 2026-08-12 12:38:43 -04:00
auth feat(auth): add frontend login page and guest landing gate 2026-08-02 02:04:02 -04:00
banking feat(banking): redesign banking overview with wallet hero, activity feed, and tabs 2026-08-12 23:13:27 -04:00
blocks feat(helpdesk): add helpdesk sidebar entry 2026-08-16 18:12:49 -04:00
dashboard style(dashboard): polish quick stats and recent events feed 2026-08-11 23:25:44 -04:00
flappy refactor(flappy): use obstacle terminology instead of pipes 2026-08-02 14:32:53 -04:00
helpdesk feat(helpdesk): enhance create ticket dialog with critical alert for priority tickets 2026-08-16 18:26:01 -04:00
intelligence feat(factions): redesign faction card and add faction detail page 2026-08-12 16:21:13 -04:00
locker fix(locker): revert to onClick and add error feedback to slot picker 2026-08-02 19:00:05 -04:00
logistics feat(logistics): add shipment action controls to shipment detail page 2026-08-02 02:04:51 -04:00
market feat(market): add trading marketplace with listings, haggling, and NPC vendors 2026-08-10 16:05:57 -04:00
notifications fix(notifications): harden bell dropdown against failed mark-read 2026-08-12 12:38:48 -04:00
realtime feat(realtime): add game-tick SSE notification pipeline 2026-08-02 02:03:56 -04:00
roster feat(roster): build org chart from explicit subassignment hierarchy 2026-08-11 23:25:38 -04:00
storage refactor(event-log): extract shared formatType helper and restyle ledger entries 2026-08-11 23:25:41 -04:00
LandingPage.tsx style(frontend): swap ShieldIcon for AppLogo on landing page 2026-08-12 23:14:08 -04:00
PayloadButtons.tsx feat: switch to Bun, add fonts and styling, update components and UI, add basic front-end 2025-12-16 23:26:52 -05:00
SiteHeader.tsx fix(ui): correct sidebar inset layout and Tailwind v4 custom-property widths 2026-08-16 23:27:51 -04:00