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

Add static preloads notebook contribution #163511

Open
mjbvz opened this issue Oct 13, 2022 · 3 comments
Open

Add static preloads notebook contribution #163511

mjbvz opened this issue Oct 13, 2022 · 3 comments
Assignees
Labels
api api-proposal feature-request Request for new features or functionality
Milestone

Comments

@mjbvz
Copy link
Collaborator

mjbvz commented Oct 13, 2022

For #160965

This tracks a new contribution point that lets extensions contribute static preload scripts to a notebook of a specific type. Notebooks can use this to load global scripts before any notebook renderers have been loaded

@mjbvz mjbvz added this to the October 2022 milestone Oct 13, 2022
@mjbvz mjbvz self-assigned this Oct 13, 2022
mjbvz added a commit to mjbvz/vscode that referenced this issue Oct 13, 2022
@mjbvz mjbvz modified the milestones: October 2022, November 2022 Oct 24, 2022
@mjbvz mjbvz modified the milestones: November 2022, December 2022 Nov 28, 2022
@mjbvz mjbvz added the feature-request Request for new features or functionality label Dec 5, 2022
@mjbvz
Copy link
Collaborator Author

mjbvz commented Jan 11, 2023

A few notes from my meeting with @DonJayamanne about this setting

  • Jupyter is already using it to load scripts such as require.js

  • Ideally this new contribution point would also replace the NotebookRendererScript API proposal

    • Jupyter currently uses this to load two things: a script that is only used for testing the Jupyter extension, and ipywidgets
    • ipywidgets should be easy to migrate. For the test script, we could potentially just allow a preload to be marked as optional so it doesn't matter if it doesn't exist (or jupyter could ship an empty test script file for production)

@mjbvz mjbvz modified the milestones: January 2023, February 2023 Jan 19, 2023
@mjbvz mjbvz modified the milestones: February 2023, March 2023 Feb 7, 2023
@DonJayamanne
Copy link
Contributor

@mjbvz I have updated the jupyter extension to use the static contribution for ipywidgets.
The only usage of this old API is here
Jupyter currently uses this to load two things: a script that is only used for testing

I will update our test code to inject the static contributions for the test scripts as well, this way things work when testing.
& also update our CI pipeline to ensure this never gets checked into source,

this way, the static contribution for the tests script is only added for testing/development or on CI, but will never get shipped
I.e. Jupyter extension should not have the need for this dynamic contribution in the controller.

@mjbvz
Copy link
Collaborator Author

mjbvz commented Mar 16, 2023

We've going to leave this proposed until we have other use cases for it beyond jupyter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api api-proposal feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

3 participants