Skip to content

feat: draw themed tables in PDF export - #67

Open
RichardHightower wants to merge 3 commits into
mainfrom
feat/pdf-tables
Open

RichardHightower wants to merge 3 commits into
mainfrom
feat/pdf-tables

Conversation

@RichardHightower

Copy link
Copy Markdown
Contributor

Summary

PDF export printed each table row as one line of spaced text. It now draws a real table. This closes the v0.6.6 known issue 01M5FSD7MA4Z0KY4ZRWRV0XJZ3.

  • PDF: drawTable in src/lib/exportPdf.ts draws a grid with jsPDF. You get a filled bold header row, striped body rows, cell borders, and text that wraps in each cell. The header row repeats on each new page. No new dependency.
  • Themes: ExportTheme has five new colors: tableHeaderBg, tableHeaderText, tableRowBg, tableRowAltBg, and tableBorder. Ice Snowstorm has a navy header and ice stripes. Clay has a terracotta header and warm stripes.
  • Word and preview: Both use the same five colors. The Word header row repeats across pages.
  • Themes dialog: A Tables group holds the five color fields. The wireframe is wireframes/themes.md.
  • Old themes: A custom theme saved by v0.6.6 has no table keys. It keeps its old look, with no stripes. A bad hex in one table key falls back to the default table color.

Tests

  • Unit: src/lib/export.test.ts. These tests parse the PDF stream for cell fills in row order, row heights with a wrapped cell, the next block below the table, and a header on each page. They also check Word fills in row order and the theme fallbacks. Three mutations of drawTable each fail a test.
  • E2E: e2e/export.spec.ts. The tests check the Clay table preview and the PDF download. They also check that Ice and Clay table fields are disabled, and that a custom theme saves a table color and exports with it.
  • Local bun run verify: typecheck, guard, and 291 unit tests pass. All export E2E tests pass. The full E2E run failed 3 to 5 unrelated tests on each run, and the failing tests changed between runs. A full run on main failed too. These tests are tracked in 01M5FSD7RV6MJ0JZVAT5F3VW3H and 01M5JKR1P3V9VD5TGSFYFXCV6D.

Filed during this work

  • 01M5JJZRM87A0Y5YFFHE8WF2GR: bun tauri build fails at the DMG step.
  • 01M5JKR1P3V9VD5TGSFYFXCV6D: flaky new-note and dataset E2E tests.
  • 01M5JKV9HQZ7X83CD6X1SMP6VV: no script publishes publish-manifest.json to the wiki.

🤖 Generated with Claude Code

RichardHightower and others added 3 commits October 22, 2026 15:16
01M5FSD7MA4Z0KY4ZRWRV0XJZ3

PDF export printed each table row as one line of spaced text. It now
draws a grid with jsPDF: a filled bold header row, striped body rows,
cell borders, and text that wraps in each cell. The header row repeats
on each page that a long table runs onto.

Export themes get five table colors: tableHeaderBg, tableHeaderText,
tableRowBg, tableRowAltBg, and tableBorder. PDF, Word, and the export
preview all use them. Ice Snowstorm has a navy header and ice stripes.
Clay has a terracotta header and warm stripes. The Themes dialog has a
Tables group to edit them. A theme saved before this change keeps its
old table look.

Also files the DMG build failure, the flaky E2E journeys, and the
missing wiki publish step.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
01M5FSD7MA4Z0KY4ZRWRV0XJZ3

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
01M5FSD7MA4Z0KY4ZRWRV0XJZ3

The branch cleanup task stays open. Auto mode blocked the branch deletes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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.

1 participant