Hi
With minItems and maxItems, one can set multiple columns per slide. Currently it is possible to do this per optionset.
I would like to make this setting responsive, so it would be possible to have a slide with a different amount of columns per breakpoint.
Logic for the settings form has been based on D7 Owl Carousel settings I remember from the past.
Logic for the flexslider implementation comes from https://github.com/woocommerce/FlexSlider/issues/1452.
Added 4 breakpoints, which can have their own min-width in pixels:
- Default
- Mobile
- Tablet
- Desktop
Attached a screenshot of the new config form.
I'll create a patch.
Comment | File | Size | Author |
---|---|---|---|
#18 | flexslider-responsive_minitems_and_maxitems-2844208-18.patch | 10.81 KB | Kobe Wright |
#14 | responsive_minItems_and_maxItems_multiple_columns_per_slide-2844208-14.patch | 17.48 KB | matthiasm11 |
| |||
New_config_form.jpg | 137.37 KB | matthiasm11 |
Issue fork flexslider-2844208
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
matthiasm11 CreditAttribution: matthiasm11 at Randstad Digital commentedComment #3
matthiasm11 CreditAttribution: matthiasm11 at Randstad Digital commentedComment #4
matthiasm11 CreditAttribution: matthiasm11 at Randstad Digital commentedComment #5
matthiasm11 CreditAttribution: matthiasm11 at Randstad Digital commentedComment #6
matthiasm11 CreditAttribution: matthiasm11 at Randstad Digital commentedWhen smoothHeight has been checked in the settings, recalculate the height for responsive purposes. Updated patch.
Comment #7
matthiasm11 CreditAttribution: matthiasm11 at Randstad Digital commentedRerolled against latest dev.
Comment #8
matthiasm11 CreditAttribution: matthiasm11 at Randstad Digital commentedComment #9
amaria CreditAttribution: amaria commentedI'll review this. There are a couple of requests and patches for this on the 7.x version as well. Will have to think about the best solution. Thanks for your work. This is a substantial patch so if you can include some tests that would be great.
Comment #10
matthiasm11 CreditAttribution: matthiasm11 at Randstad Digital commentedRerolled against latest dev, which applies to 8.x-2.0-beta1 too.
Comment #12
ShaneOnABike CreditAttribution: ShaneOnABike commentedWow! This is by far the most perfect thing to make this module more flexible and responsive. I think this has been lacking and I was able to integrate all of the changes into the D7 version and it just worked! Thank you!!
Comment #13
blueblot CreditAttribution: blueblot commentedNice addon to this module, works fine in d8.
Great job.
Comment #14
matthiasm11 CreditAttribution: matthiasm11 at MM-Experience commentedRerolled against latest dev, which applies to 8.x-2.0 too.
Comment #15
ecvandenberg CreditAttribution: ecvandenberg at Inforwijzer commentedThanks for this nice and important improvement! Works like a charm on Drupal 9.4.5 and Flexslider 8.x-2.0.
Would it be an idea to use the theme breakpoints? Like the responsive image styles do.
And why not commit this important improvement to a stable version?
Comment #16
Kobe Wright CreditAttribution: Kobe Wright as a volunteer and at Randstad Digital commentedComment #18
Kobe Wright CreditAttribution: Kobe Wright as a volunteer and at Randstad Digital commentedComment #19
ecvandenberg CreditAttribution: ecvandenberg at Inforwijzer commentedThanks Kobe! The patch applies cleanly to the 3.0.0-alpha1 version. Still on a Drupal 9 site.
And the breakpoints work very well. Nice!
Now let's see if all works fine after upgrade to Drupal 10...