Skip to content

Commit 41657be

Browse files
theredmooseclaude
andauthored
Update: consistent spacing and Member Detail stat polish (#75)
* Fix: replace add button circle with bare green plus; fix ALERTS spacing - BTN_ADD_CLS: strip bg/rounded-full/shadow, keep text-[#008751] with hover state - MemberDetail: swap PlusCircle -> Plus for add gear button - NotificationsPanel: remove mt-5 (overridden by unlayered CSS reset) - App: replace mt-5 wrapper with h-5 spacer div (height utilities bypass the * { margin: 0 } reset that overrides @layer utilities in Tailwind v4) - docs/solutions: document CSS cascade/margin override pattern Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Update: homepage font sizes +2px across all elements; fix MemberCard stat row layout - Bump all homepage text +2px: stat values xs→base, labels xs→sm, names xl→24px, section headers xl→22px, notification copy sm/xs→base/sm - Stat rows now justify-end with gap-2; value in w-12 text-right, unit in w-7 so label+value+unit group sits right with clear spacing between number and unit - Name row uses items-end so name baseline aligns with edit/delete button bottoms - Fix docs/solutions tailwind cascade doc: correct physical vs logical property table (px-*/py-* work; pt-*/pb-* fail), update component count to 17 files - CLAUDE.md: add design review/screenshot instructions, bug fix protocol, rebase-before-PR rule, TODO.md scope clarification - TODO.md: remove completed Known Issues and Technical Debt items Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Update: document .env.local copy step for new worktrees Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Update: consistent spacing and Member Detail polish - Standardise all scrollable bodies to bg-[#F8FAFC] px-6 pt-6 pb-8 (fixes px-4/px-5 side margins and bg-white backgrounds on forms, history, converter, notifications, resources, measure, settings) - Member Detail stat rows: CapitalCase labels, pl-4 indent to align with name text, mt-[11px] above first row, mb-[11px] below name - Add Head (headCircumference) to Member Detail stat rows Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Update: group Member Detail stats and add Head attribute - Reorder stat rows: Age/Height/Weight, then Head/Hand/Foot - Add 3px visual gap before the second group (spaceBefore on Head) - Add Head (headCircumference) attribute to stat rows Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Fix: stat row grouping using inline style instead of dynamic Tailwind class Split statRows into two explicit groups; apply marginTop via inline style on the first item of group 2 to avoid Tailwind v4 purge of dynamic classes. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Update: consistent 8px gaps and deeper label indent in Member Detail stats - 8px gap before Age (name→Age), before Height (Age→Height), and before Head (Weight→Head) — all group separators now uniform - Increase label indent pl-4→pl-[18px] to align under 'e' in name Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: theredmoose <theredmoose@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 96ac0ef commit 41657be

10 files changed

Lines changed: 24 additions & 23 deletions

src/components/EditMeasurementEntryScreen.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ export function EditMeasurementEntryScreen({
177177
onBack={onBack}
178178
/>
179179

180-
<div className="flex-1 overflow-y-auto bg-white px-5 py-5">
180+
<div className="flex-1 overflow-y-auto bg-[#F8FAFC] px-6 pt-6 pb-8">
181181
<form onSubmit={handleSubmit} noValidate className="space-y-4">
182182
{/* Date */}
183183
<div>

src/components/GearForm.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ export function GearForm({
257257
className="flex flex-col flex-1 min-h-0"
258258
>
259259
{/* Scrollable content */}
260-
<div className="flex-1 overflow-y-auto bg-white px-6 py-5 flex flex-col gap-6">
260+
<div className="flex-1 overflow-y-auto bg-[#F8FAFC] px-6 pt-6 pb-8 flex flex-col gap-6">
261261
{error && (
262262
<div className="bg-red-50 border border-red-200 text-red-600 text-sm font-bold rounded-xl px-4 py-3">
263263
{error}

src/components/MeasureScreen.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export function MeasureScreen({ members, onSelectMember }: MeasureScreenProps) {
1212
return (
1313
<div className="flex flex-col min-h-0 flex-1">
1414
<ScreenHeader title="Measure" />
15-
<div className="flex-1 overflow-y-auto bg-[#F8FAFC] px-6 py-6">
15+
<div className="flex-1 overflow-y-auto bg-[#F8FAFC] px-6 pt-6 pb-8">
1616
<p className="text-xs text-slate-400 font-bold tracking-widest mb-4">
1717
Select a member to update measurements
1818
</p>

src/components/MeasurementHistoryScreen.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ export function MeasurementHistoryScreen({
7878
}
7979
/>
8080

81-
<div className="flex-1 overflow-y-auto bg-white px-4 py-4">
81+
<div className="flex-1 overflow-y-auto bg-[#F8FAFC] px-6 pt-6 pb-8">
8282
{entries.length === 0 ? (
8383
<p className="text-slate-400 text-sm text-center py-8">
8484
No measurement history yet. Tap + to add an entry.

src/components/MemberDetail.tsx

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,7 @@ export function MemberDetail({
250250

251251
const showFoot = settings?.display.showFoot ?? true;
252252
const showHand = settings?.display.showHand ?? true;
253+
const headDisplay = m.headCircumference ? `${m.headCircumference} cm` : '—';
253254
const separateFeetHands = settings?.display.separateFeetHands ?? false;
254255

255256
// Format shoe size for display
@@ -281,19 +282,19 @@ export function MemberDetail({
281282
? `${Math.round(m.weight * 2.2046)} lbs`
282283
: `${m.weight} kg`;
283284

284-
const statRows = [
285+
type StatRow = { label: string; value: string; badge?: string | null; onToggle?: () => void; action?: () => void };
286+
287+
const statGroup1: StatRow[] = [
285288
{ label: 'Age', value: `${age} yrs` },
286289
{ label: 'Height', value: heightDisplay, badge: growthBadgeReason, onToggle: () => setHeightUnit(u => u === 'cm' ? 'ft' : 'cm') },
287290
{ label: 'Weight', value: weightDisplay, onToggle: () => setWeightUnit(u => u === 'kg' ? 'lbs' : 'kg') },
288-
...(showFoot ? [{ label: 'Foot', value: shoeDisplay, action: footLength > 0 ? onOpenConverter : undefined, onToggle: footLength > 0 ? () => setFootUnit(u => u === 'cm' ? 'in' : 'cm') : undefined }] : []),
291+
];
292+
293+
const statGroup2: StatRow[] = [
294+
{ label: 'Head', value: headDisplay },
289295
...(showHand ? [{ label: 'Hand', value: handDisplay }] : []),
290-
] as Array<{
291-
label: string;
292-
value: string;
293-
badge?: string | null;
294-
onToggle?: () => void;
295-
action?: () => void;
296-
}>;
296+
...(showFoot ? [{ label: 'Foot', value: shoeDisplay, action: footLength > 0 ? onOpenConverter : undefined, onToggle: footLength > 0 ? () => setFootUnit(u => u === 'cm' ? 'in' : 'cm') : undefined }] : []),
297+
];
297298

298299
return (
299300
<div className="member-detail flex flex-col min-h-screen">
@@ -331,16 +332,16 @@ export function MemberDetail({
331332

332333
{/* Right column: name + stats + history */}
333334
<div className="flex-1 pt-1 min-w-0">
334-
<div className="flex items-center gap-2 mb-5">
335+
<div className="flex items-center gap-2 mb-0">
335336
<h2 className="text-2xl font-black text-slate-900 tracking-tight leading-none truncate">
336337
{member.name}
337338
</h2>
338339
</div>
339340

340-
<div className="mb-3">
341-
{statRows.map((row) => (
342-
<div key={row.label} className="flex items-center border-b border-slate-100 py-2.5">
343-
<span className="flex-1 text-[11px] text-slate-400 font-bold tracking-widest uppercase">
341+
<div className="mb-3 mt-0">
342+
{[...statGroup1, ...statGroup2].map((row, i) => (
343+
<div key={row.label} className="flex items-center border-b border-slate-100 py-2.5" style={(i === 0 || i === 1 || i === statGroup1.length) ? { marginTop: '8px' } : undefined}>
344+
<span className="flex-1 pl-[18px] text-[11px] text-slate-400 font-bold tracking-widest">
344345
{row.label}
345346
</span>
346347
<div className="flex items-center gap-1.5">

src/components/MemberForm.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ export function MemberForm({ member, onSubmit, onCancel, separateFeetHands = fal
134134
className="flex flex-col flex-1 min-h-0"
135135
>
136136
{/* Scrollable fields */}
137-
<div className="flex-1 overflow-y-auto bg-white px-6 py-5 flex flex-col gap-6">
137+
<div className="flex-1 overflow-y-auto bg-[#F8FAFC] px-6 pt-6 pb-8 flex flex-col gap-6">
138138
{error && (
139139
<div className="bg-red-50 border border-red-200 text-red-600 text-sm font-bold rounded-xl px-4 py-3">
140140
{error}

src/components/NotificationsScreen.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export function NotificationsScreen({ notifications, onUndismiss, onBack }: Prop
2424
<div className="flex flex-col min-h-0 flex-1">
2525
<ScreenHeader title="Dismissed Notifications" onBack={onBack} />
2626

27-
<div className="flex-1 overflow-y-auto bg-white px-6 py-6">
27+
<div className="flex-1 overflow-y-auto bg-[#F8FAFC] px-6 pt-6 pb-8">
2828
{notifications.length === 0 ? (
2929
<p className="empty-state">No dismissed notifications.</p>
3030
) : (

src/components/ResourcesScreen.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export function ResourcesScreen() {
5454
return (
5555
<div className="flex flex-col min-h-0 flex-1">
5656
<ScreenHeader title="Resources" />
57-
<div className="flex-1 overflow-y-auto bg-[#F8FAFC] px-5 pt-8 pb-8 flex flex-col gap-[22px]">
57+
<div className="flex-1 overflow-y-auto bg-[#F8FAFC] px-6 pt-6 pb-8 flex flex-col gap-[22px]">
5858
<h2 className={SECTION_HEADER_CLS} style={{ color: COLOR_PRIMARY }}>
5959
Quick Sizing Reference
6060
</h2>

src/components/SettingsScreen.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export function SettingsScreen({
5252
<div className="flex flex-col min-h-0 flex-1">
5353
<ScreenHeader title="Settings" onBack={onBack} />
5454

55-
<div className="flex-1 overflow-y-auto bg-[#F8FAFC] px-6 py-6 flex flex-col gap-8">
55+
<div className="flex-1 overflow-y-auto bg-[#F8FAFC] px-6 pt-6 pb-8 flex flex-col gap-8">
5656

5757
{/* ── Units ─────────────────────────────────── */}
5858
<section>

src/components/ShoeSizeConverter.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export function ShoeSizeConverter({
6161
<div className="flex flex-col min-h-0 flex-1">
6262
<ScreenHeader title="Size Converter" onBack={onClose} />
6363

64-
<div className="flex-1 overflow-y-auto bg-white px-6 py-5 flex flex-col gap-6">
64+
<div className="flex-1 overflow-y-auto bg-[#F8FAFC] px-6 pt-6 pb-8 flex flex-col gap-6">
6565
{/* Input section */}
6666
<section>
6767
<label className="block text-[10px] font-black text-slate-500 uppercase tracking-widest mb-2">

0 commit comments

Comments
 (0)