Skip to content

feat(THI-54): modernize settings page - #25

Merged
tdody merged 1 commit into
mainfrom
thibaultdody/thi-54-settings-appearance-seasonal-defaults-vt-tax-defaults
Apr 19, 2026
Merged

feat(THI-54): modernize settings page#25
tdody merged 1 commit into
mainfrom
thibaultdody/thi-54-settings-appearance-seasonal-defaults-vt-tax-defaults

Conversation

@tdody

@tdody tdody commented Apr 19, 2026

Copy link
Copy Markdown
Owner

Summary

Rebuilds SettingsPage.tsx around the THI-45/46 design system and adds the Appearance + VT tax defaults sections from the ticket.

Header

Caps "Workspace" + serif 44px "Settings" + ink-3 subtitle explaining what persists where.

Appearance (live — applies immediately)

  • Theme: <Segmented> Light / Dark wired to existing ThemeContext
  • Accent swatches: 5 presets (Teal default / Forest / Amber / Rose / Violet). Selecting a swatch sets --accent on :root to the light-or-dark token value and persists to localStorage["settings.accent"]. Re-applies when the theme flips so dark-mode variants are used.
  • Density: <Segmented> Comfortable / Compact — sets document.documentElement.dataset.density and persists. Ready for density-aware CSS; no visual change yet.
  • Properties view: <Segmented> Cards / Rows — persists the default dashboard view to localStorage["settings.propertiesView"] for a follow-up that reads it in Dashboard.

Seasonal defaults (backend-persisted)

Three <SliderField> (peak months / peak occupancy / off-peak occupancy) + <SeasonalBars> preview keyed on the current values, with the same accent-vs-ink-3 legend pattern used in the Revenue & Expenses tab.

Vermont tax defaults (new, localStorage-persisted)

4 fields: VT Rooms Tax %, STR Surcharge %, Local Option Tax %, STR Registration Fee. Stored under localStorage["settings.vtTax"]. Wiring them into the new-property flow is a separate follow-up.

Lender packet branding (preserved)

Company name via <Field> + file upload for the logo; file input restyled with caps buttons and border-rule-strong tokens.

Footer

Save changes / Reset buttons. Save writes seasonal + company name to the backend and vtTax to localStorage. Reset reverts the form to the last loaded initial values. Both are disabled when the form is clean.

Test plan

  • npm run lint — clean
  • npm run build — passes, CSS 46.90 kB, 118 modules
  • Dev run: swap theme — Dark/Light segmented matches the app-wide theme immediately
  • Select a non-teal accent — --accent updates on the fly; reload persists the choice; flipping theme recomputes the accent for that mode
  • Change density / properties view — persists to localStorage
  • Drag seasonal sliders — SeasonalBars preview redraws with correct peak/off-peak coloring
  • Edit VT tax fields, click Save — reload the page, values come back
  • Upload a logo — appears in the preview area; persists across reloads
  • Click Reset on a dirty form — reverts to the loaded initial values

🤖 Generated with Claude Code

Rebuild the Settings page around the THI-45/46 design system and add the
Appearance + VT tax defaults sections from the ticket.

Header
- Caps "Workspace" + serif 44px "Settings" + ink-3 subtitle explaining
  what persists where

Appearance (live — applies immediately)
- Theme: <Segmented> Light / Dark wired to existing ThemeContext
- Accent swatches: 5 presets (Teal default / Forest / Amber / Rose /
  Violet) — selecting a swatch sets --accent on :root to the
  light-or-dark token value and persists to localStorage (settings.accent).
  Re-applies on theme flip.
- Density: <Segmented> Comfortable / Compact — sets
  document.documentElement.dataset.density and persists (ready for future
  density-aware CSS; no visual change yet)
- Properties view: <Segmented> Cards / Rows — persists the default
  dashboard view to localStorage (settings.propertiesView) for a future
  follow-up that reads it in Dashboard

Seasonal defaults (backend-persisted)
- Three <SliderField> for peak months / peak occupancy / off-peak occupancy
- <SeasonalBars> preview keyed on the current values, with the same
  accent-vs-ink-3 legend pattern used in the Revenue & Expenses tab

Vermont tax defaults (new, localStorage-persisted)
- 4 Fields: VT Rooms Tax %, STR Surcharge %, Local Option Tax %, STR
  Registration Fee
- Stored under settings.vtTax. Wiring these into the new-property flow is
  a separate follow-up.

Lender packet branding (preserved)
- Company name via <Field> + file upload for logo; file input restyled
  with caps buttons and border-rule-strong tokens

Footer
- Save changes / Reset buttons. Save writes seasonal + company to the
  backend and vtTax to localStorage; Reset reverts the form to the last
  loaded initial values. Both are disabled when the form is clean.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@tdody
tdody merged commit 6f10594 into main Apr 19, 2026
2 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.

1 participant