Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add looping #33

Merged
merged 23 commits into from
Feb 24, 2022
Merged

Add looping #33

merged 23 commits into from
Feb 24, 2022

Conversation

weotch
Copy link
Member

@weotch weotch commented Feb 22, 2022

  • POC cloning a slide
  • Test cloning a slide containing child components (like vue-visual)
  • Implement looping pagination behavior
  • Disable bounding when loop is enabled
  • Support dragging to the left (currently always returns to index 0)
  • Make dots an emitted events return looped index values
  • Reorder slides and add offset when out of bounds
    • Add support for multiple slides per page
    • Fix whatever is up with pagination dots
  • When multiple slides per page and not enough to fill a page, fill with empty space so we don't run into issues with pagination.
    • For instance, with 5 slides and 2 per page, one 3rd page, if we don't make the rest of the slides empty, then index 4 would begin with slide 2 and everything gets more wonky from there.
    • I think this is a better solution than, say, making page 3 a sort of half page ... that feels less loop-y to me.
      • Could the ssr-carousel-slide add this ... like add margin-right equal to whatever is needed? And only when @loop?
      • I changed my mind, I think the code will be a lot cleaner if one move from last page to new first page, we just advance to the start of page 0. I think UX is a wash, it has some pros and some cons but the simplicity of the code change wins out. The gutter logic stays consistent this way and the carousel is always full looking.
    • Update the docs to call out this behavior

Closes #10, #29

@netlify
Copy link

netlify bot commented Feb 22, 2022

✔️ Deploy Preview for vue-ssr-carousel ready!

🔨 Explore the source changes: 9ac74d3

🔍 Inspect the deploy log: https://app.netlify.com/sites/vue-ssr-carousel/deploys/6214675bf855e90008bc3de3

😎 Browse the preview: https://deploy-preview-33--vue-ssr-carousel.netlify.app

@weotch weotch merged commit a73968a into main Feb 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement loop / wraparound / infinite scroll
2 participants