-
Notifications
You must be signed in to change notification settings - Fork 946
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
Experiment with ways a frontend can support ipywidgets 7 and 8 #3524
Conversation
…ly load individual packages with requirejs.
2e60e0b
to
219d003
Compare
This allows the HTML manager to instead load, for example, older versions of the core controls. The idea is that the HTML Manager can load either the ipywidgets 7 or ipywidgets 8 version of core controls, to support either during a transition time. It also allows the HTML manager to be used without loading all of the base controls, if desired, making it strictly more flexible.
…lity, but at least check the versions.
This could be used to determine what widgets we can invoke from the frontend. We can also use this to query what version of the base widget is registered, which gives clues about what version of ipywidgets is installed. To determine what version of ipywidgets is installed, this is a rather indirect route, so it's not so satisfactory for that purpose.
I also experimented with adding a new control comm message, like suggested in #3429 (comment) |
New idea that seems much simpler: Make |
To take care of this, we can assume that either controls for 7.x or controls for 8.x will be loaded, but not both. Then we can dynamically load either controls versions as needed (with the css for that version). |
In the widgets dev meeting, we decided to conclude these experiments for now. To summarize lessons:
In the end, we're still not sure how much of an issue it will be for frontends in practice, so I hesitate to spend more time and effort in exploring this. If it becomes a problem in practice after we release, we have several avenues to mitigate issues. |
This is an experiment in distributing a plain HTMLManager AMD module in the dist directory, and makes the manager more flexible in that even the core controls can be overridden. The idea here is that HTMLManager can be used and even the core controls overridden (for example, possibly the widgets 7 version of core controls could be used?)
This is partly an attempt to address #3429, and maybe providing a way to load either widgets 7 or widgets 8 controls depending on what was requested by the kernel at runtime.