-
-
Notifications
You must be signed in to change notification settings - Fork 178
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
Bootstrap 5 version available, feedback needed #400
Comments
Thanks for this. I will put effort to contribute. |
good ieda |
@thednp Thank you for your work! I need more time to check and compare everything. For now, I will create 1 issue. It is associated with a modal window and |
@cvaize hey there. I'm looking into ways to make it even smaller.
Other contributors, @xHeinrich @picasticks @jakubboucek @TheCodeExorcist @stepheny and anyone else, help is still needed :) |
@cvaize there you go, BSN for Bootstrap 5, same size minimized, more features added, this should be even more awesome. Everyone else, enjoy the testing ;) |
* reworked `emulateTransitionEnd` `getTransitionDuration` and other related utilities * added a new tool to `normalizeOptions` saves a ton of space * ES6 class declarations in a custom scope * re-added `shorter-js` classList shorthands * other changes are already explained in #400
* reworked `emulateTransitionEnd` `getTransitionDuration` and other related utilities * added a new tool to `normalizeOptions` saves a ton of space * ES6 class declarations in a custom scope * re-added `shorter-js` classList shorthands * other changes are already explained in #400
Sorry for not responding for a while. In the last months I've migrated my only BS 5 site to original JS plugins due lack of BSN support. TBH I don't care so much about reduced file size. What is more important to me is how I can use individual components (Carousel, Collapse, etc) of each library without having the need to bundle them separatelty (or via a loader). This is what I simply do in my BS 5 project webpack
^So I can grab only JS components I need. How would I do it with BSN5? |
import Button from 'bootstrap-native/src/components-v5/button-native';
import Carousel from 'bootstrap-native/src/components-v5/carousel-native';
import Collapse from 'bootstrap-native/src/components-v5/collapse-native';
import Dropdown from 'bootstrap-native/src/components-v5/dropdown-native';
import Tab from 'bootstrap-native/src/components-v5/tab-native'; init your way EDIT: later when Bootstrap 5 is stable you use |
@midzer the latest version is on npm, you can give it a try and let us know what's up :) |
Should Dropdown keyboard navigation work? v5.html says yes, but it's failing for me. Version 3.0.14f With the default official v5 BS js, with popperjs, it works - loaded in my app.js like so: import Collapse from "bootstrap/js/dist/collapse";
import Dropdown from "bootstrap/js/dist/dropdown"; This gives me a dropdown that highlights items with up/down arrow keys. But if I uninstall popper, install bootstrap.native, and replace my app.js lines like so: import BSN from "bootstrap.native/src/index-v5"; Then the dropdown opens and closes, and if I open it with keyboard, ESC works to close it, but up/down arrows do nothing. |
Thanks for dropping by. The up + down should work when you focus on the dropdown menu. Perhaps not as perfectly identical to the original. |
@apiontek can you confirm that for me? |
No, it doesn't work for me. Not sure if I'm supposed to do anything different but I can say that, with: import BSN from "bootstrap.native/src/index-v5"; as the only thing I'm doing to load BSN, a Dropdown menu works, but up/down doesn't. To be more specific, on page load, when I start pressing Tab on my keyboard, it cycles through elements on the page, including the dropdown menu. I press Enter to activate the dropdown menu and it appears as desired, but then following that with Down or Up does nothing. Is there an extra step to "focus on the dropdown menu?" |
Another tab key? |
OK, yes, I can confirm that another Tab after the Enter to open the menu brings me into the menu, and then up/down work. |
You can also hit SPACE bar to open the dropdown ;) |
Space bar doesn't work for me to open the dropdown :'( |
Works for me on Chrome browsers, if you're on a MAC, I don't..... |
I'm testing in Chrome, Firefox, and Chromium based MS Edge, all on Windows. It's fine, just reporting feedback! |
bootstrap v5 beta3 added offcanvas component. |
Thanks, will have a look when I get the time. |
@thednp |
The code is in ES6+ flavor in those files, just like the original Bootstrap 5. Maybe that's why. If that is the case, you may need to configure an ES5 compiler. |
Hello, i get error when i require either the compiled lib or the src for v5
Line 58 in the bootstrap-native-v5.js, theres something in my html thats triggering the error but i dont know what exactly if i try it on an empty page its fine. |
Something that i noticed in bootstrap's js, when i have dropdown if i have data-bs-display this gets applied to the dropdown-menu as
|
@dyanakiev thanks for dropping by. First, we're now packaging BSN in ES6+ flavor, perhaps that's why your require doesn't work? I don't exactly know what's in your setup. So I took a quick guess. Secondly as for the new Thanks |
@thednp window.BSN = require('bootstrap.native/dist/bootstrap-native-v5')
or
window.BSN = require('bootstrap.native/src/index-v5') With both i get the error. Here is the sample for the dropdown that doesnt add the display static. <div class="menu-item dropdown">
<a href="#" data-bs-toggle="dropdown" data-bs-display="static" class="menu-link">
test
</a>
<div class="dropdown-menu dropdown-menu-end me-lg-3">
<a class="dropdown-item d-flex align-items-center" href="#">test</a>
</div>
</div> Thanks |
Everybody! Bootstrap 5 is now stable, our library has switched V5 as the default package |
@thednp I don't want to sound ungrateful because this is amazing & much appreciated, but I wish you'd made a major version bump to communicate that we needed to change our imports for Bootstrap 4 with this release. The patchlevel bump shouldn't necessarily indicate any breaking changes, so I was surprised when I discovered that the js was no longer working on my site. |
Thanks for the suggestion. |
I second @swrobel, a major version bump would have been the correct way to go. Semver makes our lives easier. This was the error I was having Don't take me wrong, I really appreciate your hard work and love the project. |
Do you guys consider a major version bump for a github releases as well or just npm/cdn? |
Semver says:
Regardless of the place where the release is posted. |
@pjcarly & @swrobel guys, I found some time to take care of this, I'm sorry for the confusion I've caused, I've updated my entire JavaScript codebase on github in the last few months or so, and completely forgot about semver, I hope I didn't cause too much trouble, though I've put much effort into this task. As usual, please update your stuff, test and provide feedback. Cheers :) |
We are now fully into Bootstrap 5 and we're most likely OK to close this one down. Thanks for everyone's feedback. |
Luckily for me it was a quick, edit package.json back to previous version, run Still @thednp, thanks for your hard work. |
Thanks for the hard work @thednp. I work with phoenix LiveView - so got into some issues in making the Toast work. Otherwise, both documentation and implementation are extremely user friendly. |
@thednp thanks for bumping the major version. This is a step in the right direction. I think to fully rectify this, you should push a 3.0.16 version that is basically a copy of 3.0.14, as 3.0.15 is the version that breaks the previous default behavior, and that is still the latest in the 3.x series. For example, my previous package.json line was |
@swrobel I wish this kind of feedback would have come earlier before we switched V4 official to V5 official. But hey can't keep track of a million things :) |
I've added a Bootstrap 5 source to our code, there are some minor changes to DATA API, for instance
data-toggle="tooltip"
=>data-bs-toggle="tooltip"
, and other markup changes not interfering with our code base.I'm expecting the usual:
BSN for Bootstrap 5 changes (compared to V4):
shorter-js
utilities we use on BSN for ES6+next()
andprev()
methods, while theslideTo()
have been renamed toto()
dropup
,dropend
) to show the dropdown menu in the viewport, however dropdown nesting is no longer supportedHTMLCollection
is updated or the offsets change due to window resizescrollHeight
even when not in "scroll range" Need to configure ScrollSpy #353, initially believed to be impossible.dispose()
callstyleTip
utility to respect the boundaries of the container, solving issues with miss-aligned tooltips and popovers exceeding the right side of the container.enable()
,.disable()
and.toggleEnabled()
.update()
, replacing a previously featured private methodaria-describedby
.hide()
calls, a much needed performance improvement; to update their contents you must re-initialize them with fresh new options values / contentsmousemove
event for Media elements like<svg>
,<img>
,<video>
(demo updated), for instance a large image initialized with Tooltip/Popover would display its tip outside the viewport even with the automatic repositioning OR transparent images (both SVG and PNG) might cause issues with displaying a tip; the "follow the cursor" feature currently only works withhover
triggering optionscroll
, previously not supported, now we're on par with original pluginsisAnimating
statecontent
option and.setContent()
instance methodindexOf
=>Array.prototype.incudes
)normalizeOptions
utility to save even more spaceBSN.initCallback()
<div class="collapse">
isthis.element
of the Collapse instance as well as the element with options DATA API attributes;Thanks and have fun testing.
The text was updated successfully, but these errors were encountered: