Skip to content

feat(reader): add reading comfort controls - #23

Open
oldwinter wants to merge 1 commit into
v5from
happy-hour/reading-comfort
Open

feat(reader): add reading comfort controls#23
oldwinter wants to merge 1 commit into
v5from
happy-hour/reading-comfort

Conversation

@oldwinter

Copy link
Copy Markdown
Owner

Built a compact Aa reading-comfort control for article pages, with 90%, 100%, 110%, and 120% body-text sizes that persist locally and survive Quartz SPA navigation. It is worth merging because it makes long-form reading immediately more comfortable without changing the site's layout, metadata, code blocks, dependencies, or publishing configuration.

Validation

  • npx tsx --test quartz/components/scripts/readingComfort.test.ts quartz/plugins/emitters/componentResources.test.ts quartz/components/renderPage.test.ts - 24/24 passed
  • npx tsc --noEmit - passed
  • Scoped npx prettier --check ... - passed
  • npx quartz build - passed; 314 Markdown inputs emitted 1,911 files
  • Real Chrome QA at 1280px and 320px verified persistence, SPA navigation, keyboard/focus behavior, dark mode, reduced motion, storage failure handling, and cross-tab updates
  • Mobile QA verified a 36px gap between the open panel and article content with zero horizontal overflow
  • Full npm test run: 226/227 passed; the remaining existing theme-switcher test cannot resolve the undeclared jsdom package

Impact

  • Adds one reader action, one small popover, localized labels for English and Simplified/Traditional Chinese, and a reading-comfort local-storage preference
  • Scales only the central article body and headings; metadata, navigation, toolbars, sidebars, code, and page width stay unchanged
  • Adds no dependencies and does not touch content, deployment, CI, configuration, permissions, or infrastructure

Rollback

Revert commit b1cccf1879b729914deac7e3fed77fd3deb27f09. The only persisted state is the harmless reading-comfort local-storage key.

Known baseline warnings

The production build still reports the repository's existing generated-plugin eval warning, one invalid content date, and a Google Fonts HTTP 400 warning for LXGW WenKai.

@oldwinter oldwinter added the enhancement New feature or request label Aug 26, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@netlify

netlify Bot commented Aug 26, 2026

Copy link
Copy Markdown

Deploy Preview for aquamarine-salamander-b041fe failed. Why did it fail? →

Name Link
🔨 Latest commit b1cccf1
🔍 Latest deploy log https://app.netlify.com/projects/aquamarine-salamander-b041fe/deploys/6a8f3606d41f940007ea5b08

@oldwinter

Copy link
Copy Markdown
Owner Author

Blocking review at exact head b1cccf1879b729914deac7e3fed77fd3deb27f09:

  • Direct article H1 headings do not scale: the later .page article > h1 { font-size: 2rem; } wins the equal-specificity cascade.
  • Inline code does scale with the article despite the PR claim that code stays unchanged.
  • ReadingComfort reaches into ReadLater markup/state directly, coupling two controls; DOM/storage/reset/focus behavior is not executed by tests.

Unblock action: rebase onto current v5, fix computed CSS for headings and inline code, decouple sibling disclosure state, and add real computed-style/browser regressions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant