From 25ad22a4e7df57568287732425086cf06fb8ef16 Mon Sep 17 00:00:00 2001 From: Lucas Winther Date: Wed, 2 Sep 2026 22:58:55 +0200 Subject: [PATCH] fix(settings): space the stacked bands, and give each row action a hit area MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adopts NativeSelect for the base-currency, per-post and rule-kind selects. Spacing. In Posts the table, the "Archiving hides a post…" footnote and the add-post row were three siblings with no margin between them at all: the footnote's own line-height was the only gap, so the three read as one undifferentiated block. The footnote now has room and the add row is its own band under a rule. Same for the add-currency row and "Fetch rates now", which sat 8px under the paragraph explaining it. Controls. The rule-summary trigger — the only way into a post's allocation history — measured `h=20 pad=0 rad=0`. It gets a 24px box and the row's hover wash. `up` / `down` / `archive` were three inline-flex siblings with nothing between them, so their hover backgrounds touched and the cell read as one wide slab. "Fetch rates now" was `sm` in a page where every other section-level action is default height, leaving it 4px short of the fields beside it. Also: the add-currency row labelled three of its four fields by placeholder and the fourth with a visible DECIMALS label, directly below a DECIMALS column heading that already said it — so that label read as a heading for the whole row. It becomes an aria-label. "Reset everything…" moves out of the export group it was fourth in and takes a destructive border. Co-Authored-By: Claude Opus 5 (1M context) --- src/ui/components/RuleHistory.tsx | 9 ++-- src/ui/routes/settings/CurrencySection.tsx | 63 +++++++++++----------- src/ui/routes/settings/DataSection.tsx | 7 ++- src/ui/routes/settings/PostsSection.tsx | 57 ++++++++++++-------- 4 files changed, 75 insertions(+), 61 deletions(-) diff --git a/src/ui/components/RuleHistory.tsx b/src/ui/components/RuleHistory.tsx index e1eddf4..285e002 100755 --- a/src/ui/components/RuleHistory.tsx +++ b/src/ui/components/RuleHistory.tsx @@ -1,6 +1,7 @@ import { useState } from "react"; import { Button } from "@/components/ui/button"; import { Input } from "@/components/ui/input"; +import { NativeSelect } from "@/components/ui/native-select"; import { useMutate } from "../hooks/useMutate.ts"; import { removeRuleFrom, setRuleFrom } from "../../store/actions.ts"; import { currentMonth } from "../../store/index.ts"; @@ -47,7 +48,7 @@ export function RuleHistory({ post }: Props) { } return ( -
+
{post.rules.length === 0 ? (

Not budgeted. Until a rule starts, this post is allocated nothing — @@ -99,8 +100,8 @@ export function RuleHistory({ post }: Props) { setFrom(next); }} /> - + Base currency (all totals use this) - +

@@ -192,9 +193,9 @@ export function CurrencySection() { - {status &&

{status}

} + {status && ( +

+ {status} +

+ )}
); @@ -277,7 +282,7 @@ function AddCurrency({ onAdd }: { onAdd: (def: { code: Currency; digits: number; } return ( -
+
-
- - { - const next = event.target.value; - setDigits(next); - }} - /> -
+ {/* No visible label. Its three siblings are labelled by placeholder, and + the DECIMALS column heading sits directly above this field in the + table — a fourth label here read as a heading for the whole row. */} + { + const next = event.target.value; + setDigits(next); + }} + /> diff --git a/src/ui/routes/settings/DataSection.tsx b/src/ui/routes/settings/DataSection.tsx index df63ba0..e8134f1 100644 --- a/src/ui/routes/settings/DataSection.tsx +++ b/src/ui/routes/settings/DataSection.tsx @@ -122,7 +122,6 @@ export function DataSection() { title="Your data" hint="Everything lives in this browser. Export regularly — it is both your backup and how you move your budget to another device." > -