This works as expected when the replace action is triggered directly through a Turbo visit, such as using Turbo.visit("/", { action: "replace" }) or via <a href="/" data-turbo-action="replace"></a>.
However, when the 'replace' action is configured through a path rule in the configuration, the animation is shown even though it shouldn't be.
- <p><a href="/two?action=replace" class="button@native" data-turbo-action="replace">Replace with another webpage</a></p>
+ <p><a href="/two?action=replace" class="button@native">Replace with another webpage</a></p>
In the PR https://github.com/hotwired/hotwire-native-android/pull/13 some nice looking default animations were added.
In the description it was mentioned that replace visits will not be animated. Which makes absolute sense.
This works as expected when the replace action is triggered directly through a Turbo visit, such as using
Turbo.visit("/", { action: "replace" })
or via<a href="/" data-turbo-action="replace"></a>
.However, when the 'replace' action is configured through a path rule in the configuration, the animation is shown even though it shouldn't be.
Steps to reproduce (using the demo app)
Remove the attribute
data-turbo-action="replace"
in the hotwire-native-demo one.ejs file:Add a path configuration rule in the Demo configuration.json file:
Result: The replace is working. Page "one" is replaced with the page "two", but the animation is shown while doing so.
https://github.com/user-attachments/assets/c3cd7fb8-a7a8-4be7-a3a3-2e1b7653f1c2