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

v5 without jQuery #23586

Merged
merged 89 commits into from Feb 20, 2019

Conversation

@Johann-S
Copy link
Member

Johann-S commented Aug 21, 2017

Plugins:

Tests:

  • Remove the use of Data in our unit tests (#26685)
  • Remove the use of EventHandler in our unit tests (#26685)
  • Fix coverage by testing our new internal objects

Build:

  • Remove jQuery in our Rollup config
  • See why there is no const or let in the dist files. (bootstrap.js)

Docs:

  • Update plugin pages

    • Alert (#27062)
    • Button (#27173)
    • Carousel (#27173) - still has a few references to $()
    • Collapse (#27173) - still has a few references to $()
    • Dropdown
    • Modal
    • Popover
    • ScrollSpy
    • Tab
    • Toasts
    • Tooltip
  • Other doc pages

    • List group
    • Forms
    • Nav
    • getting-started/browsers-devices.md
    • getting-started/javascript.md
  • Stop using jQuery

  • Update /getting-started/browsers-devices/ and remove any IE references

  • Add a section explaining that it's possible to use this version with and without jQuery

  • Search docs for jquery (not case sensitive) and $(

  • Replace https://codepen.io/Johann-S/pen/djJYPb or add a codepen with vanilla JS

  • Maybe explain when an element is considered visible in the scrollspy callout

Browser compatibility:

  • Remove IE

Various

  • Make sure we don't reference old versions like 4.1.3 in any newly added files
  • Same as above for copyright year
  • Drop Util.TRANSITION_END?
  • See if we really need DOMContentLoaded anymore in tests and docs.

Demo:

https://deploy-preview-23586--twbs-bootstrap.netlify.com/

If you want to help us do not hesitate to create a PR which targets this branch v4-without-jquery.

@Johann-S Johann-S added js v4 labels Aug 21, 2017

@Johann-S Johann-S requested review from XhmikosR and bardiharborow Aug 21, 2017

@XhmikosR

This comment was marked as outdated.

Copy link
Member

XhmikosR commented Aug 21, 2017

@Johann-S: did you find any lib for namespaced events or is that still broken?

@Johann-S

This comment was marked as resolved.

Copy link
Member Author

Johann-S commented Aug 21, 2017

Currently nothing is broken but I cannot finish to rewrite entirely the Alert plugin without a namespaced events...

@Johann-S Johann-S changed the title V4 without jQuery v4 without jQuery Aug 23, 2017

@Johann-S Johann-S force-pushed the v4-without-jquery branch from b6f70b2 to 8f63c2e Aug 23, 2017

@dushkostanoeski

This comment has been minimized.

Copy link

dushkostanoeski commented Aug 23, 2017

Will there be both a jQuery and a non-jQuery version? If you're using libraries that require jQuery, you can use the jQuery version, and if not, the non-jQuery one.

@Johann-S

This comment has been minimized.

Copy link
Member Author

Johann-S commented Aug 23, 2017

We will have only one release without jQuery but if we detect jQuery you'll be able to use Bootstrap's plugin as before 👍

@Johann-S Johann-S force-pushed the v4-without-jquery branch from 8f63c2e to 53f5fc0 Aug 23, 2017

@danijelGombac

This comment was marked as resolved.

Copy link

danijelGombac commented Aug 23, 2017

How large will be bootstrap.min.js without jQuery?

@Johann-S

This comment was marked as resolved.

Copy link
Member Author

Johann-S commented Aug 23, 2017

that's too early to have an estimation @danijelGombac sorry, but you can follow the development 👍

@Johann-S Johann-S force-pushed the v4-without-jquery branch 2 times, most recently from 99d47ac to 371e721 Aug 23, 2017

@Johann-S Johann-S force-pushed the v4-without-jquery branch 2 times, most recently from c1afd86 to 9d8fa89 Sep 1, 2017

@tmorehouse

This comment has been minimized.

Copy link
Contributor

tmorehouse commented Sep 10, 2017

If you are interested in Vanilla JS versions of tooltip, popover, and scrollspy, We have versions that we use in Bootstrap-Vue v1.0.0.beta.7 (see in action at docs)

We have a few extra features added to Tooltips and popovers (such as a new blur leave event... i.e. trigger='click blur', and auto appending tooltips/popover into modal... which is pending in PR bootstrap-vue/bootstrap-vue#1024)

PR bootstrap-vue/bootstrap-vue#1024 also includes much of the regular modal.js functionality in Vanilla JS format (although tweaked for use with Vue.js)

@Johann-S

This comment has been minimized.

Copy link
Member Author

Johann-S commented Sep 11, 2017

thanks @tmorehouse we will take a look 👍

@tmorehouse

This comment has been minimized.

Copy link
Contributor

tmorehouse commented Sep 11, 2017

@Johann-S no problem. There are only a few Vue.js centric items in the tooltip/popover classes (such as event emitting)

@Johann-S Johann-S force-pushed the v4-without-jquery branch from 9d8fa89 to 6717d36 Sep 15, 2017

@tmorehouse

This comment has been minimized.

Copy link
Contributor

tmorehouse commented Sep 16, 2017

Boostrap-Vue is quite interested in the jQuery free version of some of the plugins, as we might be able to direclty import some of these modues (or the classes), to replace some of our code.

We have just finished porting ScrollSpy over to vanilla js (with some helper dom functions we have created).

If you like, I could see if I can port our vanilla version to this branch as a PR (the main things to change would be the event signatures)

@Johann-S

This comment has been minimized.

Copy link
Member Author

Johann-S commented Sep 16, 2017

Sure @tmorehouse this branch is open to everyone who wants to help us 👍

@tmorehouse

This comment has been minimized.

Copy link
Contributor

tmorehouse commented Sep 16, 2017

OK, I ill try porting over in the next few days.

@Johann-S Johann-S force-pushed the v4-without-jquery branch from 6e49940 to ef8a002 Sep 17, 2017

@Johann-S

This comment has been minimized.

Copy link
Member Author

Johann-S commented Sep 17, 2017

@Johann-S

This comment has been minimized.

@alekitto

This comment has been minimized.

Copy link
Contributor

alekitto commented Sep 18, 2017

@Johann-S It seems that MSEdge resets the defaultPrevented flag upon dispatchEvent, so when the event is re-dispatched after being passed into the jQuery event system the flag is set to false. Now I'm currently working on it..

@XhmikosR XhmikosR force-pushed the v4-without-jquery branch from a292747 to 542de5d Feb 20, 2019

v5 automation moved this from Inbox to Approved Feb 20, 2019

@XhmikosR XhmikosR merged commit 423e4a3 into master Feb 20, 2019

4 checks passed

bundlesize Good job! bundle size < maxSize
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
deploy/netlify Deploy preview ready!
Details

v5 automation moved this from Approved to Shipped Feb 20, 2019

@XhmikosR XhmikosR deleted the v4-without-jquery branch Feb 20, 2019

@alekitto

This comment has been minimized.

Copy link
Contributor

alekitto commented Feb 20, 2019

Boom! Awesome work! 🎉
Thanks to everyone who contributed!

@XhmikosR

This comment has been minimized.

Copy link
Member

XhmikosR commented Feb 20, 2019

Thanks to everyone!

I hope we didn't break a lot of things, we tried our best. That being said, please try the master branch and feel free to provide any doc tweaks or bugfixes.

We'll make a new issue with the remaining TODO tomorrow.

@Johann-S

This comment has been minimized.

Copy link
Member Author

Johann-S commented Feb 20, 2019

Special thanks to @alekitto which helped me a lot to rewrite our plugins 👍

@mdo

This comment has been minimized.

Copy link
Member

mdo commented Feb 20, 2019

Woohoo, well done y'all! <3

@Kocal

This comment has been minimized.

Copy link

Kocal commented Feb 21, 2019

Nice job!
Finally we will be able to completely remove jQuery from our projects 👏

@ItaloBC

This comment has been minimized.

Copy link
Contributor

ItaloBC commented Feb 21, 2019

Is this going to v5?

@thehitechpanky

This comment has been minimized.

Copy link

thehitechpanky commented Feb 22, 2019

Finally...waiting for it since very long. Thanks a lot everyone.

@andreolaya

This comment has been minimized.

Copy link

andreolaya commented Feb 22, 2019

Congratulations, great job. I'm doing tests and I see that the branch "v5-dev-jo-eslint-airbnb" directly import plugins individually of v5-dev-jo-eslint-airbnb/src/js/ works without jquery in v4-dev, the question is if this is going to join the master. If this will only be available in v5, it is safe to copy the javascript files to v4.

@Razatastic

This comment has been minimized.

Copy link

Razatastic commented Feb 26, 2019

Can't wait. Thank you Bootstrap team! 😄

@felixvictor felixvictor referenced this pull request Mar 23, 2019

Open

v2.0.0 Roadmap #2228

0 of 9 tasks complete
@3kynox

This comment has been minimized.

Copy link

3kynox commented Mar 23, 2019

Is it safe to use this 4.3.1 without jQuery in production? Or better to wait.

Sorry if it's an idiot question, I just came on this PR discussion, and accordingly to:
https://deploy-preview-23586--twbs-bootstrap.netlify.com/

We can use it already! No more jquery requirement

@DarkGhostHunter

This comment has been minimized.

Copy link

DarkGhostHunter commented Mar 23, 2019

From what I have read, Bootstrap without jQuery has been pushed to v5, so you will need to wait until it launches. Seems that v4 will still use jQuery.

v5 is not scheduled, but seeing by the PRs, it may come this year at best as long there is constant work on it.

@XhmikosR

This comment has been minimized.

Copy link
Member

XhmikosR commented Mar 23, 2019

You shouldn't use something which is in development on production, however dangerous it might be.

That being said, you can always experiment with the master branch. Just keep in mind, it's not done yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.