Skip to content

Commit 0e420fa

Browse files
committed
Redesign the app as a phone-style flow for 18-30 year olds
Welcome, About you, Scan and Results as separate screens with a progress bar and working back gesture. Dark theme with one lime accent, chips and goal cards instead of dropdowns, goal and diet asked before the scan, a body-fat gauge with ACE bands, and results split into Overview, Your plan and Details tabs. app.js keeps every element id it depends on; the flow lives in js/ui.js. Fixes two bugs found while verifying: the screen router also hid <body>, which carries data-screen, blanking the page on the first tap; and screens faded in from opacity 0, so paused animations left them invisible.
1 parent 3971170 commit 0e420fa

6 files changed

Lines changed: 1066 additions & 523 deletions

File tree

‎app/README.md‎

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,42 @@ the right answer (waist &minus;0.1 cm, hip &minus;0.5, chest &minus;3.8, thigh +
5555
Open `/selftest.html` to watch the browser reproduce Python's numbers on a known
5656
input.
5757

58+
## Design
59+
60+
Built for **18–30 year olds** — people who live in Strava, Whoop and Cal AI, not in lab
61+
reports. So it behaves like a phone app rather than a scrolling report:
62+
63+
**Welcome → About you → Scan → Results**, one screen at a time, with a three-segment
64+
progress bar and the phone's back gesture wired to history.
65+
66+
- **Dark, one electric accent.** Lime `#CCFF3F` for anything actionable, violet for
67+
muscle, sky/amber/coral reserved for the macro split and body-fat bands.
68+
- **Tap, don't type.** Sex, goal, activity and diet are chips and cards. They write
69+
hidden `<select>`s and fire real `input`/`change` events, so `app.js` is unchanged —
70+
the redesign lives in `index.html`, `styles.css` and `js/ui.js`.
71+
- **Goal and diet are asked up front.** The plan is personalised before the scan, so
72+
the result lands with a plan already attached instead of a form to fill in afterwards.
73+
- **A gauge, not a number.** Body fat sits on a semicircle split into the ACE
74+
categories for your sex, with a plain-language line under it. The top band reads
75+
"Higher", not the clinical term — the plan below is what actually helps.
76+
- **Results in tabs.** Overview (muscle, breakdown, 12-week before/after), Your plan
77+
(calorie target with a macro bar, training week and meals as cards) and Details
78+
(measurements, accuracy and known limits).
79+
80+
Every element id `app.js` depends on is preserved; a check confirms none are missing
81+
or duplicated.
82+
83+
**Two bugs the redesign introduced, both caught before shipping — and both had
84+
correct content that simply never appeared on screen:**
85+
86+
- The screen router hid every element carrying `data-screen`. `<body>` carries it
87+
too (the CSS keys off it), so the first tap on *Start my scan* hid the entire
88+
page. Every DOM check still passed; only hit-testing (`elementFromPoint`
89+
returning `<html>` everywhere) exposed it. The selector is now `.screen[data-screen]`.
90+
- Screens faded in from `opacity: 0`. When the browser paused animations, a screen
91+
stayed invisible — on a phone in battery saver, a blank result. Screens now slide
92+
in without fading.
93+
5894
## Why a web app
5995

6096
It runs on any phone from a link, which is the whole point for a demo — no store

0 commit comments

Comments
 (0)