Coder Social home page Coder Social logo

another-vue-carousel's People

Contributors

gianff avatar

Stargazers

 avatar

Watchers

 avatar  avatar

another-vue-carousel's Issues

Add the ability to have more than one carousel per page

There is a bug when you have more than one carousel in the same page:

  • suppose you have carousel-1 and carousel-2, when clicking on the right arrow on carousel-1 then carousel-2 will also be right clicked.
  • that is because we are emitting an event on the bus with a common name, we need to specify who has emitted that event.

Extract carousel item to decouple items from the Carousel

Untill now users will need to know how the carousel works in order to use the library.
That is becouse the carousel-items are coupled to the Carousel, for example:

      <div v-for="item in secondCarouselItems" v-bind:key="`fourth-item-${item}`" class="fourth-item" v-bind:style="`transform: translateX(${offset}px)`" >
        <img alt="Vue logo" src="./assets/logo.png" width="100px" height="300px">
      </div>

This line of code is in the main page and every carousel-item has it, that v-bind:style is coupling the customer item to the Carousel, if we extract a new component (i.e: carousel-item) and put that logic there, we will been decoupling the Carousel from customer items.

Test the Carousel

The Carousel need to have tests in order to check:

  • when there are less items to show than items in total the arrows will appear.
  • when there are more or equal items to show than items in total the arrows will not appear.
  • we also need to test the maths inside the component.

We also need to add CI

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.