thednp / bootstrap.native

Bootstrap components build with Typescript
http://thednp.github.io/bootstrap.native/
MIT License
1.7k stars 177 forks source link

Bootstrap 4 to BSN migration #467

Closed Cristialt closed 1 year ago

Cristialt commented 1 year ago

@thednp I need your help as I am struggling with this for a while in a big project where many limitations are there :)

I understood you deprecated V4, is this the legacy branch you talk about? or is it bs-4? Could you please give a short guidance on what I have to do to make it fully working?

I have following setup [and cannot change it]

ES6+ Bootstrap 4.6.x Webpack 5

I am curently setup with legacy branch and bs_version: 4, If you can help me make this working it's great [ issues:

I was not confident to install BSN@5 because it's not clear to me if it's for both bootstrap 4 and bootstrap 5 or just for bootstrap 5 and I can't update bootstrap itself; also there's another constraint that BSN@5 seems to need data-bs- type attrs which has some undesired impact into our project but I'll handle that if it's the only problem.

Many thanks in advance!

thednp commented 1 year ago

BSN@5 is Bootstrap 5+ ONLY BSN@bs4 is Bootstrap 4 ONLY BSN@legacy is an old branch with support for Bootstrap 3 and 4.

If you work with compatible markup and follow the guide, everything should be working as intended. Yes, specific attributes changed like the original for V5 (EG: data-toggle="tooltip" is now data-bs-toggle="tooltip").

If you share the markup in a fiddle I can have a look.

Cristialt commented 1 year ago

Thanks for clarification!

I switched to "bootstrap.native": "^4.2.0",

Even here the data attrs changed to data-bs-* but that's ok

The only problem i still cannot understand is why accordion doesn't work in my environment while i can easily have it working in the fiddle with default bootstrap4 styles

If using the markup given as example in BSN docs, then some classes are switched but not correctly and only to the first element

If using the markup given in Bootstrap 4 docs [card based], nothing is triggered on clicks

It would be hard to share my context in a fiddle but if i find anything that may be related to BSN I will do it, otherwise i'll try fixing it on my end

Thanks again!