fix(core): remove unused source preview anchor - #3099
RovshanMuradov wants to merge 1 commit into
Conversation
|
@RovshanMuradov is attempting to deploy a commit to the TypeCell Team on Vercel. A member of the Team first needs to authorize it. |
|
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 (1)
💤 Files with no reviewable changes (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe change removes the unused CSS Anchor Positioning declaration from ChangesPreview layout performance
Priority: ➖ Normal Estimated code review effort: 1 (Trivial) | ~3 minutes Change: Bug fix · Severity of issue fixed: Medium 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 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 finds an anchor unused Comment |
Summary
Remove the unused source-preview CSS anchor to avoid excessive Chromium layout work with many math previews.
Fixes #3098.
Rationale
Every preview declares
--bn-source-popup-anchor, but no currentposition-anchor,anchor(), oranchor-size()consumer uses it. Source popups use absolute positioning. Removing the leftover declaration avoids registering hundreds of unnecessary anchors; retaining it only while open adds state-dependent CSS without an internal consumer.Changes
anchor-name: --bn-source-popup-anchorfrom.bn-preview-container.Impact
For 500 inline formulas, median cumulative layout falls from 17.610 → 0.437 s editable and 17.684 → 0.427 s read-only. Formula counts and DOM node counts are unchanged.
The anchor identifier is undocumented; downstream CSS explicitly targeting it would need adjustment.
Testing
SourceBlockWithPreview, edit persistence, OK/Escape, popup switching, keyboard/focus, editable transitions, two-editor focus switching, scrolling, and narrow viewport. Recorded geometry, document content, and state match the original.git diff --checkpass.pnpm lintrun as requested by CONTRIBUTING: 54 type errors and one warning on both the unchanged base and this patch, with identical diagnostic messages (including missing@blocknote/xl-typst-compilerdeclarations).Screenshots/Video
Not applicable; no intended visual change. Reproduction and measurements are in #3098.
Checklist
Additional Notes
This is a one-line CSS cleanup with standalone browser verification; no new unit tests or public API documentation changes. The full monorepo build/unit/Docker E2E suites were not run. WebKit verification was blocked by missing host libraries.
Summary by CodeRabbit