Skip to content

Add an optional new design, switched on from Settings - #18

Merged
AshtonLong merged 6 commits into
masterfrom
slate-design
Nov 22, 2026
Merged

AshtonLong merged 6 commits into
masterfrom
slate-design

Conversation

@AshtonLong

Copy link
Copy Markdown
Collaborator

Summary

Adds a second design for the app. It is off by default: the current design stays what everyone sees. Turn the new one on under Settings → Appearance → New design, and off again with the same switch. The choice is saved per device, like the theme.

What the new design changes

  • Shell: a slim icon rail with labels and count badges, a top bar with a "Needs you" list and a "New" menu that opens the right dialog on the right page, and a bottom tab bar on phones.
  • Overview: what is waiting on you first (chores, votes, payments to confirm, a car you need to move), then the selected day, a four-week chart of the house's days, this week's chores as gauges, and a roommates table.
  • Chores: a "who did what" grid per roommate, with upcoming turns and routines as tables.
  • Money: balance gauges, a running spend chart that shows bills still to come this month, spending by category, and a balances table.
  • Calendar: one month grid for events, classes, chores, bills and driveway exits, with a toggle per kind.
  • Driveway and Settings: regrouped. The driveway board itself is the existing one.
  • Dark by default, with a light theme. Its theme is remembered separately from the classic theme.

The current design is unchanged

  • The only visible change is a new Appearance section on the Settings page.
  • A page that stays on classic does not load the new design's stylesheet, shell or layouts. They are fetched when the switch is turned on.
  • The classic theme resolves exactly as before, including when storage is blocked.
  • Chores, Calendar and Driveway show large diffs because their dialogs were lifted into a variable so both designs share them. With whitespace ignored, the dialogs are unchanged.

How it is built

  • src/lib/appearance.ts owns the design and theme preference. index.html applies it before first paint.
  • src/slate/ holds the new shell, overview, settings, the four page layouts, charts and styles. Chores, Money, Calendar and Driveway keep their page logic and dialogs and swap only their layout.
  • src/lib/insights.ts is a read-only layer that derives what the charts and the "Needs you" list show.
  • Every style for the new design is scoped to :root[data-design="slate"].
  • New dependency: @fontsource-variable/instrument-sans, self-hosted and only loaded with the new design.

Testing

  • Unit and component tests: 138 pass, 57 of them new (preference handling, the derived data, switching, keyboard and focus behaviour).
  • End-to-end: new specs cover turning the design on and off, every page on mobile Chrome and Safari, and the main flows. A new production-build spec covers a cold start in the new design and the fallback to classic when its stylesheet cannot be fetched.
  • Lint, type-check, production build, the PWA install test, the auth flow tests and the database script tests pass locally.
  • On my Windows machine one existing spec fails with or without this change: "bill tap opens breakdown" in household.spec.ts on mobile Chrome. It also fails on master there.

The classic design stays the default. The new design, called Slate in the
code, is turned on per device under Settings, Appearance, New design.

Slate has its own shell, overview and settings. Chores, Money, Calendar and
Driveway keep their page logic and dialogs and swap only their layout. All of
its styles are scoped to :root[data-design="slate"], so classic is unchanged
while it is off.

Also adds a shared appearance module for the design and per-design theme, a
read-only insights layer for the new charts and the needs-you list, and tests
for both.
Keep classic exactly as it was:
- Load the slate stylesheet, shell and layouts only once the design is on,
  and stop precaching its font.
- Resolve the classic theme the way master did when storage is blocked or
  holds an unexpected value, and never override what the document shows.
- Re-render on a theme change only where the theme is used.

Fix what the new design got wrong:
- A bill stays due for the whole of its due day.
- Buttons keep their size and weight; index.css was flattening them.
- The overview shows the recovery-email prompt again.
- Claims past their deadline no longer ask for a photo or a vote.
- Balance rows read as table rows, dialogs and menus take and return focus,
  and menus move with the arrow keys.
- Light theme colours and placeholders meet 4.5:1, and touch targets grow on
  phones.

Switching design now loads the other design first, so it lands on a
finished page instead of a loading screen.
- Switching design no longer flashes the loading screen: the parts of each
  design are preloadable, and render at once after they have been loaded.
- Confirm the slate stylesheet really arrived before showing slate. It marks
  the root element, and a missing mark means classic for this visit at
  startup, or a clear message from Settings. The stylesheet has one loader,
  so a second request can never be mistaken for a finished one.
- Move focus into any dialog opened inside slate and back to where it was
  when the dialog closes.
- A bill that carries an old paid mark is done, as in classic.
- Hint text on gauge fills, and the danger hover, meet 4.5:1.
- Test the production build's cold start, since the dev server loads
  styles differently.
- The dialog focus handling now also notes what was pressed, since Safari
  does not focus a button on click. A press on something that cannot take
  focus clears the target, so focus never returns to an older element.
- A dialog asking a question cannot be closed by any route while its request
  is running.
- Everything waiting on the slate stylesheet shares one load, and a slate
  cold start falls back to classic if its shell cannot be loaded.
- Categories not picked on the money page fade their fill, not their text.
- A press that turns into a scroll is not remembered as what opened a dialog.
- Fading the categories that are not picked animates again.
Copilot AI balanced review requested due to automatic review settings November 22, 2026 04:33

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

The demo house keeps Toronto time while its sample data is dated from the
device's clock. On CI, which runs in UTC, the sample chore for today fell on
the household's tomorrow for the last hours of the Toronto day, so the two
tests about what today shows failed there.
@AshtonLong
AshtonLong merged commit d07c703 into master Nov 22, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants