Is the removal of jquery dependencies planned in the near future?

Bootstrap 4 has own modal component. May be great to remove jquery dependencies and use bootstrap 4 modal feature.

thank you

Comments

trickfun created an issue. See original summary.

renatog’s picture

Hello @trickfun how are you?

Thanks for using the Modal project.

Yeah, makes sense, we're using jQuery as a dependency here: https://git.drupalcode.org/project/modal_page/-/blob/4.1.x/modal_page.li...

I was thinking here that it really makes sense to remove this dependency. But on the other hands, we're using jQuery elements in our JavaScript logic here: https://git.drupalcode.org/project/modal_page/-/blob/4.1.x/js/modal-page.js for example:

var modals = $('.js-modal-page-show');

I don't know if we remove that this part will continue working you know. We need to test it.

Thank you so much for your suggestion @trickfun

paulocs’s picture

Version: 5.0.x-dev » 4.1.x-dev

Hello @trickfun

if we remove jquery dependency, we will need to change modal-page.js too. But how do you know that Bootstrap 4 has no jquery dependency for modals? I checked the bootstrap 4 documentation but i did not see anything related...

Cheers, Paulo.

trickfun’s picture

Thank @paulocs,
bootstrap 4 has jquery dependencies too :-(
bootstrap 5 hasn't.

May be usefull have a select with bootstrap version options in configuration page.
if you select bootstrap 4, you load jquery dependencies
if you select bootstrap 5, you load only pure js and bootstrap dependencies.

what do you think?