Skip to content

feat(web): rework page editor typography and alignment (0198) - #169

Merged
crs48 merged 3 commits into
mainfrom
claude/notion-grade-page-typography
Jun 17, 2026
Merged

feat(web): rework page editor typography and alignment (0198)#169
crs48 merged 3 commits into
mainfrom
claude/notion-grade-page-typography

Conversation

@crs48

@crs48 crs48 commented Jun 17, 2026

Copy link
Copy Markdown
Owner

Summary

Reworks the page document editor's typography to be clean and aligned, in line with Notion/Obsidian — the implementation of exploration 0198.

Before, the page's spacing came from three uncoordinated layers stacking on .ProseMirror (editor.css base, globals.css .page-prose, and inline Tailwind gutter utilities), with equal-specificity rules fighting one another. Rendering a kitchen-sink page and measuring it showed four different left edges at the same nesting level (paragraph 56px, blockquote 76px, bullet/ordered 80px, to-do 104px), an off-center text column (56px left / 28px right), asymmetric vertical rhythm, and a title/H1 with no hierarchy (36/700 vs 30/700).

This consolidates all page typography into one rhythm system in apps/web/src/styles/globals.css .page-prose, driven by em-based --prose-* tokens.

What changed

  • Symmetric gutter.ProseMirror padding is now 32px / 32px (was pl-8 / pr-1), centering the measure. The left half still serves as the drag-handle gutter, so no DragHandle change was needed.
  • One rhythm — a single 0.75em flow unit between blocks (lobotomized owl), "space precedes" heading margins, and a consistent one-step list indent.
  • To-do alignment — task lists reset the inherited list indent (the +24px bug from the .page-prose ul / taskList pl-0 specificity tie) and size checkbox + gap to one indent step, so to-do text shares the bullet text edge. The checkbox is centered on the first line with the lh unit, not a magic pixel offset.
  • Blockquote text aligns to the list-content edge.
  • Hierarchy — title bumped to 40px so it outranks the 30px H1.

Scoped to the page surface (.page-prose), so canvas-inline / compact editor surfaces are untouched. No !important; wins via specificity.

Verified live (measured in the running app)

Check Before After
Bullet / ordered / to-do / blockquote text left 80 / 80 / 104 / 76 80.8 / 80.8 / 80.8 / 80.8
.ProseMirror padding L / R 32 / 4 32 / 32
Paragraph margin (top / bottom) 4 / 16 12 / 0
Checkbox center − line center −3.4px* 0.0px
Title vs H1 36 / 30 40 / 30

typecheck green (turbo 85/85), eslint clean, no console errors.

Changelog

  • Improved: Page editor typography — cleaner Notion/Obsidian-style margins, list indentation, bullets, and checklist alignment. Body text, bullets, numbered lists, to-dos, and blockquotes now share one left edge; the text column is centered; checkboxes sit centered on their first line; and the page title now clearly outranks H1.

Notes / deferred

  • Built app-centric (in globals.css/PageView.tsx) rather than a new editor-package prose.css, because editor.css only reaches the app via the built dist/react.css and editing it would also move shared canvas/compact surfaces. Extracting a reusable :where()-scoped prose.css and reconciling the base square-checkbox CSS are deferred.
  • A permanent kitchen-sink Storybook fixture + scripts/visuals baseline are deferred; the visuals pipeline still auto-captures the changed page surface per PR.

🤖 Generated with Claude Code

xNet Test and others added 3 commits June 17, 2026 16:07
…ignment

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Replace the page document's ad-hoc, three-source typography with one
rhythm system in .page-prose (apps/web globals.css):

- Symmetric horizontal padding centres the measure (was 56px left /
  28px right off-centre); the left half stays the drag-handle gutter.
- One em-based flow unit between blocks; space-precedes heading
  margins; consistent one-step list indent.
- To-do lists reset the inherited list indent (the +24px bug from the
  equal-specificity .page-prose ul / taskList pl-0 tie) and size
  checkbox+gap to one indent step, so to-do text shares the bullet
  text edge. The checkbox is centred on the first line with the lh
  unit, not a magic pixel offset.
- Blockquote text aligns to the list-content edge.
- Title bumped to 40px so it outranks the 30px H1.

Verified live: paragraph/bullet/ordered/to-do/blockquote text all share
one left edge; column centred; checkbox offset 0px. Scoped to the page
surface, so canvas/compact editor surfaces are unaffected.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@crs48
crs48 temporarily deployed to pr-169 June 17, 2026 23:42 — with GitHub Actions Inactive
@github-actions

Copy link
Copy Markdown
Contributor

🖼️ UI changes in this PR

No visual differences detected in the changed UI.

CI run

github-actions Bot added a commit that referenced this pull request Jun 17, 2026
@github-actions

github-actions Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Preview removed for PR #169.

github-actions Bot added a commit that referenced this pull request Jun 17, 2026
@crs48
crs48 merged commit 5f36a1c into main Jun 17, 2026
12 checks passed
@crs48
crs48 deleted the claude/notion-grade-page-typography branch June 17, 2026 23:50
github-actions Bot added a commit that referenced this pull request Jun 17, 2026
crs48 added a commit that referenced this pull request Jun 18, 2026
## What

Backfills the changelog so it reflects what's live on `main`. The per-PR
fragment system (exploration 0197) was current through PR #163 (PR #178
backfilled #151/#153/#156/#157/#160/#163), but the recent **0198/0199
batch** and a couple of stragglers shipped without entries. This adds 7
fragments, with prose lifted from each PR's own `## Changelog` block
where present.

| PR | Entry | Tags |
|---|---|---|
| #143 | AI chat that knows your workspace | `ai` |
| #167 | Linear-grade Tasks | `tasks` `app` |
| #169 | Cleaner page editor typography | `editor` |
| #170 | Bring your Slack data into xNet | `plugins` `platform` |
| #171 | Smoother, more consistent motion | `app` |
| #173 | Airtable-grade database grids | `app` |
| #174 | A redesigned chat & channels experience | `app` |

## Deliberately excluded

- **In-editor AI (#154 / #158)** — shipped the transform engine +
diff/approval logic, but both PRs state the `/ai` UI wiring into the
running app is **deferred**, so it isn't user-visible yet. An entry
would overclaim.
- **Slack (#170)** — entry scoped to the migration connector +
compatibility layer (genuinely live); avoids claiming the
webhook/slash-command hub endpoints work, since they're
generic-over-an-injected-sink and not mounted in a running server yet.
- Pure infra/ops/docs PRs (cloud M1/M2, CI, runbooks) — not user-facing.

## Verification

- `validate-changelog.ts` → **26 fragments valid** (19 existing + 7 new)
- `prettier --check` on all new files → clean
- Newest-first ordering confirmed — the 7 entries slot in at the top

## Changelog

<!-- This PR only adds changelog fragments for already-merged work; it
ships no user-facing change of its own. -->

🤖 Generated with [Claude Code](https://claude.com/claude-code)
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.

1 participant