Closed blzzz closed 2 years ago
Hello @blzzz, Thanks for your suggestion!
It's already possible to disable plugins (https://luge.cool/docs/browser-detection/#disable) but Transition was not considered as a "plugin" so far, and I also noticed a bug in the plugins' disabled setting.
I made an update that fixes that and add the setting to the Transition as well. Could you give it a try?
You have to replace the dist
folder in the node_modules/@waaark/luge
folder by the one in the zip.
luge-0.6.3-beta.zip
Then you can disable transition like that:
luge.settings({
transition: {
disabled: true
}
})
(The update should also fixes the other bug you reported with the cursor trails.)
Hey @AntoineW ,
Thanks for your quick reply and your effort! I just tested your updated version and as you promised, both things are fixed now. Perfect!
Thanks a lot for your support.
Hey @AntoineW,
I'm working together with Balz - also many thanks for your quick reply and effort from me, we really appreciate that!
@blzzz @CrispinMartens thank you for using luge 🙏
Version 0.6.3-beta fixes that issue.
When Luge is used within another framework like Nextjs, which handles routing and page preloading, I don't want it to have any influence on history management. In this situation it would be helpful if plugins like transition could be deactivated.
The transition plugin adds a listener to route changes. Even if no
data-lg-page
attributes are set, this is disturbing once the user wants to navigate backwards (or awindow.history.back()
is triggered) because with Luge this results in a reload (even if{transition: {reload: false}}
) is set: https://github.com/AntoineW/luge/blob/ec40cf54f3ce4b1354ed960643759929d59b1a1d/src/js/luge/core/Transition.js#L265At the moment my workaround is an "eternal" pageOut event which never ends in calling
done()
– pretty problematic but it works :)What about an excluded section in the settings?