Problem/Motivation

Some websites show elements with seamless horizontal seamless scrolling.

Unknown if slick can do this too.
It supports infinite, but unknown if it supports permanent scrolling without fixed position.

Proposed resolution

Research.
Add option or new plugin.

Remaining tasks

User interface changes

API changes

Data model changes

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

miro_dietiker created an issue. See original summary.

miro_dietiker’s picture

Examples: Used for customer logos or testimonials scrolling.

Primsi’s picture

Issue tags: +drupalmountaincamp

This is actually already doable with the slider plugin and appropriate slick configuration. What we could do is to provide the slick config file and/if needed a paragraph type if needed.

miro_dietiker’s picture

Would be great as a second slick paragraph in the demo.

btemperli’s picture

Assigned: Unassigned » btemperli
btemperli’s picture

Status: Active » Needs review
FileSize
8.47 KB

I added a new/second slider to the demo which is automatically scrolling horizontal.

Status: Needs review » Needs work

The last submitted patch, 6: infinite_slider_for_demo-2852165-6.patch, failed testing.

Primsi’s picture

This looks really nice. Just two things for now:

  1. diff --git a/modules/paragraphs_collection_demo/config/install/core.entity_form_display.paragraph.slider_infinite.default.yml b/modules/paragraphs_collection_demo/config/install/core.entity_form_display.paragraph.slider_infinite.default.yml
    

    You will need to clone paragraphs_collection and then create the patch from there. That's why it failed to apply.

  2. +++ b/modules/paragraphs_collection_demo/paragraphs_collection_demo.info.yml
    @@ -8,3 +8,4 @@ dependencies:
    +  - slick_ui
    

    I think that there is no need for that, because paragraphs_collection already requires slick_ui.

btemperli’s picture

Thank you Primsi for looking at it!
I checked the patch again. Should work now, the problem was that in the meantime another commit was published in the module. Failed of that I think.

  1. Patch comes directly from the paragraphs_collection, but most of the changes are in the submodule paragraphs_collection_demo
  2. slick_ui is not a dependency yet, but paragraphs_collection can handle it. For the demo I created a new slick.optionset, here the slick_ui is required.
btemperli’s picture

Status: Needs work » Needs review
Primsi’s picture

Status: Needs review » Needs work

Oh snap, completely off on this one. Did it in a hurry and didn't spent enough time to check it properly.

  1. +++ b/modules/paragraphs_collection_demo/config/install/slick.optionset.slider_infinite.yml
    @@ -0,0 +1,66 @@
    +    - slick_ui
    

    That's really strange that we need a dependency on slick_ui. I guess there is nothing we can do about it.

  2. +++ b/modules/paragraphs_collection_demo/paragraphs_collection_demo.install
    @@ -96,6 +96,52 @@ function paragraphs_collection_demo_install() {
    +  $demo_text = '<p><br/>This is the %s slide using an <strong>infinite slider</strong> adaption of the slider plugin.</p>';
    

    Not sure about using text for this. I think that the intention is to have something like 3 images that scroll endlessly. That will actually look different from the already exiting slider.

miro_dietiker’s picture

So if we create option sets, we need slick_ui dependency? Sounds strange and we should create an issue over there to not require this.

btemperli’s picture

Status: Needs work » Needs review
FileSize
8.71 KB
  1. I solved the problem with the dependency. It was my own mistake - it does not need the dependency to slick_ui. Removed it in the new patch.
  2. Replaced the text by images. Updated the slider for showing 3 images.
johnchque’s picture

Wow really nice! We would need tests for this but not sure how much needed they are. RTBC +1.

Primsi’s picture

Status: Needs review » Needs work

Just one nitpick. Otherwise great work! Also IMHO this would count more as a fundamental type, so I don't think we need tests for this demo item, as discussed in another issue.

+++ b/modules/paragraphs_collection_demo/paragraphs_collection_demo.install
@@ -96,6 +97,50 @@ function paragraphs_collection_demo_install() {
+  $slider_infinite_images = array(

We use the new array syntax everywhere in this file, let's not mix them up.

miro_dietiker’s picture

Really cool. Committed it with the array fix to allow us easily play with it. Back to work to talk about next steps...

- All images look the same. Would be great to have them slightly differ. Could be different horizontal width.
- Why do we need a new "slider indefinite" paragraph type instead of selecting that style in the option set?

Primsi’s picture

Why do we need a new "slider indefinite" paragraph type instead of selecting that style in the option set?

In the demo slider contains a text field.

btemperli’s picture

Status: Needs work » Needs review
FileSize
2.62 KB

I'm back at working on this ticket. Sorry for the long delay :)

I updated the infinite image slider:
- Images are not same size anymore, added some with different width
- Scrolling is now seamless, no stops at each image.

Status: Needs review » Needs work

The last submitted patch, 19: infinite_slider_for_demo-2852165-19.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

btemperli’s picture

Status: Needs work » Needs review
FileSize
7.87 KB

Updated the patch.
I also removed the paragraph type "slider infinite" as said in #2852165-17: META Infinite horizontal scrolling and replaced it by the paragraph type "slider", just with the other optionset.

Status: Needs review » Needs work

The last submitted patch, 21: infinite_slider_for_demo-2852165-21.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

miro_dietiker’s picture

Priority: Normal » Major

Seems we forgot to review this. Promoting for better visibility.