mirror of
https://github.com/dong-nz/cv.git
synced 2026-11-22 16:10:40 +07:00
feat(experience): timeline status + career-break nodes, TLDR terminal node, prose measures
Timeline structure
- Spine drawn per node (.timeline-entry::before) instead of one line on .timeline, so it ends at
the TLDR diamond; marker and spine centres coincide at x=6 (gutter 36 desktop / 28 mobile)
- TLDR terminal node: markup in ExperiencePage + Experience section, copy in i18n/strings.ts
(experience.tldr / experience.tldrText), CSS .timeline-tldr* (stub, accent link, hollow
diamond, chip, text)
- ExperienceEntry gains variant?: 'current' | 'gap'; the class is composed in JSX rather than
hard-coding entry ids
Node decoration
- current node: TLDR-family panel (--bg-surface, 1px --border, radius-lg, whisper shadow) with a
2px accent left edge, real entry padding (16/18/20, mobile 14/16/18) and a pulsing marker;
mobile pulse capped at 6px spread so the ring never touches the panel border
- gap node: dashed spine (repeating-linear-gradient), 10px muted marker, no divider,
italic-muted title and company
Data
- New relax-gap entry (Aug 2026 – Oct 2026) between open-to-work and lazada-senior-swe; unique
entry ids; Nexts and SAP bullets aligned across VI/EN
Typography
- Add --measure-page (680px); .prose-wide / .lede-wide; .page-body 700 -> 680; philosophy grid
3 columns, 2 at <=1024px
Cleanup
- Achievements dropped from the SPA timeline and their dead .achievement* rules deleted
(.achievement-metric kept: projects pages still use it)
Resume generator
- "${exp.achievements?.map(...).join('')}" short-circuited the whole chain and printed the
literal "undefined" in every PDF once an entry had no achievements; now (exp.achievements ?? [])
Docs: spec-ui-experience.md, spec-v3-typography.md, AGENTS.md
Verified: tsc -b clean; vite build green; oxlint 11 errors / 9 warnings (HEAD baseline was 15/9 —
the four that disappeared were the achievements markup findings); pnpm build:resume-all renders
both PDFs with the new ordering and no "undefined".
This commit is contained in:
1 parent
d172843738
commit
166eb171b5
14 files changed
+609
-342
No files matched your search
@@ -46,7 +46,7 @@ Reading bands used: 45-75 characters (Bringhurst), 38-80 (Butterick). Before: 11
|
||||
## 3. Decisions
|
||||
|
||||
1. **Font: admit `system-ui`.** `--sans` becomes `system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif`. No webfont is loaded; the Source Sans 3 woff2 files stay in `public/fonts/` because `scripts/generate-resume.ts` reads them from disk for the PDF. (User's call: keep the current look rather than restyle the whole site.)
|
||||
2. **Five scale tokens** in `:root`: `--text-body: 18px`, `--text-lede: 20px`, `--text-meta: 15px`, `--leading-body: 1.65`, `--measure-prose: 600px`. They live in `:root` only — sizes do not differ between dark and light, so they are not duplicated in the light block or the media bridge.
|
||||
2. **Scale tokens** in `:root`: `--text-body: 18px`, `--text-lede: 20px`, `--text-meta: 15px`, `--leading-body: 1.65`, `--measure-prose: 600px`, `--measure-page: 680px` (added in the second pass, §3.10). They live in `:root` only — sizes do not differ between dark and light, so they are not duplicated in the light block or the media bridge.
|
||||
3. **Reuse `.prose`** (`App.css`, previously defined and never rendered by any component) as the prose system instead of inventing a second convention.
|
||||
4. **Role sizes.** Body copy 18px/1.65 everywhere a paragraph is the main content; lead paragraphs 20px/1.55; dense secondary copy (timeline bullets, achievement context and impact, expertise skill lists, card summaries, contact sub-labels) 15px/1.65. Literal 12-14px stays reserved for chrome: `.tag`, `.badge`, `.achievement-metric`, `.footer-text`, `.footer-link`, `.timeline-duration`, `.project-card-cta`, `.lang-toggle`, `pre`.
|
||||
5. **Heading sizes**: `h3` 24 → **21px**, and `h4` 18 / `h5` 16 / `h6` 15 made explicit (they previously fell back to 16px). `h1`/`h2` clamps and the global `h1-h6 { line-height: 1.2 }` are untouched.
|
||||
@@ -54,12 +54,14 @@ Reading bands used: 45-75 characters (Bringhurst), 38-80 (Butterick). Before: 11
|
||||
7. **Headings carry their own top margin** (`.subheading { margin-top: 32px }`, `.prose h3 { margin-top: 1.5em }`, `.philosophy-quote h3 { margin-top: 0 }`); lead paragraphs carry no bottom margin. Sibling margins collapse, so each gap is a single value rather than a sum.
|
||||
8. **No inline `fontSize` / `lineHeight` / `fontWeight` / text `color` in components.** Layout-only inline styles (`flex`, `gap`, motion `style={{y}}`) are allowed.
|
||||
9. **Delete dead CSS and the unused `Card` component** rather than leaving unstyled scaffolding behind (list in §4.2).
|
||||
10. **Second pass (user feedback, 2026-10-16): two measures instead of one.** 600px read too small on `/philosophy`, and on `/about` the 600px lede sat above a wider grid — the ragged right edge looked like a defect rather than a measure. `--measure-page: 680px` now governs page columns (`.page-body`, `.prose-wide`, `.lede-wide`); `--measure-prose: 600px` stays for long-form narrative (`.prose` on `/projects/:id`). A wider column is paid for with a larger body, not a longer line: `.prose-wide p` uses `--text-lede` 20px / 1.6 → 79 characters per line (still inside the 45-80 band), where 680px at 18px would be 88.
|
||||
11. **`/about` §1 and the homepage About section move to `container-wide`** with `.philosophy-grid` at `repeat(3, 1fr)` — the same column model as `.expertise-grid` (3 → 2 at ≤1024px → 1 at ≤768px) — so both halves of `/about` carry equal weight. The `.page-body` wrapper is gone from both (the bio, subheadings and grids are direct children of the section); the bio uses `.prose-lede lede-wide` and stays at 680px. `profile.philosophy` has 5 cards → rows of 3 + 2.
|
||||
|
||||
## 4. Implementation details
|
||||
|
||||
### 4.1 `src/index.css`
|
||||
|
||||
- `:root` token block: `--max-narrow` deleted; added the five scale tokens after `--max-content`.
|
||||
- `:root` token block: `--max-narrow` deleted; the scale tokens added after `--max-content` (five in the first pass, `--measure-page` in the second).
|
||||
- `--sans` → system stack (finding P5). `--mono` unchanged (it already ends in `ui-monospace, monospace`, so it resolves without a download).
|
||||
- `h3 { font-size: 21px }`; new `h4 { 18px }`, `h5 { 16px }`, `h6 { 15px }`.
|
||||
- `p { font-size: var(--text-body); line-height: var(--leading-body); color: var(--text-secondary); }` — was implicit 16px / 1.7.
|
||||
@@ -79,9 +81,11 @@ Prose system (rewritten in place of the dead `.prose` block):
|
||||
.prose li { margin-bottom: 8px; color: var(--text-secondary); font-size: var(--text-body); line-height: var(--leading-body); }
|
||||
.prose blockquote { …unchanged… }
|
||||
.prose-lede { max-width: var(--measure-prose); font-size: var(--text-lede); line-height: 1.55; }
|
||||
.page-body { max-width: 700px; }
|
||||
.prose-wide { max-width: var(--measure-page); } .prose-wide p { font-size: var(--text-lede); line-height: 1.6; }
|
||||
.lede-wide { max-width: var(--measure-page); } .page-body { max-width: var(--measure-page); }
|
||||
.subheading { margin: 32px 0 12px; }
|
||||
.philosophy-quote + .philosophy-quote { margin-top: 48px; }
|
||||
.philosophy-quote p { text-align: justify; }
|
||||
.philosophy-quote h3 { margin-top: 0; }
|
||||
.project-section { background/border/radius/padding 16px; margin-bottom: 16px; inset highlight; }
|
||||
.project-section h4 { margin-top: 0; } .project-section p { font-size: var(--text-meta); line-height: var(--leading-body); }
|
||||
@@ -114,8 +118,8 @@ Deleted as dead (no component rendered any of them; verified by grepping every c
|
||||
|
||||
| File | Change |
|
||||
|---|---|
|
||||
| `src/pages/PhilosophyPage.tsx` | whole body: `aria-labelledby="philosophy-heading"` matched by `<SectionHeading id="philosophy-heading">`; quotes wrapped in `<div className="prose">` → `<div className="philosophy-quote">` → plain `<h3>` + `<div dangerouslySetInnerHTML>` (no outer `<p>`, so the injected `<p>` blocks are no longer nested); inline styles and the stale "Placeholder for expanded content" comment removed |
|
||||
| `src/pages/AboutPage.tsx`, `src/components/sections/About.tsx` | `maxWidth:'700px'` div → `.page-body`; bio → `.prose-lede`; both `<h3>` → `.subheading` |
|
||||
| `src/pages/PhilosophyPage.tsx` | whole body: `aria-labelledby="philosophy-heading"` matched by `<SectionHeading id="philosophy-heading">`; quotes wrapped in `<div className="prose prose-wide">` → `<div className="philosophy-quote">` → plain `<h3>` + `<div dangerouslySetInnerHTML>` (no outer `<p>`, so the injected `<p>` blocks are no longer nested); inline styles and the stale "Placeholder for expanded content" comment removed |
|
||||
| `src/pages/AboutPage.tsx`, `src/components/sections/About.tsx` | `maxWidth:'700px'` div → `.page-body` (first pass) → wrapper removed entirely (second pass): bio, `.subheading` titles and both grids are direct children of the section; bio → `.prose-lede lede-wide`; `/about` §1 section `container-content` → `container-wide` |
|
||||
| `src/pages/ProjectDetailPage.tsx` | back link → `.back-link`; summary → `.prose-lede`; narrative wrapped in `.prose`; four `marginBottom:'32px'` block wrappers unwound (rhythm now comes from `.prose h3`); four `<h3 style>` → plain `<h3>`; section cards → `.project-section` with plain `<h4>` / `<p>` |
|
||||
| `src/pages/ExperiencePage.tsx`, `src/components/sections/Experience.tsx` | impact div → `.achievement-impact`; metrics wrapper → `.achievement-metrics`; `maxWidth:'700px'` → `.page-body` |
|
||||
| `src/pages/ContactPage.tsx`, `src/components/sections/Contact.tsx` | label divs → `.link-label`; sub-labels → `.contact-link-sub`; `maxWidth:'700px'` → `.page-body` |
|
||||
@@ -127,8 +131,8 @@ Deleted as dead (no component rendered any of them; verified by grepping every c
|
||||
|
||||
| File | Change |
|
||||
|---|---|
|
||||
| `src/index.css` | token block (5 added, `--max-narrow` deleted), `--sans`, `h3`-`h6`, `p`, `.container-narrow` deleted |
|
||||
| `src/App.css` | prose system added/rewritten, 10 selectors retuned, `.download-resume-button` added, ~170 lines of dead CSS deleted |
|
||||
| `src/index.css` | token block (`--max-narrow` deleted, six scale tokens), `--sans`, `h3`-`h6`, `p`, `.container-narrow` deleted |
|
||||
| `src/App.css` | prose system added/rewritten, 10 selectors retuned, `.download-resume-button` added, `.philosophy-grid` 2 → 3 columns + a new ≤1024px breakpoint, ~170 lines of dead CSS deleted |
|
||||
| 8 page/section TSX files | inline type styles → classes (see §4.3) |
|
||||
| `src/components/ui/Card.tsx` | deleted |
|
||||
| `src/components/index.ts` | `Card` export removed |
|
||||
@@ -147,6 +151,11 @@ Deleted as dead (no component rendered any of them; verified by grepping every c
|
||||
- [x] Philosophy page: prose column, paragraph spacing, no nested `<p>`, ARIA id wired
|
||||
- [x] Inline type styles removed from the 8 TSX files — gate `style=\{\{[^}]*(fontSize|lineHeight|fontWeight|color|maxWidth)` over `src/` → 0 matches
|
||||
- [x] `tsc -b` + `vite build` green after the TSX sweep
|
||||
- [x] Second pass: `--measure-page: 680px`, `.prose-wide`, `.lede-wide`, `.page-body` switched to the token
|
||||
- [x] `/philosophy` column 600 → 680px with body 20px/1.6 (79 chars/line, was 78 at 600px/18px)
|
||||
- [x] `/about` §1 → `container-wide`; `.philosophy-grid` 3 columns matching `.expertise-grid`; `.page-body` wrapper removed from About + AboutPage; bio → `.prose-lede lede-wide`
|
||||
- [x] Re-verified: `tsc -b` exit 0, `vite build` green; built CSS carries `.philosophy-grid{grid-template-columns:repeat(3,1fr)}`, the `@media (width<=1024px)` 2-column rule, and `.lede-wide,.page-body{max-width:var(--measure-page)}`
|
||||
- [x] Third pass (user feedback): quote paragraphs justified — `.philosophy-quote p { text-align: justify }` — so the 680px column reads flush on both edges. Column width and measure are unchanged (680px @ 20px = 79 characters per line); only the line-breaking rule changed. `<html lang>` is kept in sync by `useLanguage`, so screen readers and hyphenation follow the active language.
|
||||
- [ ] Manual browser pass (§7) on `/`, `/about`, `/experience`, `/projects`, `/projects/:id`, `/philosophy`, `/contact`, dark and light
|
||||
|
||||
## 7. Verification plan
|
||||
@@ -158,8 +167,8 @@ Deleted as dead (no component rendered any of them; verified by grepping every c
|
||||
|
||||
oxlint against HEAD and against the working tree produce identical diagnostics (15 errors / 9 warnings): every one is pre-existing — oxlint treats the `useField` / `useFieldArray` helpers in `src/i18n/useField.ts` as hooks, plus `Navigation.tsx:26` `set-state-in-effect`. Out of scope here.
|
||||
4. Manual, real browser (no headless, per project rule):
|
||||
- `/philosophy`: three paragraphs visibly separated, ~600px column, 18px body, quote title 21px, no wall of text.
|
||||
- `/about`: bio 20px capped at 600px, section titles 21px, cards unchanged in width.
|
||||
- `/philosophy`: three paragraphs visibly separated, 680px column, 20px body, justified right edge (watch for rivers/loose word spacing), quote title 21px, no wall of text.
|
||||
- `/about`: §1 and §2 the same width (1152px); bio 20px at a 680px column; philosophy cards 3 columns (~368px) matching the expertise cards — 5 cards render 3 + 2.
|
||||
- `/projects/:id`: narrative capped at 600px, section cards keep their box, h4 16px over 15px body.
|
||||
- `/experience`: bullets and impact 15px/1.65, achievement title 18px/1.3.
|
||||
- `/contact`: sub-labels 15px, tile labels 500 weight.
|
||||
@@ -171,7 +180,7 @@ Deleted as dead (no component rendered any of them; verified by grepping every c
|
||||
|---|---|
|
||||
| Body copy 16 → 18px makes every page taller | Only role-defined body copy moved; chrome (tags, badges, pills, footer, timeline meta) kept at 12-14px. Review `/experience` and `/projects` heights. |
|
||||
| Deleting `.form-*`, `.filter-*`, `.article-*`, `.engineering-tabs*`, `.breadcrumb*`, `.page-header`, `.card*` removes scaffolding that `spec-v2-blog.md` and `spec-v3-ui-enhancements.md` plan to use | Those specs keep the design intent; the CSS is re-written when the feature actually ships, together with its markup. Nothing in `src/` referenced them. |
|
||||
| 600px prose column looks narrower than the 752px container | Intentional: 78-83 characters per line instead of 110-118. `.container-content` still sizes the page; `.prose` sizes the reading column inside it. |
|
||||
| A 680px page column inside a 752px / 1152px container leaves whitespace on the right | Intentional: the measure band is 45-80 characters per line, and 680px @ 20px is 79. Widening the text further would need 22px body copy, which flattens the 21px heading scale. Grids and cards use the full container; text does not. On `/philosophy` the visible ragged edge is resolved by justifying the paragraphs instead of widening the column — the cost is looser word spacing / possible rivers on short lines, checked in the manual pass. |
|
||||
| No responsive type scale | Unchanged from before (there was none). 18px on a 320-375px viewport yields 40-50 characters per line, which is comfortable; revisit only if the manual pass says otherwise. |
|
||||
| `.prose li` at body size could look large in dense lists | Only `.prose` lists are affected; `.expertise-skills` and `.timeline-responsibilities` are outside `.prose` and stay at 15px. |
|
||||
|
||||
|
||||
Reference in new issue
Block a user