plotly.py icon indicating copy to clipboard operation
plotly.py copied to clipboard

Use modern `native ES6 import` to load plotly.js bundle instead of `requirejs` which is no longer under active development

Open marthacryan opened this issue 1 year ago • 6 comments

This removes references in the base renderers to requirejs. Requirejs is essentially unmaintained and newer versions of jupyter lab and jupyter notebook don't support it anymore, so this fixes some of the notebook 7 and lab 4 issues we've been seeing. Replaces requirejs support with native javascript modules: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules

Alternative to #4762 that doesn't remove the CDN.

Fixes #4336.

marthacryan avatar Sep 11 '24 19:09 marthacryan

Great PR. Please add a changelog also please mention if it is fixing #4336?

archmoj avatar Sep 11 '24 20:09 archmoj

Note: the orca tests are also failing on master

marthacryan avatar Sep 12 '24 12:09 marthacryan

Please update the description of the PR and include links & info about requirejs.

archmoj avatar Sep 17 '24 20:09 archmoj

@LiamConnors do you have permission to merge this?

archmoj avatar Sep 23 '24 22:09 archmoj

@marthacryan and @archmoj, when building Plotly.py using this PR and the master branch of Plotly.js, figures don't load in a classic notebook and the following error is in the console.

image

LiamConnors avatar Oct 02 '24 18:10 LiamConnors

@archmoj @marthacryan please sync with @LiamConnors about the issue he flagged (previous comment in this thread)

gvwilson avatar Oct 17 '24 19:10 gvwilson

Regarding the error saw in my previous comment. It only is an issue with notebook<7

LiamConnors avatar Oct 21 '24 18:10 LiamConnors

Is there any blocker for merging this PR?

archmoj avatar Oct 21 '24 18:10 archmoj

Is there any blocker for merging this PR?

@archmoj @LiamConnors @gvwilson I believe there isn't anything blocking merging since Liam was able to use this with Notebook 7.

marthacryan avatar Oct 21 '24 18:10 marthacryan

:dancer:

archmoj avatar Oct 21 '24 18:10 archmoj

merge it!

gvwilson avatar Oct 21 '24 18:10 gvwilson