Skip to content

fix(ui): pull the Markdown heading ladder back to 1.5x the body - #410

Merged
zhangfand merged 1 commit into
mainfrom
fix/markdown-heading-ladder
Sep 17, 2026
Merged

zhangfand merged 1 commit into
mainfrom
fix/markdown-heading-ladder

Conversation

@zhangfand

Copy link
Copy Markdown
Contributor

What this PR does

The rhythm retune in #402 opened the standard heading ladder to 16 → 20 → 24 → 30 so each level stepped by at least 1.2. Read in a chat reply, that ladder is too tall: an h1 at 1.9× the body and an h2 at 1.5× read as page titles, and a reply that opens with ## looks like a document rather than a turn.

The standard ladder now climbs 16 → 18 → 20 → 24 and tops out at 1.5× the body. Line boxes stay on the 4px grid: 24, 24, 28, 32. Weight stays at 600, and every heading keeps its space-before and space-after from #402, so the proximity rule still holds. Compact density is unchanged at 14 → 16 → 18 → 22, which is the same ladder shape one step down.

The third rule in the MARKDOWN TOKENS comment now says why the ladder stops where it does: prose here is a turn in a conversation, not a page with a title. The rules panel on /dev/markdown-rhythm says the same.

Design & Invariants

  • A Markdown heading never exceeds 1.5× the body size at standard density. Hierarchy between levels comes from size and space; weight stays flat at 600.
  • markdown-tokens.test.ts pins the new sizes and line heights. The proximity and edged-block ratios it asserts are untouched.

Test plan

  • pnpm typecheck
  • pnpm --filter @rome-os/ui test (675 passed) and pnpm --filter rome-web test (1487 passed)
  • /dev/markdown-rhythm under pnpm start:web:mock: computed sizes read back as h2 20/28, h3 18/24, h4 16/24 at standard, compact unchanged
  • A real long reply on /chat against a running backend

🤖 Generated with Claude Code

The 16/20/24/30 ladder from the rhythm retune put an h1 at 1.9x the body,
which reads as a page title inside a chat turn. The ladder now climbs
16/18/20/24 and tops out at 1.5x the body; line boxes stay on the 4px grid.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

@zoolsher zoolsher left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review: ✅ APPROVE

This PR pulls the standard-density Markdown heading ladder back from 16 → 20 → 24 → 30 (topping out at ~1.9× body) to 16 → 18 → 20 → 24, capping h1 at exactly 1.5× the body so a chat reply reads as a conversational turn rather than a titled page. Three files change in lockstep: the --markdown-heading-* tokens in styles.css, the pinned expectations in markdown-tokens.test.ts, and the rules-panel copy in MarkdownRhythmPage.tsx.\n\nI verified the numbers end-to-end. New line boxes (32/28/24/24 for h1–h4) all land on the 4px grid, every referenced font-size/line-height token exists in the scale, weight stays at 600, and the space-before/space-after tokens are untouched so the proximity assertions (before ≥ 1.5×gap, before/after ≥ 2.5) still pass. Compact density is genuinely unchanged. The removed "steps by ≥1.2" claim was correctly dropped from both the comment and the dev-page copy since the new steps are smaller. A repo-wide grep found no stale references to the old ladder. Clean change, no findings.

Verdict: APPROVE — A self-consistent, well-tested design-token retune of the Markdown heading ladder with matching test and dev-page updates; no bugs or design issues found.

No issues found. Code looks good!


Automated review by RomeOS Code Review · commit 6e6e332

@zhangfand
zhangfand merged commit 3a8b183 into main Sep 17, 2026
13 checks passed
@zhangfand
zhangfand deleted the fix/markdown-heading-ladder branch September 17, 2026 02:03
@github-actions github-actions Bot mentioned this pull request Sep 17, 2026
zhangfand pushed a commit that referenced this pull request Sep 18, 2026
🤖 I have created a release *beep* *boop*
---


<details><summary>app-runtime: 0.6.6</summary>

##
[0.6.6](app-runtime-v0.6.5...app-runtime-v0.6.6)
(2026-09-17)


### Features

* unify channel pairing with Activity approvals
([#298](#298))
([78b085a](78b085a))
</details>

<details><summary>rome-web-components: 0.1.18</summary>

##
[0.1.18](rome-web-components-v0.1.17...rome-web-components-v0.1.18)
(2026-09-17)


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @rome-os/ui bumped to 0.3.2
</details>

<details><summary>ui: 0.3.2</summary>

##
[0.3.2](ui-v0.3.1...ui-v0.3.2)
(2026-09-17)


### Features

* **web:** isolate pairing views and add Storybook previews
([#353](#353))
([3595492](3595492))


### Bug Fixes

* **ui:** pull the Markdown heading ladder back to 1.5x the body
([#410](#410))
([3a8b183](3a8b183))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants