Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
jQuery UI Accordion settings form does not let you set the heightStyle attribute which replaced autoHeight in jQuery UI Accordion version 1.9 and up.
Here is the documentation about this change and how to use autoHeight:
https://jqueryui.com/upgrade-guide/1.9/#deprecated-autoheight-clearstyle...
I propose we:
- Change the "Set to autoheight" option on the settings form to "Height style" which is a set of radios with three options: "Auto", "Content" and "Fill" and some explanation of what that means
- Check for the obsolete "autoHeight" setting and translate it to the new setting, if the new setting hasn't been defined (so we don't need to to an update hook - similar to #2530966: Accordion style setting "-1" on active doesn't work with jquery ui => 1.9)
Comment | File | Size | Author |
---|---|---|---|
#3 | panopoly_theme-jquery_ui_accordion_autoheight-2541838-3.patch | 3.8 KB | hart0554 |
Comments
Comment #1
dsnopekThanks! I updated the issue summary with some documentation about this change and a proposal.
Comment #2
dsnopekAlso, this is related to the issue that switched us to jQuery UI 1.10: #2235081: Update jquery_update to version 2.5
Comment #3
hart0554 CreditAttribution: hart0554 commentedHere's a crack at a patch. I mapped from the previous settings fillSpace to fill, clearStyle to content, and autoHeight to auto. If there was nothing checked in the original settings it goes to auto since that's the default according to jQUI.
Comment #4
dsnopek@hart0554: Thanks for the patch! I reviewed and tested it and the form changes look great. :-)
However, we're also going to need to update
theme_panopoly_theme_panopoly_accordion_style_render_region()
to catch the old settings and convert them to heightStyle - otherwise it'll be necessary to edit and save the style settings everywhere an accordion is used to fix existing sites.Comment #5
Alex Bukach CreditAttribution: Alex Bukach commented#3 works for me.
@dsnopek if you check the patch it deals with converting old settings to the new ones, so one doesn't need to update the settings everywhere.
Comment #6
dsnopekAh, you're right! I'm not sure what I was thinking when I wrote that comment. :-/ In any case, looks good and works in my testing! Committed. :-)