Skip to content

fix(graphing, charting): render title/label math on first paint via observer PIE-688#3041

Merged
CarlaCostea merged 1 commit into
developfrom
fix/PIE-688
Jun 17, 2026
Merged

fix(graphing, charting): render title/label math on first paint via observer PIE-688#3041
CarlaCostea merged 1 commit into
developfrom
fix/PIE-688

Conversation

@CarlaCostea

Copy link
Copy Markdown
Contributor

https://illuminate.atlassian.net/browse/PIE-688

After the React 18 createRoot migration, the title and axis-label math
failed to render on first paint (raw LaTeX shown) and only appeared after
an interaction. createRoot().render() commits asynchronously, so the
queueMicrotask(renderMath) ran before the LaTeX spans were in the DOM.
Replace the queueMicrotask call with the MutationObserver +
requestAnimationFrame pattern already used in multiple-choice/
placement-ordering/passage (PD-5638), so math is typeset after each commit
regardless of timing. Also add math to the title/labels in the charting
demo to exercise the fix.

@CarlaCostea CarlaCostea merged commit 8317493 into develop Jun 17, 2026
3 checks passed
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