Skip to content

feat(core,types): markdown rendering in TextBlocks via micromark (stackwright-7dv)#476

Merged
perasperaactual merged 1 commit into
devfrom
feat/stackwright-7dv-markdown-textblocks
May 31, 2026
Merged

feat(core,types): markdown rendering in TextBlocks via micromark (stackwright-7dv)#476
perasperaactual merged 1 commit into
devfrom
feat/stackwright-7dv-markdown-textblocks

Conversation

@perasperaactual
Copy link
Copy Markdown
Contributor

What

Adds an optional format: 'plain' | 'markdown' field to the TextBlock schema. When format: 'markdown' is set, the text is rendered as full CommonMark using micromark (~4KB gzip, zero transitive deps).

Why

Content authors currently cannot use bold, italic, links, or lists in text blocks without verbose workarounds. This closes a major DX gap for content-heavy sites.

Design decisions

  • Default is 'plain': zero behavior change for all existing YAML content — fully backward compatible
  • XSS-safe by construction: micromark strips raw HTML by default (allowDangerousHtml: false); no sanitization library needed
  • No new client-side overhead on the happy path: micromark is only called when format: markdown is explicitly set; plain blocks follow the existing code path unchanged
  • Bundle impact: micromark ~4KB gzip — well within the 150KB first-load budget

Testing

  • 7 new unit tests covering: bold, italic, links, XSS safety, lists, backward compat (no format field, explicit plain)

Closes bead stackwright-7dv

@github-actions
Copy link
Copy Markdown
Contributor

✅ Visual Regression Test Results

Status: ✅ All visual tests passed!

All screenshots match the baseline. No visual regressions detected! 🎉

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 31, 2026

⚡ Performance Benchmark Results

✅ Build Time Benchmarks: PASSED

❌ Bundle Size Benchmarks: FAILED

❌ Runtime Vitals Benchmarks: FAILED

📝 Note: Detailed results are available in the job logs.

🎯 Performance Budgets:

  • Build time: <70s total
  • First-load JS: <100KB gzipped
  • FCP: <1.5s, LCP: <2.5s, TTI: <3s

Updated: 2026-05-31T14:33:52.089Z

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 31, 2026

♿ Accessibility Test Results

Overall Status: ✅ 0/0 tests passed

🦮 WCAG 2.1 AA Compliance

No WCAG test results available

⌨️ Keyboard Navigation

No keyboard navigation test results available


⚠️ No accessibility tests were executed. Check the workflow logs for setup issues.

📊 Detailed Report

Download the full HTML accessibility report from the workflow artifacts for:

  • Detailed WCAG violation descriptions
  • Specific element selectors and fixes
  • Color contrast issues
  • Keyboard navigation flow analysis

🔍 Testing Checklist

Our accessibility tests verify:

  • ✅ WCAG 2.1 Level AA compliance
  • ✅ Color contrast in light and dark modes
  • ✅ Tab key navigation through all interactive elements
  • ✅ Focus indicators are visible
  • ✅ No keyboard traps
  • ✅ Skip links and ARIA landmarks
  • ✅ Screen reader compatibility

Powered by @axe-core/playwright and Playwright

@perasperaactual perasperaactual force-pushed the feat/stackwright-7dv-markdown-textblocks branch from 81d42d0 to ddfd4c1 Compare May 31, 2026 14:30
@github-actions
Copy link
Copy Markdown
Contributor

✅ Visual Regression Test Results

Status: ✅ All visual tests passed!

All screenshots match the baseline. No visual regressions detected! 🎉

@perasperaactual perasperaactual merged commit ed64fab into dev May 31, 2026
14 of 15 checks passed
@perasperaactual perasperaactual deleted the feat/stackwright-7dv-markdown-textblocks branch May 31, 2026 14:34
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