-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Add bokehjs' mathjax bundle #11525
Add bokehjs' mathjax bundle #11525
Conversation
IuryPiva
commented
Aug 23, 2021
•
edited
Loading
edited
- issues: relates to Add LaTeX rendering to elements #11355
- tests added / passed
this.status = "failed" | ||
} | ||
} | ||
} | ||
|
||
const default_provider: MathJaxProvider = new CDNProvider() |
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.
So, we finally have a bundle, but what now? How do we use it? What's the point of having a CDN provider and include a bundle at the same time?
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.
Nice question, this slip through. I'm thinking of solving it by using a config from Python and having the BundleProvider as default, but is there a need to use the CDN provider ever again?
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.
There may be, but we will see. In the meantime figure out how to configure this (note this needs to work both from Python and JS).
Does this require any other external resources (CSS, fonts, ...)? Was this tested with networking disabled (e.g. in devtools)? |
Just tested with BundleProvider as default. No external resource is needed, no errors show when using with network disabled. |
js, tag = bes.autoload_static(test_plot, CDN, "some/path") | ||
r = deepcopy(CDN) | ||
# Skip bokeh-mathjax for older versions | ||
r.js_components.remove("bokeh-mathjax") |
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.
Those tests are very presumptions regarding the state of resources between versions. I don't like this approach, especially given that deepcopy
may not be guaranteed to copy CDN
object correctly. Perhaps monkeypatching _js_components
would be better, to match components with versions. I will merge this for the time being, but this needs some though in near future.
* add mathjax bundle provider * add trailing commas * add mathjax bundle legacy test * docs * update expected scripts len * print mathjax bundle size * skip tests for unexisting mathjax bundle versions * deepcopy import directly * skip version check for bokeh-mathjax * update scripts length * prevent terser to convert non-ascii characters becoming invalid * test for console errors on embed * trailing comma * use bundle as default provider * add link to terser issue