mega-plant/components
David aa1e75e399 Mobile: the menu button was indenting every page
The whole site sat 36px to the right on phones and tablets, with a narrow empty
gutter down the left that held nothing but the hamburger.

Sidebar rendered the mobile trigger as a plain child of the content flex row in
the root layout. Below lg the desktop rail is display:none and the drawer is
position:fixed, so that button was the only sibling still taking width before
<main> — and main is flex-1, so it filled only what was left.

Measured on the dev server: at 375px main was x=36 w=339; at 768px x=36 w=732.
1280px was correct (x=256 w=1024), because the button is lg:hidden there. This
was never a horizontal-scroll bug — scrollWidth equalled clientWidth at both
widths. It was a permanent indent, and the content was 36px narrower than the
screen.

The side menu itself was fine: the drawer is fixed, so it contributed nothing to
layout and opened at x=0, 288x812, with scroll lock working. Only its trigger
was in the wrong place.

- Sidebar now exports the desktop rail on its own — hidden lg:block, so it can
  never take width on mobile — plus MobileNav, which owns the trigger and drawer.
- The trigger moved into the full-bleed header, so the button costs no content
  width, and it is w-11 h-11 (44x44) with -ml-3, which puts its icon's left edge
  on the logo's 16px edge without moving the logo.
- The drawer and overlay are portalled to document.body. The header carries
  backdrop-blur, and a backdrop-filter makes an element the containing block for
  its position:fixed descendants — inline, the drawer would have sized itself to
  the 64px header box. Commented in place so the portal is not removed later.
- The desktop rail and the drawer now render one shared NavList, so the two navs
  cannot drift apart.
- Header row gap is gap-2 on mobile: the 44px trigger narrows the search field
  from 247px to 215px at 375px, and the search is the only thing that yields.

Verified in the browser: main is x=0 w=375 at 375px and x=0 w=768 at 768px, with
no page overflow at either. The drawer is still full-viewport height and paints
correctly above Leaflet on /plant/map; tapping a drawer link navigates and closes
it; the scroll lock releases. /income/invoices, the widest table, has no element
wider than the viewport. Typecheck and build green.
2026-10-03 16:08:04 +02:00
..
ChartsGrid.tsx Charts: a profit line that changes colour, and a Series toggle 2026-10-03 09:20:16 +02:00
DashboardCharts.tsx Charts: a profit line that changes colour, and a Series toggle 2026-10-03 09:20:16 +02:00
ExpenseSectionPage.tsx Fix: the mobile table was mislabelled and clipping its own totals 2026-10-02 15:34:19 +02:00
GlobalSearch.tsx Fix: the mobile table was mislabelled and clipping its own totals 2026-10-02 15:34:19 +02:00
IncomeView.tsx Fix: the mobile table was mislabelled and clipping its own totals 2026-10-02 15:34:19 +02:00
InvoiceIntake.tsx Fix: toast and machine dropdown were rendering behind the page chrome 2026-10-02 18:42:29 +02:00
InvoiceList.tsx Invoices: fix the tablet layout and make booking an unbooked line obvious 2026-10-03 09:59:05 +02:00
InvoiceTable.tsx Invoices: a machine chosen in the dropdown was never actually booked 2026-10-03 15:43:46 +02:00
InvoiceUploader.tsx Invoices: line-item extraction, booking to plant items, VAT-inclusive income 2026-10-01 15:59:30 +02:00
MachineCombobox.tsx Invoices: a machine chosen in the dropdown was never actually booked 2026-10-03 15:43:46 +02:00
MachineLineChart.tsx Charts: a profit line that changes colour, and a Series toggle 2026-10-03 09:20:16 +02:00
PlantMap.tsx Map: dark tiles from Esri, because CARTO retired keyless access 2026-10-03 09:20:24 +02:00
PlantMapLoader.tsx Map: dark tiles from Esri, because CARTO retired keyless access 2026-10-03 09:20:24 +02:00
PlantRegisterTable.tsx Plant: default the register's status filter to Active 2026-10-03 09:59:11 +02:00
RunningView.tsx Fix: the mobile table was mislabelled and clipping its own totals 2026-10-02 15:34:19 +02:00
ScrollFade.tsx Fix: the mobile table was mislabelled and clipping its own totals 2026-10-02 15:34:19 +02:00
Sidebar.tsx Mobile: the menu button was indenting every page 2026-10-03 16:08:04 +02:00
SiteBookingSelect.tsx Invoices: fix the tablet layout and make booking an unbooked line obvious 2026-10-03 09:59:05 +02:00
SiteContainerEditor.tsx Sites: auto-allocate container lines to the container the site hires 2026-10-02 18:32:12 +02:00
SiteCoordinateEditor.tsx Sites: give every site coordinates 2026-10-02 16:33:43 +02:00
SitesView.tsx Sites: a card list that reads like the income screen 2026-10-03 09:20:20 +02:00
Sparkline.tsx Invoices: keep the PDF on the invoice, and search the invoice's own words 2026-10-02 19:09:16 +02:00
ThemeProvider.tsx
ThemeToggle.tsx
Toast.tsx Fix: toast and machine dropdown were rendering behind the page chrome 2026-10-02 18:42:29 +02:00