Skip to content

(Partially) remove jQuery and Bootstrap #427

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

Merged
merged 23 commits into from
Mar 18, 2016
Merged

(Partially) remove jQuery and Bootstrap #427

merged 23 commits into from
Mar 18, 2016

Conversation

afshin
Copy link
Contributor

@afshin afshin commented Mar 17, 2016

FYI, @jdfreder @SylvainCorlay @jasongrout @dwillmer ... this is to (soon) supersede #400

@SylvainCorlay
Copy link
Member

👍 thanks for cleaning up the PR !

@jdfreder jdfreder mentioned this pull request Mar 18, 2016
5 tasks
@jdfreder jdfreder added this to the 6.0 milestone Mar 18, 2016
model.get('_view_name'),
model.get('_view_module'),
ManagerBase._view_types
).then(function(ViewType) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, more legible, thanks!

@afshin afshin mentioned this pull request Mar 18, 2016
this.label = document.createElement('div');
this.label.classList.add('widget-label');
this.label.style.display = 'none';
this.el.appendChild(this.label);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Writing HTML in JS is so awkward (same with the jquery version). This is one of those moments I wish we were using JSX or webpack to pull in the HTML. Maybe in a separate PR we should look into webpacking HTML...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's definitely more verbose. The way we mostly deal with it in phosphor is by having a small number of static methods, like createNode, etc. and just having those be pure DOM construction. It ends up being mostly okay at that point. It's not as small as JSX, but it's totally readable and predictable.

this.droplist.style.maxHeight = availableHeightAbove + 'px';
return;
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fantastic!

var radios = _.pluck(
this.container.querySelectorAll('input[type="radio"]'),
'value'
);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool trick!

jdfreder added a commit that referenced this pull request Mar 18, 2016
@jdfreder jdfreder merged commit 9e35fd2 into jupyter-widgets:master Mar 18, 2016
@jdfreder
Copy link
Contributor

🍰 🎉 Thank you @dwillmer and @afshin for all the hard work!

@afshin
Copy link
Contributor Author

afshin commented Mar 18, 2016

Sweet, thanks!

@dwillmer
Copy link
Contributor

The heroic work came from @afshin, thanks dude!

@github-actions github-actions bot added the resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion. label Feb 24, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants