Skip to content

docs(Markdown): add optional renderer story - #6675

Closed
ernestt wants to merge 2 commits into
markdown-upgrade/19-semantic-fence-spacingfrom
markdown-upgrade/20-optional-renderer-story
Closed

ernestt wants to merge 2 commits into
markdown-upgrade/19-semantic-fence-spacingfrom
markdown-upgrade/20-optional-renderer-story

Conversation

@ernestt

@ernestt ernestt commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Reader impact

Contributors can exercise document presentation, permalinks, footnotes, KaTeX, Mermaid, ANSI, and Shiki together in one maintained Storybook scenario.

Source of truth

The shipped Core Markdown APIs and AST-039 integration contracts. Pinned source.

Correction

Add an Optional renderers Storybook story with play assertions for all four async adapters and the surrounding document features.

Evidence

Real-browser evidence

Integrated optional renderers before and after

Integrated optional renderers in dark mode

Integrated optional renderers at 390 pixels

The final state was also checked at 1200px and 390px, in light and dark modes, with no root horizontal overflow.

Scope

  • This PR changes documentation and its maintained Storybook example only.
  • Runtime, API, visual-policy, and unrelated changes were split out.
  • Public text and artifacts contain no internal context.

Testing

  • Focused: Storybook typecheck, production build, play assertions, light/dark modes, 1200px and 390px real-browser checks, and zero root overflow.
  • Stack head: pnpm exec vitest run packages/core/src/Markdown packages/core/src/CodeBlock — 37 files, 760 tests.
  • Stack head: pnpm --filter @astryxdesign/core typecheck.
  • Repository checks: pnpm check:repo.

Stack

Previous: #6674 · Each PR is intentionally one commit and one primary intent.

@vercel

vercel Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Sep 26, 2026 3:43pm UTC

Request Review

@ernestt
ernestt force-pushed the markdown-upgrade/20-optional-renderer-story branch from f910d09 to 3ae989a Compare September 26, 2026 15:04
@astracat-bot

astracat-bot Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
📝 Draft — not reviewed automatically (for maintainers only) Oct 5, 2026, 11:35 PM UTC

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Sep 26, 2026
@ernestt
ernestt force-pushed the markdown-upgrade/20-optional-renderer-story branch from 3ae989a to d1d9f0f Compare September 26, 2026 15:10
@ernestt
ernestt force-pushed the markdown-upgrade/20-optional-renderer-story branch from d1d9f0f to 0eb936a Compare September 26, 2026 15:25
Ernest Tien added 2 commits September 26, 2026 08:37
Summary:
Keep Markdown’s existing code-block wrapper, density rhythm, max-width, alignment, and first/last edge handling when a semantic fence renderer replaces the ordinary CodeBlock. Keep the fallback inside that same wrapper so loading and failure do not shift layout.

Test Plan:
- pnpm exec vitest run packages/core/src/Markdown/plugins/semanticFence.test.tsx packages/core/src/Markdown/ansi/ansi.test.tsx packages/core/src/Markdown/mermaid/mermaid.test.tsx packages/core/src/Markdown/shiki/shiki.test.tsx --root .
- pnpm --filter @astryxdesign/core typecheck
Summary:
Add one integrated Storybook state for document presentation, heading permalinks, footnotes, KaTeX, Mermaid, ANSI, and Shiki. Assert that each lazy renderer resolves and the navigation affordances remain present.

Test Plan:
- pnpm --filter @astryxdesign/storybook typecheck
- pnpm --filter @astryxdesign/storybook build
- Playwright visual inspection at 1200px and 390px in light mode and 1200px in dark mode
@ernestt

ernestt commented Sep 26, 2026

Copy link
Copy Markdown
Contributor Author

@cixzhang — I’d appreciate your feedback on this draft.

Focus: Contributors can exercise document presentation, permalinks, footnotes, KaTeX, Mermaid, ANSI, and Shiki together in one maintained Storybook scenario.

This is PR 20/20 in the linked Markdown stack. It is intentionally one commit and one primary intent; the description includes matched before/after screenshots and previous/next links, so you can review just this PR’s delta.

@humbertovirtudes humbertovirtudes 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.

Two changes are needed before this story is reliable and scoped. The Shiki wait accepts the ordinary CodeBlock tokenizer’s .astryx-token-keyword, so it can pass without Shiki completing; please assert output unique to the Shiki result. This PR also adds 15 screenshots under earlier PR IDs (#6656 through #6674). Please move those assets to their owning changes or remove them, retaining only the #6675 evidence needed here.

@github-actions

Copy link
Copy Markdown
Contributor

PR Analysis Report

Preview availability: Storybook and Sandbox are not both ready on the exact-head Vercel preview. CI concluded failure.

Modified Components

Outline (@astryxdesign/core)
Metric Before After Delta
Bundle Size (ESM) N/A N/A N/A
Lines of Code N/A 719 -
Complexity N/A High (28) -

Bundle Size Summary

Package Size (ESM) Size (CJS) Gzipped
@astryxdesign/core N/A 4.9KB 1.2KB

Accessibility Audit

Status: No accessibility violations detected.

Visual Regression

3 of 422 shot(s) changed.

A change here is a question, not a failure: check whether the after is the
picture you intended. Record that review on the PR. Baseline maintenance is an
explicit dispatch of CI; this report never rewrites the baseline or adds a release gate.

component story theme mode pixels
Markdown Default probe dark 29,661
Markdown Default probe light 29,652
SideNav Resizable in AppShell probe dark 3,208

Generated by PR Enrichment workflow | View full report

@ernestt ernestt closed this Oct 9, 2026
@github-actions
github-actions Bot deleted the markdown-upgrade/20-optional-renderer-story branch October 10, 2026 06:22

This branch was successfully deployed

1 active deployment
Preview — 729954e4 Deployed Sep 26, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants