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
Merged

v5 without jQuery #23586

merged 89 commits into from Feb 20, 2019

Conversation

@Johann-S
Copy link
Member

@Johann-S 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.

@XhmikosR

This comment has been hidden.

@Johann-S

This comment has been hidden.

@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
Copy link

@dushkostanoeski 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
Copy link
Member Author

@Johann-S 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 has been hidden.

@Johann-S

This comment has been hidden.

@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
Copy link
Contributor

@tmorehouse 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
Copy link
Member Author

@Johann-S Johann-S commented Sep 11, 2017

thanks @tmorehouse we will take a look 👍

@tmorehouse
Copy link
Contributor

@tmorehouse 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
Copy link
Contributor

@tmorehouse 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
Copy link
Member Author

@Johann-S Johann-S commented Sep 16, 2017

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

@tmorehouse
Copy link
Contributor

@tmorehouse 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
@alekitto
Copy link
Contributor

@alekitto 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
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
Copy link
Contributor

@alekitto alekitto commented Feb 20, 2019

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

@XhmikosR
Copy link
Member

@XhmikosR 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
Copy link
Member Author

@Johann-S Johann-S commented Feb 20, 2019

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

@mdo
Copy link
Member

@mdo mdo commented Feb 20, 2019

Woohoo, well done y'all! <3

@Kocal
Copy link

@Kocal Kocal commented Feb 21, 2019

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

@ItaloBC
Copy link
Contributor

@ItaloBC ItaloBC commented Feb 21, 2019

Is this going to v5?

@thehitechpanky
Copy link

@thehitechpanky thehitechpanky commented Feb 22, 2019

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

@andrefedev
Copy link

@andrefedev andrefedev 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
Copy link

@Razatastic Razatastic commented Feb 26, 2019

Can't wait. Thank you Bootstrap team! 😄

@3kynox
Copy link

@3kynox 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
Copy link

@DarkGhostHunter 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
Copy link
Member

@XhmikosR 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
Labels
Projects
No open projects
v5
  
Shipped
Linked issues

Successfully merging this pull request may close these issues.

None yet