-
-
Notifications
You must be signed in to change notification settings - Fork 79k
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
Do a major cleanup in Collapse.js #34220
Conversation
Why introduce a BC break with "keep parent only as element"? Some other components support |
Hmmm I don't think it is a breaking change, as the tests hasn't been change at all. The reality is, that now, the component acts as chameleon, with this MR, |
That means the tests aren't complete. This is a public API: https://getbootstrap.com/docs/5.0/components/collapse/#options |
May I don't express it well. It still accepts string selectors and jQuery objects. In its internals it keeps the vanilla js element and only. And the real check is if the element exists or not. (right?) |
I may misinterpreted the code, I don't know it well. If these type defs are for internal use only, then there's no problem. |
98c281f
to
c5227b2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't speak to the JS changes, but clicking around, things look good inn the docs!
/cc @twbs/js-review for proper review
c5227b2
to
38c8c0f
Compare
3323150
to
1aeb2ba
Compare
Ping @twbs/js-review for this one :) |
f2ea075
to
e83d2de
Compare
e83d2de
to
cb9e0f9
Compare
471b8bb
to
2e7e0ec
Compare
4c35ee8
to
f3cd631
Compare
f3cd631
to
9edca4f
Compare
Previously, it was assumed that the trigger element would have its own separate config than the collapse element itself.
Also, remove the `isTransitioning()` helper.
Also, remove a few redundant checks since we already check for it in `_addAriaAndCollapsedClass()`.
9edca4f
to
80c50e2
Compare
_getConfig
& interfacedata-toggle
click, as it was assuming that trigger element would own separate config than the collapse itself (wasn't documented)isTransitioning
forEach
for all iterationsSelector.find
data-toggle
clickNOTE for reviewers:
Better review it, commit by commit. It will help you with the proper message and will guide you with sanity to follow the logic
Closes #34408