Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
0d895cc to
0437ab7
Compare
0437ab7 to
6bf17a2
Compare
Summary: Load the optional KaTeX stylesheet together with the engine after mount instead of exposing an untyped static CSS side-effect import to source-mapped consumers. Keep display expressions separated with adapter-owned block rhythm. Test Plan: - pnpm exec vitest run packages/core/src/Markdown/katex/MarkdownKaTeX.test.tsx packages/core/src/Markdown/katex/MarkdownKaTeX.integration.test.tsx --root . - pnpm --filter @astryxdesign/core typecheck - pnpm --filter @astryxdesign/storybook typecheck - pnpm --filter @astryxdesign/storybook build
6bf17a2 to
5f0d5eb
Compare
|
@cixzhang — I’d appreciate your feedback on this draft. Focus: Consumers can typecheck and server-render the optional KaTeX adapter without resolving its stylesheet eagerly, while displayed equations retain readable block rhythm after loading. This is PR 18/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
left a comment
There was a problem hiding this comment.
This changes two observable behaviours, deferred KaTeX stylesheet loading and display-math spacing, but adds no regression test. The current tests remain green if either the dynamic CSS import or marginBlock is removed. Please add focused evidence that the stylesheet stays out of the eager path and loads with the renderer, plus a StyleX declaration assertion for block versus inline spacing.
PR Analysis Report
Modified ComponentsOutline (@astryxdesign/core)
Bundle Size Summary
Accessibility AuditStatus: No accessibility violations detected. Visual Regression3 of 422 shot(s) changed. View the report A change here is a question, not a failure: check whether the after is the
Generated by PR Enrichment workflow | View full report |









User impact
Consumers can typecheck and server-render the optional KaTeX adapter without resolving its stylesheet eagerly, while displayed equations retain readable block rhythm after loading.
Problem and solution fit
A top-level stylesheet side-effect crossed the optional adapter's import boundary and failed source-mapped consumer typechecks before the renderer mounted. Moving CSS beside the lazy engine import restores the boundary; the adapter also owns its display-math spacing.
Expected behavior and authority
AST-039's lazy optional-peer boundary and the Markdown math-renderer fallback contract. Pinned source.
Smallest restoration
Load KaTeX CSS and the engine together after mount, add the package-local CSS declaration, and give block output token-based vertical rhythm. SSR/loading/failure still preserve source.
Evidence
Real-browser evidence
Measured block margin: 0px before → 16px after; SSR/loading/failure still retain delimiter-bearing source.
Scope
Testing
pnpm exec vitest run packages/core/src/Markdown packages/core/src/CodeBlock— 37 files, 760 tests.pnpm --filter @astryxdesign/core typecheck.pnpm check:repo.Stack
Previous: #6672 · Next: #6674 · Each PR is intentionally one commit and one primary intent.