-
Notifications
You must be signed in to change notification settings - Fork 359
Integrate TeX Debugging Info into Issues Panel #3097
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
npm Snapshot: PublishedGood news!! We've packaged up the latest commit from this PR (ff2316a) and published it to npm. You Example: pnpm add @khanacademy/perseus@PR3097If you are working in Khan Academy's frontend, you can run the below command. ./dev/tools/bump_perseus_version.ts -t PR3097If you are working in Khan Academy's webapp, you can run the below command. ./dev/tools/bump_perseus_version.js -t PR3097 |
🗄️ Schema Change: No Changes ✅ |
🛠️ Item Splitting: No Changes ✅ |
|
Size Change: -277 B (-0.06%) Total Size: 498 kB
ℹ️ View Unchanged
|
jeremywiebe
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great! I left a non-blocking comment about using MathJax for this instead of KaTeX.
| @@ -0,0 +1,46 @@ | |||
| import {preprocessTex, PerseusMarkdown} from "@khanacademy/perseus"; | |||
| import katex from "katex"; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does MathJax provide any features that we could use instead? If I remember correctly, this is the last vestige of KaTeX at Khan Academy. Continuing to use it means that we could be flagging issues that MathJax doesn't have a problem with and/or vice-versa.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we kept it here because KaTeX will find more issues than MathJax will (and we wanted that for a specific reason), and I thought there was still content that used KaTeX, or that content authors still used KaTeX, something like that. I should have tried to get this out before Ben became a pumpkin, but oh well 😅 I'll create a ticket to review the use of KaTeX here and check in with Ben about just switching this to MathJax since I don't remember the relevant context. Does that sound okay for now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Absolutely. We can come back to this in the new year!
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @khanacademy/[email protected] ### Minor Changes - [#3091](#3091) [`27ab0dba64`](27ab0db) Thanks [@SonicScrewdriver](https://github.com/SonicScrewdriver)! - Move the Khanmigo data functions to Perseus Core for Server Side Scoring initiative ### Patch Changes - [#3086](#3086) [`0d1d39b563`](0d1d39b) Thanks [@nishasy](https://github.com/nishasy)! - Create free response widget generator for testdata - [#3098](#3098) [`7df7755d56`](7df7755) Thanks [@SonicScrewdriver](https://github.com/SonicScrewdriver)! - Sync dependencies - Updated dependencies \[[`27ab0dba64`](27ab0db), [`0d1d39b563`](0d1d39b), [`7df7755d56`](7df7755)]: - @khanacademy/[email protected] - @khanacademy/[email protected] - @khanacademy/[email protected] - @khanacademy/[email protected] - @khanacademy/[email protected] - @khanacademy/[email protected] ## @khanacademy/[email protected] ### Minor Changes - [#3091](#3091) [`27ab0dba64`](27ab0db) Thanks [@SonicScrewdriver](https://github.com/SonicScrewdriver)! - Move the Khanmigo data functions to Perseus Core for Server Side Scoring initiative ### Patch Changes - [#3086](#3086) [`0d1d39b563`](0d1d39b) Thanks [@nishasy](https://github.com/nishasy)! - Create free response widget generator for testdata ## @khanacademy/[email protected] ### Patch Changes - Updated dependencies \[[`27ab0dba64`](27ab0db), [`0d1d39b563`](0d1d39b)]: - @khanacademy/[email protected] ## @khanacademy/[email protected] ### Patch Changes - Updated dependencies \[[`27ab0dba64`](27ab0db), [`0d1d39b563`](0d1d39b)]: - @khanacademy/[email protected] ## @khanacademy/[email protected] ### Patch Changes - [#3098](#3098) [`7df7755d56`](7df7755) Thanks [@SonicScrewdriver](https://github.com/SonicScrewdriver)! - Sync dependencies - Updated dependencies \[[`27ab0dba64`](27ab0db), [`0d1d39b563`](0d1d39b)]: - @khanacademy/[email protected] - @khanacademy/[email protected] ## @khanacademy/[email protected] ### Patch Changes - [#3083](#3083) [`9b4aa293ac`](9b4aa29) Thanks [@jeremywiebe](https://github.com/jeremywiebe)! - Improve TypeScript (message) types used for previewing - [#3086](#3086) [`0d1d39b563`](0d1d39b) Thanks [@nishasy](https://github.com/nishasy)! - Create free response widget generator for testdata - [#3098](#3098) [`7df7755d56`](7df7755) Thanks [@SonicScrewdriver](https://github.com/SonicScrewdriver)! - Sync dependencies - [#3097](#3097) [`f0cceb96ff`](f0cceb9) Thanks [@Myranae](https://github.com/Myranae)! - Move TeX issues info to Issues panel - Updated dependencies \[[`27ab0dba64`](27ab0db), [`0d1d39b563`](0d1d39b), [`7df7755d56`](7df7755)]: - @khanacademy/[email protected] - @khanacademy/[email protected] - @khanacademy/[email protected] - @khanacademy/[email protected] - @khanacademy/[email protected] - @khanacademy/[email protected] - @khanacademy/[email protected] ## @khanacademy/[email protected] ### Patch Changes - Updated dependencies \[[`27ab0dba64`](27ab0db), [`0d1d39b563`](0d1d39b)]: - @khanacademy/[email protected] - @khanacademy/[email protected] ## @khanacademy/[email protected] ### Patch Changes - Updated dependencies \[[`27ab0dba64`](27ab0db), [`0d1d39b563`](0d1d39b)]: - @khanacademy/[email protected] - @khanacademy/[email protected]
Summary:
Problem
TeX rendering errors were previously displayed in a separate
TexErrorViewcomponent below the editor, making them easy to overlook and inconsistent with how other content issues are surfaced. This separation meant content creators might miss important TeX syntax problems until later in the authoring process.Solution
Integrated TeX debugging information into the unified Issues Panel alongside linter warnings and accessibility issues. Created a
detectTexErrors()utility that parses content and validates math expressions with KaTeX, then transforms any errors into the standard Issue format. TeX debugging info now appears prominently in the Issues Panel with helpful descriptions and links to documentation, giving content creators a single location to review all content quality concerns.-> Summary and code changes done with Claude Code <-
Issue: LEMS-3046
Test plan: