Redesign carousel implementation to reflect documentation - bug fix #44488
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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