Skip to content
This repository was archived by the owner on Jan 16, 2024. It is now read-only.

Allow all swiper options #32

Closed
wants to merge 1 commit into from
Closed

Conversation

cesarizu
Copy link

@cesarizu cesarizu commented Oct 4, 2016

This PR adds support to all current swiper options.

@Suven
Copy link
Collaborator

Suven commented Oct 5, 2016

Thanks!

It makes sense to simplify the case of just copying over params from the wrapper 1:1 to swiper. I am, however, unsure about just copying over just all of them with their values.

  1. Are the values really needed? This looks like we are redefining / applying the defaults again. You need to look closer to notice we don't. The alternative would just be an array of param-names we support.
  2. Are all those keys really tested? Because of the way we are rebinding the values of the used components, some parameters might need some attention when being reassigned. One example of this would be the currentSlide, which works in both directions (swiper updates the attr <-> we update the attr)

@cesarizu
Copy link
Author

cesarizu commented Oct 5, 2016

Thanks for your comments.

  1. As for copying all the parameters with the values I think that may be just temporary. I'll update to use just the names. I'm planning on creating a PR for swiper so that these are exported and could be used directly on this addon.
  2. I've tried a lot of the parameters and I haven't found any error so far. I haven't tried any two way binding really. I'll try to see if I can test that.

@lionelrudaz
Copy link

Hi guys,

Thanks both of you for your great work, this is a very neat addon!

I'm interested into adding navigation buttons to each slider. Any news when this PR will be merged and released?

Thanks in advance

@Suven
Copy link
Collaborator

Suven commented Feb 16, 2017

Hey @lionelrudaz ,

That might already be supported, if you mean the same option that was introduced in #36

@lionelrudaz
Copy link

Hi @Suven, thanks for your quick reply.

Yeah, that's what I meant. My use case is that I have plenty of instances on the same page, so I won't be able to do it exactly like that, but I can tweak it probably.

Thanks

@lolmaus
Copy link

lolmaus commented Mar 18, 2017

Please make this through. 🙇

@AndreJoaquim
Copy link

@Suven Will this be merged soon? It would be very useful!

@cesarizu
Copy link
Author

I've updated the pull request and also opened one on nolimits4web/swiper#2154 to export the defaults directly from Swiper. If that PR gets accepted I can update this PR to use those values instead.

@cesarizu cesarizu force-pushed the options branch 2 times, most recently from 9ce4d74 to c612772 Compare July 13, 2017 09:12
@albertpak
Copy link

Any update on this PR?

@Matt-Jensen
Copy link
Contributor

Here are my issues with this PR:

  1. Bug: there are no tests.
  2. Bug: there are no docs.
  3. We are redefining the default Swiper options, which will change causing unexpected and frustrating behavior to our end users down the road.

I don't like being a stick in the mud, but this PR would likely cause as many issues as it solves. I'd like to see the PR that solves this issue to have the following features in addition to tests + docs:

  • Not redefine default options Swiper provides.
  • Remove usage of observer for option updates.
  • Make use of component lifecycle hooks and possibly ember-diff-addrs to apply updated options.
  • Gracefully accept any future Swiper options without requiring explicit definition.

I'll try to make a PR compatible with the above this weekend, but without significant changes to this PR I won't personally be merging it.

@Matt-Jensen
Copy link
Contributor

Would love any watchers of this PR to provide feedback on #73

@Matt-Jensen
Copy link
Contributor

Closed by #73

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants