-
Notifications
You must be signed in to change notification settings - Fork 948
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
Allow requireLoader to be configurable #1998
Allow requireLoader to be configurable #1998
Conversation
Great idea! Can you do two changes to your PR?
function renderWidgets(element = document.documentElement, loader: (moduleName: string, moduleVersion: string) => Promise<any> = requireLoader) { |
Thanks for the feedback ! I improved the type declaration.
…On 18-Mar-2018 1:45 AM, "Jason Grout" ***@***.***> wrote:
Great idea! Can you do two changes to your PR?
1.
The type for the loader should be more specific: (moduleName: string,
moduleVersion: string) => Promise<any>
2.
Can you push the default into the signature? Something like:
function renderWidgets(element = document.documentElement, loader: (moduleName: string, moduleVersion: string) => Promise<any> = requireLoader) {
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1998 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AImSDGcEcRHr7s8i2lbx6MuJDWrIEC1jks5tfW7TgaJpZM4Su8PB>
.
|
Now with the default in the signature, you don't need the |
5c3512a
to
d3043d0
Compare
I'm sorry for the back and forth here.
…On 18-Mar-2018 2:45 AM, "Jason Grout" ***@***.***> wrote:
Now with the default in the signature, you don't need the ||.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1998 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AImSDB8JK7mDFjritjD1kB8z1qXQA5Jwks5tfXzvgaJpZM4Su8PB>
.
|
No problem at all! You're doing great! |
Squashed the commits, let me know if anything else is needed.
…On 18-Mar-2018 4:12 AM, "Jason Grout" ***@***.***> wrote:
No problem at all! You're doing great!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1998 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AImSDBAbghGLFO35CuxQAmWtMZv3bOHlks5tfZE4gaJpZM4Su8PB>
.
|
One more thing - can you add a note to the function documentation about the loader, similar to the note for the element parameter? Then I think we're good to go. |
d3043d0
to
afd0e0d
Compare
Looks good, thanks! I'll wait for tests to pass before merging. |
Thanks again! |
@Madhu94 - one more thing. In our release notes, we give credit to people who contributed, using their full name (see https://groups.google.com/forum/#!msg/jupyter/j40P78_h3U4/K3vdg5VGCgAJ for example). Your commit right now shows that it is from
Thanks! Or if you just want to post your name here, I can add the listing. Of course, if you'd rather be mentioned just using your github username, that's fine too, and we won't add an entry to the mailmap. And for the future, you can set your name in git so that it shows up in your git commits following the directions at https://help.github.com/articles/setting-your-username-in-git/. |
Thanks for your help @jasongrout, hopefully my next PR will go better as I won't be a Typescript novice by then. I've updated the mailmap. |
I'd really like to be able to configure where I look up the widget models and views classes, and not always pick up from unpkg (for inhouse software).
I didn't know if there was a better way to do it, but allowing a configurable loader for htmlManager might do it.
Please let me know if this can be merged or if there is a better solution to my problem