Release v1.2.0: complete visual redesign

Rebuilt design system (one type scale, neutral surface ramp, hairline
separators), a 77-icon hand-drawn set replacing every emoji in the UI,
grouped routine-icon picker with the old emoji mapped forward, new tab
bar with a raised Start/Resume button, and a reorganised Home.

Chart fixes that came out of it: axis labels, gridlines and the target
line were painted with colour variables the new sheet no longer defines
and fell back to black-on-black; the hover readout is now placed from
its measured size so it can't be clipped at the edges, and it clears
when the pointer leaves the chart.
This commit is contained in:
Duarte Santos committed 2026-07-23 11:55:52 +02:00
1 parent fc36476a5f
commit b28a58930c
37 files changed
+2168 -1061

No files matched your search

+1 -1
View File
@@ -35,4 +35,4 @@ export function weekKey(d) {
export const localTZ = () => { try { return Intl.DateTimeFormat().resolvedOptions().timeZone || 'UTC' } catch { return 'UTC' } }
export const uid = () => Date.now().toString(36) + Math.random().toString(36).slice(2, 7)
export const ACCENTS = { lime: '#a3e635', sky: '#38bdf8', orange: '#fb923c', violet: '#a78bfa', pink: '#f472b6', red: '#f87171', teal: '#2dd4bf', gold: '#fbbf24' }
export const ACCENTS = { lime: '#30d158', sky: '#0a84ff', orange: '#ff9f0a', violet: '#bf5af2', pink: '#ff375f', red: '#ff453a', teal: '#40c8e0', gold: '#ffd60a' }
+49
View File
@@ -0,0 +1,49 @@
// Routine glyphs.
//
// Routines used to store a literal emoji in `r.emoji` ('💪', '🦵', …). The
// redesign stores an icon key instead, but the field keeps its name so existing
// synced state stays readable by both builds — no migration, no lost routines.
//
// glyphOf() accepts either form: a known icon key passes through, a legacy emoji
// is mapped, and anything unrecognised falls back to the default.
import { ICON_NAMES } from '../components/Icon.jsx'
export const DEFAULT_GLYPH = 'figureStrength'
// The picker offers glyphs that describe a TRAINING DAY — the split, the kit, or
// the kind of session. The first version offered trophy/medal/crown/flag/star,
// which say how a workout went, not what it is; nobody names a routine "crown".
// Grouped, because 20 loose icons is a wall — you scan the group first.
export const GLYPH_GROUPS = [
{ key: 'Strength', items: ['figureStrength', 'arm', 'abs', 'legs', 'pullup'] },
{ key: 'Equipment', items: ['dumbbell', 'barbell', 'kettlebell', 'plate', 'machine'] },
{ key: 'Cardio', items: ['figureRun', 'bike', 'swim', 'boxing', 'timer'] },
{ key: 'Recovery', items: ['stretch', 'moon', 'heart', 'flame', 'bolt'] },
]
export const GLYPHS = GLYPH_GROUPS.flatMap(g => g.items)
// Legacy emoji → icon key, so routines created before the redesign keep a
// sensible glyph instead of all collapsing onto the default.
const LEGACY = {
'💪': 'arm', '🦾': 'arm', '🫸': 'figureStrength', '🫷': 'pullup',
'🏋️': 'dumbbell', '🏋': 'dumbbell', '🏋️‍♀️': 'dumbbell',
'🦵': 'legs', '🍑': 'legs',
'🔥': 'flame', '⚡': 'bolt', '💥': 'bolt', '🧨': 'bolt', '😤': 'flame',
'🏃': 'figureRun', '🏃‍♀️': 'figureRun', '🚴': 'bike', '🏊': 'swim',
'🤸': 'stretch', '🧘': 'stretch', '🧘‍♀️': 'stretch',
'🥊': 'boxing', '🧗': 'pullup', '⛰️': 'figureRun', '🏔️': 'figureRun', '🚀': 'bolt',
'🎯': 'target', '🏆': 'trophy', '🥇': 'medal', '⭐': 'star', '🌟': 'star',
'👑': 'crown', '🛡️': 'shield', '⚔️': 'shield', '❤️‍🔥': 'heart',
'🦍': 'kettlebell', '🐂': 'barbell', '🐻': 'kettlebell', '🦁': 'boxing',
'🐺': 'figureRun', '🦈': 'swim', '🤖': 'machine',
}
export function glyphOf(v) {
if (!v) return DEFAULT_GLYPH
if (ICON_NAMES.includes(v)) return v
if (LEGACY[v]) return LEGACY[v]
// strip variation selectors / ZWJ sequences and retry the base emoji
const base = [...v].filter(c => c !== '️' && c !== '‍')[0]
return LEGACY[base] || DEFAULT_GLYPH
}