fix: make callout blocks visually distinct from code blocks (#204)#213
Conversation
Co-authored-by: Ona <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
✅ UI verification passed — design spec compliance confirmed. Static analysis (code review against
Visual verification (Playwright screenshots): Screenshotted editor and workspace pages at desktop (1280×800) and mobile (375×812) in dark mode. No broken layouts, overlapping elements, or horizontal scroll detected. Mobile touch targets adequate. Responsive behavior correct. Note: The callout left-border styling is DOM-level (Lexical |
|
✅ Post-merge verification passed. E2E suite: 47/52 passed, 2 pre-existing failures, 3 skipped (serial dependents).
Pre-existing failures (not regressions from this PR):
|
Closes #204
What
Callout blocks and code blocks were visually indistinguishable — both used identical
bg-mutedstyling with no differentiating border or color. The callout emoji icon only appeared after a hard refresh because it was injected asynchronously via a mutation listener rather than being part of the node's initial DOM.How
border-l-2) to callouts with variant-specific colors:accent(info),code-type(warning),code-string(success),destructive(error). All colors use existing design tokens.registerMutationListenerintoCalloutNode.createDOM()so the icon renders immediately on insert.updateDOM()to handle both variant and emoji changes.CalloutPluginsince the node now owns emoji rendering.Testing
Added 5 regression tests in
design-spec-compliance.test.ts:createDOM, not via mutation listenerborder-l-2for visual distinction from code blocksregisterMutationListenerfor emojicallout-node.tsxAll checks pass:
pnpm lint && pnpm typecheck && pnpm test(226 tests). E2E: 46/50 passed (1 pre-existing flaky failure inmembers.spec.ts, 3 skipped as dependents).