Skip to content

Conversation

@davidparys
Copy link
Contributor

@davidparys davidparys commented Jan 8, 2025

I felt like the behaviour from the previous version was kinda useful so added I oneshot, it would trigger the animation only once it won't play again when scrolling out/in of view again.

  • Improved formatting in playground.vue for better readability.
  • Refactored plugin.ts to ensure proper handling of .once and .oneshot modifiers, including a warning when both are used together.
  • General code cleanup and formatting adjustments across multiple files for consistency.

…odifiers documentation.

- Improved formatting in playground.vue for better readability.
- Refactored plugin.ts to ensure proper handling of `.once` and `.oneshot` modifiers, including a warning when both are used together.
- General code cleanup and formatting adjustments across multiple files for consistency.
@vercel
Copy link

vercel bot commented Jan 8, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
v-gsap-nuxt ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 9, 2025 1:30pm

@holux-design
Copy link
Owner

Hey @davidparys, thats awesome, thank you!

However, I feel like .oneshot is a quite arbitrary name for this addon.

Tbh I would prefer reversing the logic, reverting .once back to "really only once", and instead add a modifier to reverse the animation, like .once.reversible

What do you think? Can you change your PR according to that?

- added .reversible to .once
- changed the behaviour of .once to really be once as in previous versions
@davidparys
Copy link
Contributor Author

Hey @davidparys, thats awesome, thank you!

However, I feel like .oneshot is a quite arbitrary name for this addon.

Tbh I would prefer reversing the logic, reverting .once back to "really only once", and instead add a modifier to reverse the animation, like .once.reversible

What do you think? Can you change your PR according to that?

Absolutely! It was a little bit confusing for me why this was changed in 1.1.8 so I thought this was a wanted change and wanted to keep both separate.

I've changed once to really be once and added .once.reversible :)

@holux-design
Copy link
Owner

Amazing, thank you so much!

I am also impressed how thoughtful you added the everything to the docs 💪

Merging and releasing now

@holux-design holux-design merged commit c612179 into holux-design:main Jan 9, 2025
3 of 4 checks passed
@davidparys
Copy link
Contributor Author

Amazing, thank you so much!

I am also impressed how thoughtful you added the everything to the docs 💪

Merging and releasing now

A pleasure!

Sorry about the linting I have everything set to default in Vscode :D

@fiveam-lukas
Copy link
Collaborator

haha no worries :D

btw:

Absolutely! It was a little bit confusing for me why this was changed in 1.1.8 so I thought this was a wanted change and wanted to keep both separate.

This change in 1.1.8 was just because it fitted my needs better at that time and I didn't think anyone other than me cared about the module anyways - so I just changed it. Apparently people do care, which I love to see 😍 So from now on I'll be more careful with core changes 😅

@davidparys davidparys deleted the added-oneshot branch January 10, 2025 00:42
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.

3 participants