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

Extra classNames to the visible slides #167

Merged
merged 8 commits into from
Apr 17, 2018
Merged

Extra classNames to the visible slides #167

merged 8 commits into from
Apr 17, 2018

Conversation

RyanLiu0235
Copy link
Contributor

@RyanLiu0235 RyanLiu0235 commented Apr 15, 2018

This PR is related to #146.
Features:

  • extra className VueCarousel-slide-active for the visible slides.
  • extra className VueCarousel-slide-center for the middle visible slide.

VueCarousel-slide-center is helpful when we want to build a gallery with vue-carousel. With some css, we can highlight the middle one.

@coveralls
Copy link

coveralls commented Apr 15, 2018

Coverage Status

Coverage increased (+2.7%) to 72.195% when pulling a8d5faa on stop2stare:extra-classes-to-visible into 3797f98 on SSENSE:master.

quinnlangille referenced this pull request Apr 15, 2018
@@ -66,6 +66,12 @@ export default {
};
},
mixins: [autoplay],
// use `provide` to avoid `Slide` being nested with other components
provide() {
Copy link
Member

Choose a reason for hiding this comment

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

Woah this is cool, I've never seen it before. Could lead to some really good refactoring for v1.0.0 🎉

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Haha, this is new in 2.2.0+.
And I've noticed that in Navigation and Pagination, we're using

{
  /**
   * link on Carousel
   */
  parentContainer: this.$parent
}

This is ok in vue-carousel, since these two components are directly nested in Carousel. But when the DOM structure has been modified, it likely leads to some errors. So I highly recommend that we use provide/inject to link to the Carousel instance.
What do you think?😄

Copy link
Member

Choose a reason for hiding this comment

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

Yeah I think it's much better! Good fix, I'm just going to test the branch now and will merge later today

@quinnlangille
Copy link
Member

This looks great @stop2stare, I'll merge it in and release when I'm back in the office on Monday 🎉 I'll also roll up the build file for your last PR. Thanks a million!

@RyanLiu0235
Copy link
Contributor Author

@quinnlangille my pleasure to contribute to open source project.😄

@quinnlangille
Copy link
Member

Hey @stop2stare, I merged in #165 so this will need to be rebased on master again before I can merge it in to avoid conflicts. Same with #168 once I merge this, just ping here once and any conflicts are resolved and I'll continue!

@RyanLiu0235
Copy link
Contributor Author

@quinnlangille resolved.

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.

None yet

3 participants