Conversation
Paper(variant="outlined") + Stack(direction="row", flexWrap, useFlexGap) holding a caller-supplied filter row, plus a FilterDateField helper that carries #653's 12rem bounded date width from md up and widens to one control per line below it. Ledger screens adopt it starting with the next commit; Audit (#833) can pick it up from this branch or from main once this lands.
Pair 7 (FilterBar), pair 9 (Table/TableContainer), pair 10 (title row) and pair 11 (Feed's inline capture form). Feed's flock pickers keep the retired `.form-grid .named-picker` sizing (15rem/8rem/100%) as an inline sx constant so the closed/open states stop shifting siblings.
Same shape as Feed: pair 7 (FilterBar), pair 9 (Table), pair 10 (title row), pair 11 (capture form, including the meter-readings checkbox to FormControlLabel+Checkbox). All 30 existing tests pass unchanged.
Pairs 7/9/10/11 across the grade table, the lots filter+table, the movement ledger table, and the write-off dialog. Adds the #150 scroll-shadow gradient to the theme's MuiTableContainer phone override (a verbatim copy of table.data's, which #897 never carried over) so a wide MUI table keeps the same "more to scroll" edge cue. Two StockPage.test.tsx assertions checked class-name implementation detail (table.data / div.toolbar); rewrote both against the new markup's real structural hooks.
History's adjust dialog mirrors Daily entry's two-step grading layout exactly (its own comments say so) and needs the identical MUI grid to convert away from .entry-form/.entry-rows without drifting from it. Pure extraction, no behavior change; DailyEntryPage's 82 tests stay green.
Pairs 7/9/10/11 across the filter row, the entries table (Voided rows keep their muted tone via sx inheritance) and the adjust dialog, which now renders through the shared EntryRow grid DailyEntryPage's capture form already uses (keeping History's own visible .step-n pill, per #830's comment). 2 of 75 tests selected by retired .entry-readout/.entry-row classes rewritten to the same role-scoped pattern DailyEntryPage.test.tsx already established.
Pairs 7/9/10/11/15: FilterBar now holds the whole filter row (dates, category select, manage-categories/clear-filters links) where .filters used to wrap a bounded .toolbar beside a bare category field; the categories panel converts to the same Box-between-two- Dividers ruled region FlocksPage established for pair 15; both forms and the ledger table convert to MUI. 1 of 71 tests rewritten from the retired div.toolbar class to .MuiPaper-outlined, same fix as Stock's.
Pairs 9/10/11/15: title row gets its New item action beside it via Stack justify-content space-between, both catalog dialogs and the two item-panel dialogs (purchase, adjust) convert to Stack+TextField, the item panel becomes the same Box-between-two-Dividers ruled region Expenses/Flocks already use, and both tables convert. Inventory has no list-level filter row, so it does not call FilterBar. All 73 existing tests pass unchanged.
…831) PICKER_SX (flex 0 1 15rem) belongs on a picker inside a horizontal filter/capture row, replicating the retired .form-grid .named-picker rule. Inside a vertical dialog Stack every child already stretches full width by default, which is what the retired .dialog .form-grid .named-picker override gave it — the edit dialog's FlockPicker had picked up the row cap by copy-paste and would have rendered too narrow. No behavior asserted by a test (jsdom computes no layout); caught by re-reading the CSS this markup replaces.
.actions carries a real phone-stacking rule (styles.css, D3.4's default), not a bare layout hook — dropping it for a plain Box in the prior commit was an unnecessary deviation with no CSS deletion behind it. Reverts to the retained class.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…tory (#831) The full quick Playwright suite caught a real regression: "no walked screen overflows the viewport horizontally" located /stock and /history by `content: "table.data"`, and both now render MUI's <Table> with no `data` class, same shape #832 already hit for /customers and /flocks (whose fix — switch to `role=table` — this mirrors). Also updates mutation-check.sh's EXPECT_MSG_FOR and mutants.ts's phone-table-overflow-unclipped mutant, which asserted /history still overflows under that mutant's table.data-scoped CSS override — it no longer does, narrowing the mutant to /sales alone (the follow-up PR converts Sales too and needs to retire or retarget this mutant per #824's rule).
#831) TextField select whose value can be "" with a placeholder option needs slotProps.inputLabel.shrink=true or the label rests on top of the placeholder text (the owner caught this on #897's Grade select; #833 hit it again on Audit's filters). Expenses' category filter and its record-expense form both have the same shape. Adds the unit assertion #897 established (label carries MuiInputLabel-shrink) for both.
CodeRabbit on #901 (FilterBar cherry-picked into Audit): sx={{ ..., ...sx }} only spreads a plain object's own enumerable properties, so a caller passing a theme-callback function or an sx array had it silently dropped instead of merged. MUI accepts an sx array and applies each entry in order; using that form keeps the bounded-width default AND the caller's own sx, of any shape. Added a test that passes a function sx and asserts it applied (confirmed red against the prior spread-based merge, green after this fix).
Runtime verification (isolated stack, not
|
|
SHA note: the captures/suite above were verified at |
… list (#831) Coordinator review of the rendered frames: Category and Flock cells wrapped onto multiple lines at 1280 (the #897 regression this repo has hit before). Pins whiteSpace:nowrap on date/category/amount/flock/ record-history cells and their headers; description and note stay free text and keep wrapping. Also converts the categories-management panel from a bulleted <ul> to a ruled MUI List (dividers, no bullets), matching direction A's ruled-row language rather than a bulleted list inside a ruled region.
























































Summary
Part of #831. Converts seven of the eight ledger/support screens (Sales ships separately, see below) from hand-rolled CSS to MUI, plus the new shared
FilterBarcomponent (pair 7) every filter-row screen here uses.web/src/components/FilterBar.tsx—Paper variant="outlined"+Stack(row, wrap,useFlexGap) holding a caller-supplied filter row, plusFilterDateFieldcarrying SPA: table layout — provenance column to one line, date-range filters into a bounded toolbar #653's 12rem bounded date width frommdup and widening to one control per line below it.FilterBar(pair 7),Table/TableContainer(pair 9), forms and dialogs (pair 11). Feed/Water/History/Stock/Expenses's filter rows go throughFilterBar; Reports's date-only bar does too.FilterBar. Its.order-panelitem panel converts to pair 15's ruled region (Boxbetween twoDividers)..order-panelcategories-management panel converts to the same pair-15 shape.FarmThemeProvider.tsx'sMuiTableContainerphone override gains the Mobile data tables scroll sideways with no cue — the last column is silently clipped #150 scroll-shadow gradient (a verbatim port oftable.data's own edge-fade cue, which web: convert the CRUD list screens to MUI — Customers, Products, Grades, Flocks, Users #832 never carried over) — applies to every MUI table app-wide, web: convert the CRUD list screens to MUI — Customers, Products, Grades, Flocks, Users #832's five CRUD lists included.EntryRow/STEPPER_SXextracted fromDailyEntryPage.tsxintoweb/src/components/EntryRow.tsx, ahead of touching History (whose adjust dialog mirrors Daily entry's two-step grading grid and needs the identical layout to convert without duplicating the alignment-critical grid).docs/designs/822-mui-revamp.mdamended for six divergences from its row 9 (see the "Amendment (web: convert the ledger screens to MUI — Sales, Stock, Inventory, History, Expenses #831)" section) — the full CSS-deletion picture (both halves oftr.discounted, the FilterBar caller count, the two-PR split) is finished in the follow-up PR since Sales is the last consumer of.order-panel/tr.discounted.Not in this PR: Sales (own PR, ~1,860 lines + 4,110 test lines, per the slice brief).
.order-panel,tr.discounted,.toolbar,table.data,.page-head,.mutedstay declared instyles.css— Sales and/or Audit (#833) are still live consumers.Test rewrite table
ReportsPage.test.tsxtoHaveClass("num")→toHaveStyle({textAlign:"right"})StockPage.test.tsxtable.data/div.toolbar→.MuiTableContainer-root/.MuiPaper-outlinedHistoryPage.test.tsx.entry-readout/.entry-row→ role-scoped (role="status"/"alert",role="group"named)ExpensesPage.test.tsxdiv.toolbar→.MuiPaper-outlinedMutation/defect checks
PICKER_SX(the 15rem filter-row width cap) had leaked onto Expenses' edit-dialog FlockPicker, which the retired CSS explicitly gave full width inside a dialog — separate fix commit, verified against the original.dialog .form-grid .named-pickeroverride..actions→Boxswap on Inventory's item-panel close button, reverted (.actionscarries a real phone-stacking rule).CSS deletion counts
None in this PR.
.order-panel(Sales/Inventory/Expenses were its remaining three consumers; Inventory and Expenses converted here, Sales converts in the follow-up PR, which deletes the rule) andtr.discounted/tr.discounted .badge-warn(Sales-only) are deleted in the follow-up PR..toolbar,table.data,tr.inactive td,.page-head,.muted/.error/.success/.warnstay declared — Audit (#833) and/or #832's CRUD lists are still live consumers, confirmed by grep before touching each class.Test plan
npm run typecheckcleannpm test(vitest) — full suite 3121/3122 (1 pre-existing flake, confirmed unrelated and green standalone)dotnet test tests/Cluckwork.Application.Tests --filter "FullyQualifiedName~ImagePin|FullyQualifiedName~RealTree"— 14/14 (before the docs amendment commit on the follow-up PR)styles.declared-tokens.test.ts,styles.harness-selectors.test.ts,farmTheme.policy.test.ts,styles.elevation.test.ts