fix(math-block): open math previews on the first click (BLO-1372) - #3129
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (5)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughBlock and inline math previews now render through a shared memoized component. Regression tests check that preview elements remain mounted during selection and that clicking opens the source popup. ChangesMath preview rendering
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to No actionable issue is identified with the math-preview change; it is ready to merge after normal checks. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. A rabbit checks the math display, Comment |
@blocknote/ariakit
@blocknote/code-block
@blocknote/core
@blocknote/diagram-block
@blocknote/mantine
@blocknote/math-block
@blocknote/react
@blocknote/server-util
@blocknote/shadcn
@blocknote/xl-ai
@blocknote/xl-docx-exporter
@blocknote/xl-email-exporter
@blocknote/xl-multi-column
@blocknote/xl-odt-exporter
@blocknote/xl-pdf-exporter
@blocknote/xl-typst-exporter
commit: |
|
This fixes the issue where it would take 2 clicks to open up the math block preview. We've added a regression test for this.
The same preview DOM preservation applies to inline math, with an active inline regression test. Selection changes no longer replace unchanged KaTeX elements between mouse-down and click.
Preview here
BLO-1372
Tests:
vp test --run src/block/createReactMathBlockSpec.test.tsx src/inlineContent/createReactMathInlineContentSpec.test.tsx(23 passed, 10 skipped);vp checkon the five changed files.Summary by CodeRabbit