-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Upgrade MathJax support from v2/v3 to v3/v4 #7898
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
Open
emilykl
wants to merge
18
commits into
v4.0
Choose a base branch
from
upgrade-mathjax-v3-v4-2
base: v4.0
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+443
−244
Open
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
047b56a
update test dashboard, plot schema, package.json and make_baselines s…
emilykl 367f430
update jasmine tests for mathjax v3/v4
emilykl b0d82d6
bugfix: ticks relayout promise
emilykl 164ebfd
initial svg_text_utils refactor to use a better MathJax rendering app…
emilykl 7e25bee
bug fixes: disable automatic line breaks, capture text-anchor at star…
emilykl c9a3c3a
update jasmine test
emilykl 83bb307
update image baselines
emilykl 88a77d5
update make_exports script to use MathJax v4
emilykl c262957
add draftlog
emilykl 65683da
update mathjax section in readme
emilykl ae6b830
fix mathjax3 test dashboard
emilykl 1a7ae8a
Update src/lib/svg_text_utils.js
emilykl ce7bc22
Update draftlogs/7898_change.md
emilykl ee4e480
add additional comments
emilykl a26c12b
resolve existing issue with font size for mathjax (font never appeare…
emilykl aa4d1b4
update image baselines
emilykl 5b03600
add mathjax-font-size mock
emilykl 19b432d
fix, simplify, and upgrade devtools dashboards for mathjax. Add new d…
emilykl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| <!DOCTYPE html> | ||
| <html> | ||
| <head> | ||
| <title>Plotly.js Devtools - MathJax v4 loaded with chtml output</title> | ||
| <meta charset="utf-8"> | ||
| <link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Open+Sans:600,400,300,200|Droid+Sans|PT+Sans+Narrow|Gravitas+One|Droid+Sans+Mono|Droid+Serif|Raleway|Old+Standard+TT"/> | ||
| <link rel="stylesheet" type="text/css" href="./style.css"> | ||
| </head> | ||
| <body> | ||
| <header> | ||
| <img src="http://images.plot.ly/logo/plotlyjs-logo@2x.png" onClick="Tabs.reload();" /> | ||
| <span id="reload-time"></span> | ||
|
|
||
| <input id="mocks-search" type="text" placeholder="mocks search" /> | ||
| <input id="css-transform" type="text" placeholder="css transform" /> | ||
| </header> | ||
|
|
||
| <section id="mocks-list"></section> | ||
|
|
||
| <p>MathJax \(V^4\) with \(chtml\) output on the page and <b>svg</b> output on the plotly graphs</p> | ||
| <div id="plots"> | ||
| <div id="graph"></div> | ||
| </div> | ||
| <div id="snapshot"></div> | ||
|
|
||
| <script> | ||
| window.MathJax = { | ||
| // It's possible for MathJax CHTML output to coexist on the same page with | ||
| // a plotly chart with renders MathJax as SVG; *however*, the loader must be | ||
| // configured to load the SVG output module so that it's available for plotly | ||
| // (in addition to the CHTML output module, which is implicitly loaded by | ||
| // tex-chtml.js below). | ||
| loader: {load: ['output/svg']}, | ||
| }; | ||
| </script> | ||
| <script src="../../node_modules/@plotly/mathjax-v4/tex-chtml.js"></script> | ||
| <script charset="utf-8" id="source" src="../../build/plotly.js"></script> | ||
| <script charset="utf-8" src="../../build/test_dashboard-bundle.js"></script> | ||
| </body> | ||
| </html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| - **Breaking:** Add support for MathJax v4, and **drop support for v2** [[#7898](https://github.com/plotly/plotly.js/pull/7898)] |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Here the caret (^) sign is removed for MathJax v3 pinning down the version of dependency. IMHO this is a good practice to avoid unwanted test breakages as a result of future minor/patch releases of MathJax v3.
If that's the case, then we should possibly do the same for MathJax v4 i.e.
Please note that the latest v4 is now at
4.1.3:https://www.npmjs.com/package/mathjax?activeTab=versions
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.
Did you have trouble with that in the past? If not, it seems fine to leave this unbounded and rely on the lock file to keep us in sync.
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.
Yes I recall noticing baseline changes between MathJax v2 patch and minor releases.
If you decide to unpin
mathjax-v4thenmathjax-v3may also be reverted to the unpin version i.e.