Skip to content

Update Swiper#79

Open
breakthestatic wants to merge 4 commits intobramkragten:masterfrom
breakthestatic:master
Open

Update Swiper#79
breakthestatic wants to merge 4 commits intobramkragten:masterfrom
breakthestatic:master

Conversation

@breakthestatic
Copy link
Copy Markdown

Updated the Swiper library to a much more recent version.

I was specifically having an issue with shadow DOM targeting (for the noSwipingSelector) that was fixed somewhere in v8 (used deprecated/non-standard event.path instead of event.composedPath()).

There's definitely potential that this introduces breaking changes for existing swipe-card users, as the underlying Swiper API may have changed; I didn't go through all the changes from v6 to v10...) However, it would make this component more in sync with the linked Swiper documentation, etc.

In addition to bumping Swiper to the most current version, I also bumped two other dependencies to resolve some security issues.

If you don't want to move to a new version, I totally understand. I just figured I'd offer this, as I've been using it locally for a while.

@ildar170975
Copy link
Copy Markdown

@breakthestatic
Can you share a compiled JS file here?

@ildar170975
Copy link
Copy Markdown

Thank you, found JS file in dist

@breakthestatic
Copy link
Copy Markdown
Author

@bramkragten, just wanted to ping you, as someone in the forums was asking if this project was dead. Getting up-to-date with the underlying library could definitely help in that regard.

@breakthestatic
Copy link
Copy Markdown
Author

Hey @bramkragten, annual ping - any chance this could be merged? I've been running my fork for over a year now without issue. Just bumped to most current version of swiper as of 2024-10-22. There were no breaking changes from v10 to v 11. Also bumped a few additional dependencies to resolve some audit complaints.

@NoahJamesTech
Copy link
Copy Markdown

Just tried using this and it fixed the issue I was having. Unfortunately, it looks like no parameters I have set are working anymore. Did the syntax change or something? I just uploaded your swipe-card.js file to HASS for installation

@breakthestatic
Copy link
Copy Markdown
Author

Hey @NoahJamesTech, looks like there were some issues with the imports that caused the extra, individual swiper modules to not be bundled as part of the build. I only use "core" swiper params so I didn't notice it during the latest upgrade from 10 to 11. Please take a look again. The latest commit should contain all the extra modules now. Thanks for the heads up as well!

@NoahJamesTech
Copy link
Copy Markdown

@breakthestatic Thank you so much! In my testing it still doesn't work though :(.

The card loads correctly, but I tried swiping and it doesn't seem to do anything, the parameters also don't seem to be making any difference.

There's a possibility I'm using it wrong, but think there might be something not quite right?

@NoahJamesTech
Copy link
Copy Markdown

That fixed it!

@breakthestatic
Copy link
Copy Markdown
Author

@NoahJamesTech, try again with the latest dist/swipe-card.js. Although there were no code changes since my last commit, for some reason the build produced was not what it should have been. I cleared the dist folder and re-ran the build, pushing the latest up.

Heh, beat me to it. Sorry for the weird build issue, but glad it's 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.

4 participants