Redesign carousel implementation to reflect documentation - bug fix#44488
Redesign carousel implementation to reflect documentation - bug fix#44488rdeutz merged 10 commits intojoomla:5.2-devfrom
Conversation
Remove the re-setting of the options, as it is already done in the PHP helper as well as in the bootstrap library itself.
Refactor parameter handling to fix unwanted filtering of valid options.
The ride option can not only be set to "false" or "carousel" but also to "true".
The Pull Request have the Label |
@fgsw thanks for the clarification. |
|
People can download a package created by Drone, or update to that package using a custom URL. Both can be found by following the "Details" link at the right side of the "Download" step in the CI checks at the bottom of this PR. |
|
I have tested this item ✅ successfully on d6fe622 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/44488. |
|
I have tested this item ✅ successfully on bfca268 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/44488. |
|
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/44488. |
@ceford That would be great. But you should wait until this PR is merged and released. |
|
I jumped the gun and updated the documentation! This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/44488. |
Summary of Changes
This pull request fixes a bug in the Bootstrap Caraousel implementation of Joomla! (PHP and ES/JS) that causes valid parameters to be removed from the JavaScript options object that is fed to the Carousel instance. It replaces #38930.
Testing Instructions
I (still) do not know if the Patch Tester extension will do the JavaScript re-build / pre-processing for you, and hope you know best what to do in this regard. In any case, I've attached not only a demo / test module but also the changed files.
Actual result BEFORE applying this Pull Request
All options set to false are filtered out, causing the carousel to fall back to its default values (not sliding).
Expected result AFTER applying this Pull Request
Params that can have a false value are recognised and the carousel works as expected.
Link to documentations
Documentation link for docs.joomla.org: https://docs.joomla.org/J4.x:Using_Bootstrap_Components_in_Joomla_4#Carousel (slide vs. ride)
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed
@Quy Please let me know if I have missed anything. Also, the problem with filtered parameters may not only exist in the carousel implementation, but in any other Bootstrap component where "false" is a valid option and array_filter is used in the corresponding helper method.
mod_bs_carousel.zip
patched_files.zip