From 6d8802af41b1772ec117738ac39045df46388aea Mon Sep 17 00:00:00 2001 From: fireshaper Date: Sun, 1 Nov 2026 13:57:10 -0500 Subject: [PATCH] Confetti redesign: new theme system, layout and dashboard schedule Rework the client's look and several flows around the "Confetti" design direction: - Themes are now palette x mode (Confetti / Meadow in Auto, Light, Dark), with six semantic party hues, Bricolage Grotesque / Figtree / JetBrains Mono, rounder radii and card/pop shadows. Legacy theme ids are normalized. - Floating sidebar with colored section tiles and a theme toggle; floating pill bottom nav on phones. - Dashboard: today-led hero, colored stat tiles, a derived "Coming up" schedule (palpate, nest box, due, wean, birthdays), gestation tracker, recent litters with kit dots and a for-sale strip. - Coat-colored lop placeholders for rabbits without photos. - Bracket pedigrees (sire side blue, dam side pink) on rabbit detail and in Add Rabbit, plus one-tap "Quick pick" suggested parents. - Rabbit detail hero with fact tiles; litter milestone strip; restyled herd, litters, settings, auth screens and shared controls. Co-Authored-By: Claude Opus 5.5 --- .claude/launch.json | 7 + memory-bank/architecture.md | 23 +- mykindlebox/client/index.html | 20 +- mykindlebox/client/package-lock.json | 4 +- mykindlebox/client/package.json | 2 +- mykindlebox/client/public/favicon.svg | 2 +- mykindlebox/client/public/manifest.json | 4 +- mykindlebox/client/src/auth.jsx | 24 +- .../client/src/components/ActionMenu.jsx | 4 +- .../client/src/components/AddToEventModal.jsx | 8 +- mykindlebox/client/src/components/Badge.jsx | 38 +- .../client/src/components/BrandMark.jsx | 14 + .../client/src/components/BreedSelect.jsx | 2 +- mykindlebox/client/src/components/Button.jsx | 20 +- mykindlebox/client/src/components/Card.jsx | 2 +- mykindlebox/client/src/components/CoatArt.jsx | 55 ++ .../client/src/components/ConfirmDialog.jsx | 4 +- .../client/src/components/EmptyState.jsx | 15 +- .../client/src/components/FormControls.jsx | 24 +- .../client/src/components/GeneticsForm.jsx | 2 +- mykindlebox/client/src/components/Icon.jsx | 161 +++++ mykindlebox/client/src/components/Layout.jsx | 287 ++++---- .../client/src/components/LitterCard.jsx | 72 ++- .../client/src/components/PageHeader.jsx | 12 +- .../client/src/components/PedigreeTree.jsx | 198 ++++-- .../src/components/PedigreeTreeReadOnly.jsx | 92 +-- .../client/src/components/QuickSearch.jsx | 43 +- .../src/components/RabbitAutocomplete.jsx | 2 +- .../client/src/components/RabbitCard.jsx | 76 ++- .../client/src/components/RabbitPicker.jsx | 2 +- .../client/src/components/RabbitTimeline.jsx | 14 +- .../client/src/components/ReportModal.jsx | 2 +- .../client/src/components/Silhouette.jsx | 9 - .../client/src/components/StickyActionBar.jsx | 11 +- .../client/src/components/ThemeToggle.jsx | 43 ++ .../client/src/components/UsersCard.jsx | 4 +- mykindlebox/client/src/index.css | 364 +++++++---- mykindlebox/client/src/lib/coat.js | 102 +++ mykindlebox/client/src/lib/format.js | 26 + mykindlebox/client/src/lib/theme.js | 141 ++-- mykindlebox/client/src/pages/AddRabbit.jsx | 127 +++- mykindlebox/client/src/pages/Dashboard.jsx | 610 +++++++++++++----- mykindlebox/client/src/pages/EditRabbit.jsx | 2 +- mykindlebox/client/src/pages/Herd.jsx | 168 +++-- mykindlebox/client/src/pages/LitterDetail.jsx | 251 ++++--- mykindlebox/client/src/pages/Litters.jsx | 16 +- mykindlebox/client/src/pages/RabbitDetail.jsx | 322 ++++----- mykindlebox/client/src/pages/Settings.jsx | 98 +-- .../client/src/pages/ShowEventDetail.jsx | 12 +- mykindlebox/client/src/pages/ShowEvents.jsx | 4 +- mykindlebox/client/src/pages/Shows.jsx | 4 +- mykindlebox/client/tailwind.config.js | 39 +- mykindlebox/server/db/client.ts | 2 +- mykindlebox/server/package-lock.json | 4 +- mykindlebox/server/package.json | 2 +- 55 files changed, 2382 insertions(+), 1214 deletions(-) create mode 100644 .claude/launch.json create mode 100644 mykindlebox/client/src/components/BrandMark.jsx create mode 100644 mykindlebox/client/src/components/CoatArt.jsx create mode 100644 mykindlebox/client/src/components/Icon.jsx delete mode 100644 mykindlebox/client/src/components/Silhouette.jsx create mode 100644 mykindlebox/client/src/components/ThemeToggle.jsx create mode 100644 mykindlebox/client/src/lib/coat.js diff --git a/.claude/launch.json b/.claude/launch.json new file mode 100644 index 0000000..6783658 --- /dev/null +++ b/.claude/launch.json @@ -0,0 +1,7 @@ +{ + "version": "0.0.1", + "configurations": [ + { "name": "server", "runtimeExecutable": "npm", "runtimeArgs": ["--prefix", "mykindlebox/server", "run", "dev"], "port": 3001 }, + { "name": "client", "runtimeExecutable": "npm", "runtimeArgs": ["--prefix", "mykindlebox/client", "run", "dev"], "port": 5173 } + ] +} diff --git a/memory-bank/architecture.md b/memory-bank/architecture.md index 656eff5..3e504ee 100644 --- a/memory-bank/architecture.md +++ b/memory-bank/architecture.md @@ -48,7 +48,7 @@ docker-compose.yml — orchestrates both services for self-hosted deployment |---|---| | `src/App.jsx` | Root component. Wraps the app in `QueryClientProvider` (React Query) and `BrowserRouter`, defining every IA route nested under a single `Layout` layout-route (`}>`) so the sidebar/bottom-nav persists across page navigation. Includes a catch-all `*` → `NotFound` route. | | `src/api.js` | Plain JS (not `.ts` — the client is deliberately plain JS/JSX per Step 1.3, not TypeScript), one fetch function per backend endpoint (rabbits CRUD/search/quick-search/ancestors/photo, litters CRUD, events CRUD (`getEvents`/`createEvent`/`updateEvent`/`deleteEvent`), settings, stats, export, `importData` which POSTs a `FormData` file to `/api/import`, shows (`getArbaShows`/`refreshArbaShows`), show events (`getShowEvents`/`getShowEvent`/`createShowEvent`/`updateShowEvent`/`deleteShowEvent`/`addShowToEvent`/`removeShowFromEvent`), show entries + report (`addShowEntry`/`updateShowEntry`/`removeShowEntry`/`getEventReport`), judges + placements (`addShowJudge`/`updateShowJudge`/`removeShowJudge`/`setShowEntryPlacement`)), all targeting `http://localhost:3001/api`. Shared `request()` helper throws on non-2xx (surfacing the JSON `{ error }` body's message) and only sets `Content-Type: application/json` when the body is a JSON string, so the multipart `FormData` photo-upload call isn't given the wrong header. | -| `src/components/Layout.jsx` | Persistent app shell rendered via React Router's ``. Desktop: 240px left sidebar (`hidden md:flex`) with `NavLink`s for Dashboard/Herd/Litters/Genetics/Shows/Settings. Mobile (`≤768px`): fixed-bottom nav (`md:hidden`, icon + label, 56px tall, padded by `env(safe-area-inset-bottom)`) with Dashboard/Herd/Add (→ `/herd/add`)/Litters/More — "More" opens a small menu for Genetics/Shows/Settings so every page is reachable on a phone. The sidebar is `sticky` and the content column is `min-w-0` + `max-w-6xl`, so wide children (tables, the 900px pedigree tree) scroll inside their own containers instead of stretching the page. `
` owns the page gutter (`px-4 md:px-8`); pages must not add their own horizontal padding. Active-route styling comes from `NavLink`'s `isActive` callback, not manual path matching. Also renders `` at the top of the `
` content area (above ``) on every page **except** `/herd` (which has its own search box) and the add/edit form routes (`showsQuickSearch`), where jumping to a result would silently discard the unsaved form. | +| `src/components/Layout.jsx` | Persistent app shell rendered via React Router's `` (Confetti redesign, 2026-11-01). Desktop (`md+`): a **floating sidebar** — a sticky rounded panel inset 16px from the viewport (`h-[calc(100vh-2rem)]`) with the brand mark + rabbitry name, a primary "Add rabbit" pill, `NavLink`s each with a colored icon tile (each section keeps its hue: Dashboard yellow `c5`, Herd violet `c1` + live active-herd count from `/api/stats`, Litters orange `c3`, Shows teal `c4`, Settings blue `c6`), and a footer with the user's avatar, app version, `ThemeToggle` and sign-out. Mobile: a brand row at the top of `
` and a **floating pill bottom nav** (`fixed inset-x-3`, above `env(safe-area-inset-bottom)`) with Home/Herd/Add (filled accent tab → `/herd/add`)/Litters/More — More opens a menu with Shows/Settings, the version and a `ThemeToggle`. The content column is `min-w-0` + `max-w-[1180px]`; `
` owns the page gutter (`px-4 md:px-10`) and the bottom padding that clears the floating nav (`pb-[calc(7rem+safe-area)]`); pages must not add their own horizontal padding. Herd's active state is computed (`/herd*` except `/herd/add`). Also renders `` above `` on every page **except** `/herd` and the add/edit form routes (`showsQuickSearch`). | | `src/components/QuickSearch.jsx` | Global quick-search bar (top of every page via `Layout`). A debounced (200ms) text input + a "Filters" popover of four checkboxes (Farm Name / Rabbit Name / Ear Number / Color), **all selected by default**, controlling which fields `GET /api/rabbits/quick-search` prefix-matches. Results render in a dropdown as the user types; each row shows name · farm plus a chip per `matched_fields` entry (value-bearing chips for ear/color, e.g. `Ear #: A15`). Selecting a result navigates to `/herd/:id`. Results outside the active herd show a status `Badge` (pedigree-materialized ancestors are status `other`). Reuses `lib/keyboardNav.js`'s `handleSearchInputKeyDown`/`handleResultKeyDown` for the same `