Problem/Motivation
Stuff like https://getbootstrap.com/docs/5.3/components/carousel/#individual-carous... makes me think that it should just be a prop on the carousel item component.
Proposed resolution
But due to the fact that the active class should be directly on the carousel item element and that the carousel component had difficulties due to wrappers to add the class at the right place, I wonder if we should:
- put back carousel-item into the carousel item component
- add some kind of workaround like for accordion item https://git.drupalcode.org/project/ui_suite_bootstrap/-/blob/5.0.x/templ...
- or try to "fix" upstream in Bootstrap.
Issue fork ui_suite_bootstrap-3484065
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
grimreaperComment #4
grimreaperIf you are ok with that I will create a change record.
Comment #6
grimreaperComment #8
grimreaperComment #10
grimreaper@pdureau,
As discussed on phone, I am re-opening this issue because I think it broke Views usage.
I am ok to revert the change for 5.0.x as I think this would require new mechanism from UIP2.
For views: we need to be able to control the "active" boolean prop with the fact that the element is the first (or nth) result.
For field formatters: we need to be able to control the "active" boolean prop with the fact that the element is the first (or nth) element/delta.
Comment #11
grimreaperRemove active prop.
Custom JS that will check all carousel items and will place the active class on the first one if none have the active class.
Comment #16
grimreaper