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

Add support for turbo-rails #11

Closed
wants to merge 2 commits into from
Closed

Add support for turbo-rails #11

wants to merge 2 commits into from

Conversation

Ancez
Copy link

@Ancez Ancez commented Dec 9, 2023

At the moment, visits through turbo do not refresh the animations so the animations completely disappear. This fixes it.

Ref: https://turbo.hotwired.dev/reference/events

At the moment, visits through turbo do not refresh the animations so the animations completely disappear. This fixes it.


Ref: https://turbo.hotwired.dev/reference/events
src/js/taos.js Outdated Show resolved Hide resolved
@Ancez Ancez marked this pull request as ready for review December 9, 2023 16:03
@volkandkaya
Copy link
Collaborator

Hey, I won't be merging that. I might look at ways of hooking into or refreshing it but TAOS is built to be as small as possible.

@Ancez Ancez marked this pull request as draft December 9, 2023 16:37
@volkandkaya volkandkaya closed this Dec 9, 2023
@Ancez
Copy link
Author

Ancez commented Dec 9, 2023

Hey, I won't be merging that. I might look at ways of hooking into or refreshing it but TAOS is built to be as small as possible.

No worries, I don't want this merged. Would love to discuss this before coding anything.

How should I handle DOM mutations while using this package? Any ideas?

What do you think about converting how TAOS initialises so I can initialise it on specific elements manually? (through JS) That way events won't be a problem... This would have knock-on effects so do you have any other suggestions?
Thanks

I might just go with a fork that'll work with StimulusJS

@volkandkaya
Copy link
Collaborator

You could just paste the code into an event listener, or if you want to use CDN create a function to create a script tag after loading.

For page speed could use prelink on that CDN link.

@volkandkaya
Copy link
Collaborator

I might have a solution in the future will ship "taos-core" that you can then use to manually add stuff.

Vite has made it much easier to reason about multiple packages.

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.

2 participants