Skip to content

Render Grapher axis labels as TeX when the Interactive Graph UI components are used#3791

Merged
benchristel merged 2 commits into
mainfrom
benc/grapher-tex-labels
Jun 17, 2026
Merged

Render Grapher axis labels as TeX when the Interactive Graph UI components are used#3791
benchristel merged 2 commits into
mainfrom
benc/grapher-tex-labels

Conversation

@benchristel

Copy link
Copy Markdown
Member

Summary:

The old Grapher UI assumed axis labels were formatted as bare TeX. Interactive
Graph assumes they are text which may contain TeX surrounded by $...$
delimiters. This means we have to adapt the label format when rendering a
Grapher using the Interactive Graph components.

Issue: LEMS-4285

Test plan:

View this exercise with the grapher-to-interactive-graph feature flag turned
on for your account:

The graph axis labels (x, y) should be italicized.

@github-actions

github-actions Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Size Change: +43 B (+0.01%)

Total Size: 510 kB

📦 View Changed
Filename Size Change
packages/perseus-core/dist/es/index.js 27.3 kB +43 B (+0.16%)
ℹ️ View Unchanged
Filename Size
packages/kas/dist/es/index.js 20.6 kB
packages/keypad-context/dist/es/index.js 1 kB
packages/kmath/dist/es/index.js 6.32 kB
packages/math-input/dist/es/index.js 98.5 kB
packages/math-input/dist/es/strings.js 1.61 kB
packages/perseus-core/dist/es/index.item-splitting.js 12.3 kB
packages/perseus-editor/dist/es/index.js 105 kB
packages/perseus-linter/dist/es/index.js 9.8 kB
packages/perseus-score/dist/es/index.js 10.2 kB
packages/perseus-utils/dist/es/index.js 403 B
packages/perseus/dist/es/index.js 201 kB
packages/perseus/dist/es/strings.js 8.6 kB
packages/pure-markdown/dist/es/index.js 1.39 kB
packages/simple-markdown/dist/es/index.js 6.71 kB

compressed-size-action

@SonicScrewdriver SonicScrewdriver left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! I'm happy to approve as-is, given that grapher was already doing this itself.

…active-graph` feature flag is on, Grapher axis labels are now interpreted as TeX.
@github-actions

github-actions Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

npm Snapshot: Published

Good news!! We've packaged up the latest commit from this PR (12918ef) and published it to npm. You
can install it using the tag PR3791.

Example:

pnpm add @khanacademy/perseus@PR3791

If you are working in Khan Academy's frontend, you can run the below command.

./dev/tools/bump_perseus_version.ts -t PR3791

If you are working in Khan Academy's webapp, you can run the below command.

./dev/tools/bump_perseus_version.js -t PR3791

@benchristel benchristel merged commit a2c520a into main Jun 17, 2026
13 of 14 checks passed
@benchristel benchristel deleted the benc/grapher-tex-labels branch June 17, 2026 23:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants