Skip to content

feature(carousel): carousel-item interval#26667

Merged
XhmikosR merged 1 commit intotwbs:v4-devfrom
morrissey-ingenious:4-dev-carousel-item-interval
Sep 18, 2018
Merged

feature(carousel): carousel-item interval#26667
XhmikosR merged 1 commit intotwbs:v4-devfrom
morrissey-ingenious:4-dev-carousel-item-interval

Conversation

@morrissey-ingenious
Copy link
Copy Markdown
Contributor

adds the ability to assign data-interval to an individual carousel-item.

I'm aware this may not be the proper way to add this functionality so please comment and give feedback and suggestions so that I can modify this pull request.

thanks

Comment thread js/src/carousel.js Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use more vanilla JS and change that line by

const nextElementInterval = nextElement.getAttribute('data-interval')
if (nextElementInterval) {

Comment thread js/src/carousel.js Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo here, it's not defautlInterval but defaultInterval

Comment thread js/src/carousel.js Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here instead of get the value from the dom use nextElementInterval

@Johann-S
Copy link
Copy Markdown
Member

Johann-S commented Jun 6, 2018

There are a lots of things to do before we accept this MR :

  • please add a CodePen which demonstrate what your code is doing
  • add a unit test
  • update our documentation

@morrissey-ingenious
Copy link
Copy Markdown
Contributor Author

morrissey-ingenious commented Jun 6, 2018

Here is a CodePen displaying this functionality.

https://codepen.io/morrissey-ingenious/pen/qKabWv

@Johann-S
Copy link
Copy Markdown
Member

Johann-S commented Jun 7, 2018

very nice @morrissey-ingenious 👍

I want the feedbacks from other members before merging your PR

/CC @XhmikosR, @patrickhlauke, @mdo

adds the ability to assign data-interval to an individual carousel-item
@mdo mdo mentioned this pull request Sep 18, 2018
@XhmikosR XhmikosR merged commit ea0faad into twbs:v4-dev Sep 18, 2018
@morrissey-ingenious morrissey-ingenious deleted the 4-dev-carousel-item-interval branch September 18, 2018 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants