-
Notifications
You must be signed in to change notification settings - Fork 350
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
[Interactive Graph][Axis labels] Make default x & y axis labels TeX on load #2033
Conversation
…n load Right now, the x and y labels when an interactive graph is first created show up as text. They should be showing up as text. - Add `$` around the "x" and "y" to make them show up as TeX Issue: none Test plan: `yarn jest packages/perseus/src/widget-ai-utils/interactive-graph/interactive-graph-ai-utils.test.ts` `yarn jest packages/perseus-editor/src/widgets/interactive-graph-editor/components/interactive-graph-settings.test.tsx`
…axis labels TeX on load
npm Snapshot: PublishedGood news!! We've packaged up the latest commit from this PR (515259f) and published it to npm. You Example: yarn add @khanacademy/perseus@PR2033 If you are working in Khan Academy's webapp, you can run: ./dev/tools/bump_perseus_version.sh -t PR2033 |
Size Change: 0 B Total Size: 1.27 MB ℹ️ View Unchanged
|
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.
Not that we have to keep everything as Graphie did it, but Graphie's axis labels were always interpreted as TeX. So perhaps an easier solution is to force them to be rendered as TeX instead of making content authors wrap the labels in $
?
You can try it out on the old grapher
widget: https://www.khanacademy.org/devadmin/content/articles/survey-of-grapher/xe97b6553bdb0d1f7
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.
Looks good to me!
@jeremywiebe We don't want to wrap everything in TeX, because then a label like "Time" will be read by screen readers as "upper T i m e" (like T times I times M times E). Lone characters in TeX are treated as variables, so it makes sense for just "x" or just "y" but not for much more than that. This was very intentional! Here's the PR that updated it to be like this. |
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] ### Patch Changes - [#2037](#2037) [`b80e7882b`](b80e788) Thanks [@somewhatabstract](https://github.com/somewhatabstract)! - Nothing has changed, but our action requires a changeset per package and I don't know how to do an infrastructure update like this and pass that check - Updated dependencies \[[`b80e7882b`](b80e788)]: - @khanacademy/[email protected] ## @khanacademy/[email protected] ### Patch Changes - [#2037](#2037) [`b80e7882b`](b80e788) Thanks [@somewhatabstract](https://github.com/somewhatabstract)! - Nothing has changed, but our action requires a changeset per package and I don't know how to do an infrastructure update like this and pass that check - Updated dependencies \[[`b80e7882b`](b80e788)]: - @khanacademy/[email protected] ## @khanacademy/[email protected] ### Patch Changes - [#2037](#2037) [`b80e7882b`](b80e788) Thanks [@somewhatabstract](https://github.com/somewhatabstract)! - Nothing has changed, but our action requires a changeset per package and I don't know how to do an infrastructure update like this and pass that check - Updated dependencies \[[`b80e7882b`](b80e788)]: - @khanacademy/[email protected] ## @khanacademy/[email protected] ### Patch Changes - [#2037](#2037) [`b80e7882b`](b80e788) Thanks [@somewhatabstract](https://github.com/somewhatabstract)! - Nothing has changed, but our action requires a changeset per package and I don't know how to do an infrastructure update like this and pass that check - Updated dependencies \[[`b80e7882b`](b80e788)]: - @khanacademy/[email protected] - @khanacademy/[email protected] ## @khanacademy/[email protected] ### Patch Changes - [#2034](#2034) [`8e9b2395d`](8e9b239) Thanks [@catandthemachines](https://github.com/catandthemachines)! - Removing final usage of createReactClass. - [#2025](#2025) [`b52310d1b`](b52310d) Thanks [@nishasy](https://github.com/nishasy)! - [SR] Linear graph - add grab handle description and aria lives - [#2037](#2037) [`b80e7882b`](b80e788) Thanks [@somewhatabstract](https://github.com/somewhatabstract)! - Nothing has changed, but our action requires a changeset per package and I don't know how to do an infrastructure update like this and pass that check - [#2033](#2033) [`881c0aac3`](881c0aa) Thanks [@nishasy](https://github.com/nishasy)! - [Interactive Graph][axis labels] Make default x & y axis labels TeX on load - Updated dependencies \[[`b80e7882b`](b80e788)]: - @khanacademy/[email protected] - @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 - [#2037](#2037) [`b80e7882b`](b80e788) Thanks [@somewhatabstract](https://github.com/somewhatabstract)! - Nothing has changed, but our action requires a changeset per package and I don't know how to do an infrastructure update like this and pass that check ## @khanacademy/[email protected] ### Patch Changes - [#2034](#2034) [`8e9b2395d`](8e9b239) Thanks [@catandthemachines](https://github.com/catandthemachines)! - Removing final usage of createReactClass. - [#2037](#2037) [`b80e7882b`](b80e788) Thanks [@somewhatabstract](https://github.com/somewhatabstract)! - Nothing has changed, but our action requires a changeset per package and I don't know how to do an infrastructure update like this and pass that check - [#2033](#2033) [`881c0aac3`](881c0aa) Thanks [@nishasy](https://github.com/nishasy)! - [Interactive Graph][axis labels] Make default x & y axis labels TeX on load - Updated dependencies \[[`8e9b2395d`](8e9b239), [`b52310d1b`](b52310d), [`b80e7882b`](b80e788), [`881c0aac3`](881c0aa)]: - @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 - [#2037](#2037) [`b80e7882b`](b80e788) Thanks [@somewhatabstract](https://github.com/somewhatabstract)! - Nothing has changed, but our action requires a changeset per package and I don't know how to do an infrastructure update like this and pass that check - Updated dependencies \[[`b80e7882b`](b80e788)]: - @khanacademy/[email protected] ## @khanacademy/[email protected] ### Patch Changes - [#2037](#2037) [`b80e7882b`](b80e788) Thanks [@somewhatabstract](https://github.com/somewhatabstract)! - Nothing has changed, but our action requires a changeset per package and I don't know how to do an infrastructure update like this and pass that check - Updated dependencies \[[`b80e7882b`](b80e788)]: - @khanacademy/[email protected] - @khanacademy/[email protected] ## @khanacademy/[email protected] ### Patch Changes - [#2037](#2037) [`b80e7882b`](b80e788) Thanks [@somewhatabstract](https://github.com/somewhatabstract)! - Nothing has changed, but our action requires a changeset per package and I don't know how to do an infrastructure update like this and pass that check - Updated dependencies \[[`b80e7882b`](b80e788)]: - @khanacademy/[email protected] ## @khanacademy/[email protected] ### Patch Changes - Updated dependencies \[[`b80e7882b`](b80e788)]: - @khanacademy/[email protected] - @khanacademy/[email protected] - @khanacademy/[email protected] - @khanacademy/[email protected] - @khanacademy/[email protected] - @khanacademy/[email protected] - @khanacademy/[email protected]
Summary:
Right now, the x and y labels when an interactive graph is
first created show up as text. They should be showing up as
text.
$
around the "x" and "y" to make them show up as TeXSlack comment requesting this: https://khanacademy.slack.com/archives/C067UM1QAR4/p1734562296179709?thread_ts=1734561509.581729&cid=C067UM1QAR4
Issue: none
Test plan:
yarn jest packages/perseus/src/widget-ai-utils/interactive-graph/interactive-graph-ai-utils.test.ts
yarn jest packages/perseus-editor/src/widgets/interactive-graph-editor/components/interactive-graph-settings.test.tsx
Before
After