feat(app): singleton math-field popover - #187
Open
Carter907 wants to merge 9 commits into
Open
Conversation
Signed-off-by: Carter <speers.carter@gmail.com>
Signed-off-by: Carter <speers.carter@gmail.com>
Carter907
force-pushed
the
feat/singleton-popover-math-field
branch
from
July 23, 2026 04:26
6690c03 to
2f9a26e
Compare
13 tasks
- Add fontsDirectory configuration for MathLive to resolve 404 errors. - Pass Lexical nodeKey to MathLiveComponent so it correctly highlights on selection and Ctrl+A. - Update MathLiveComponent wrapper styles to fix native drag selection trapping on block math. - Add pointer-events-none to KaTeX inner elements to restore native click to edit behaviour. - Fix math shortcut detector to correctly ignore escaped dollar signs ($ and $$). Signed-off-by: Carter <speers.carter@gmail.com>
- Simplify autosave logic to leverage MDXEditor's onChange with an onBlur flusher - Restore native Markdown toolbar formatting options - Fix z-index issue overlapping the stepper header Signed-off-by: Carter <speers.carter@gmail.com>
Extend the contribution editor to support all 6 callout variations in the toolbar and add a shortcut listener to insert them by typing `:::`. Signed-off-by: Carter <speers.carter@gmail.com>
Signed-off-by: Carter <speers.carter@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This refactor is for the math-field bugs that happen when you attempt to wrap a math-field inside ephemeral (frequent mount and unmounts) React components such as the Radix UI popover.
Instead of rendering a <math-field> inside every individual equation node, the editor renders exactly one globally across the entire editor.
Rather than wrapping the singleton inside a @radix-ui/react-popover, which strictly enforces onInteractOutside rules and requires virtual anchors, I implemented a custom floating
<div />using createPortal.closes #185
closes #186
closes #209
Type of change
Verification
pnpm -r typecheckpassespnpm -r buildpasses