Skip to content
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

Remove unnecessary MathJax 2 logic from Perseus.Init #1833

Merged
merged 3 commits into from
Nov 7, 2024

Conversation

SonicScrewdriver
Copy link
Contributor

@SonicScrewdriver SonicScrewdriver commented Nov 7, 2024

Summary:

While investigating a regression on Webapp related to our Deprecated Stand-in Widget, we discovered we were initializing MathJax unnecessarily! This initialization is specifically for MathJax2 so it is safe to remove entirely.

Issue: LEMS-2588

Test plan:

  • Manual testing
  • Knowledge that this code has not been running for 2 months, and we've had zero issues with our MathJax rendering
  • Knowledge that this is unused due to being MathJax2

@SonicScrewdriver SonicScrewdriver self-assigned this Nov 7, 2024
@khan-actions-bot khan-actions-bot requested a review from a team November 7, 2024 21:26
@khan-actions-bot
Copy link
Contributor

khan-actions-bot commented Nov 7, 2024

Gerald

Required Reviewers
  • @Khan/perseus for changes to .changeset/witty-hounds-melt.md, packages/perseus/src/index.ts, packages/perseus/src/init.ts, packages/perseus/src/__tests__/init.test.ts, packages/perseus/src/widgets/explanation/explanation.cypress.ts, packages/perseus/src/widgets/grapher/grapher.cypress.ts

Don't want to be involved in this pull request? Comment #removeme and we won't notify you of further changes.

Copy link
Contributor

github-actions bot commented Nov 7, 2024

Size Change: -276 B (-0.03%)

Total Size: 859 kB

Filename Size Change
packages/perseus/dist/es/index.js 409 kB -276 B (-0.07%)
ℹ️ View Unchanged
Filename Size
packages/kas/dist/es/index.js 38.8 kB
packages/keypad-context/dist/es/index.js 760 B
packages/kmath/dist/es/index.js 4.27 kB
packages/math-input/dist/es/index.js 77.8 kB
packages/math-input/dist/es/strings.js 1.79 kB
packages/perseus-core/dist/es/index.js 1.48 kB
packages/perseus-editor/dist/es/index.js 283 kB
packages/perseus-linter/dist/es/index.js 22.2 kB
packages/perseus/dist/es/strings.js 3.54 kB
packages/pure-markdown/dist/es/index.js 3.66 kB
packages/simple-markdown/dist/es/index.js 12.4 kB

compressed-size-action

Copy link
Contributor

github-actions bot commented Nov 7, 2024

npm Snapshot: Published

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

Example:

yarn add @khanacademy/perseus@PR1833

If you are working in Khan Academy's webapp, you can run:

./dev/tools/bump_perseus_version.sh -t PR1833

Copy link
Collaborator

@jeremywiebe jeremywiebe left a comment

Choose a reason for hiding this comment

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

Awesome.

*/
const init = function (options: PerseusOptions): Promise<undefined> {
const init = function (): Promise<undefined> {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Given that there's nothing async in this function anymore, can you make it just const init = function() {?

@SonicScrewdriver SonicScrewdriver merged commit 122b3cc into main Nov 7, 2024
8 of 9 checks passed
@SonicScrewdriver SonicScrewdriver deleted the mathj-axed branch November 7, 2024 22:51
SonicScrewdriver added a commit that referenced this pull request Nov 7, 2024
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

- [#1834](#1834)
[`429b9cc15`](429b9cc)
Thanks [@nishasy](https://github.com/nishasy)! - [Locked Figures] Use
\\$ symbols to denote TeX within locked labels and locked figure labels

### Patch Changes

- [#1833](#1833)
[`122b3cc1b`](122b3cc)
Thanks [@SonicScrewdriver](https://github.com/SonicScrewdriver)! -
Removal of unused MathJax2 initialization

## @khanacademy/[email protected]

### Minor Changes

- [#1834](#1834)
[`429b9cc15`](429b9cc)
Thanks [@nishasy](https://github.com/nishasy)! - [Locked Figures] Use
\\$ symbols to denote TeX within locked labels and locked figure labels

### Patch Changes

- Updated dependencies
\[[`429b9cc15`](429b9cc),
[`122b3cc1b`](122b3cc)]:
    -   @khanacademy/[email protected]
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.

3 participants