You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am unsure if this issue is with Stimulus or Turbo, so I apologize if this is the wrong repo. I am using Turbo 8 morphing and I am noticing that all my controller values are reset when my page morphs. This behavior is a bit confusing since the connect callback is also skipped in these situations. I've included a simple example repo I used for testing this behavior here: https://github.com/rbclark/turbo-8-stimulus-bug-demo
In the video below I initially load the page and then after the first refresh morph the connected-value attribute disappears.
Screen.Recording.2024-02-29.at.8.28.26.PM.mov
For now I have a global workaround added to my application.js to avoid this issue, although I'm not sure if it will have any other unforseen implications:
The events that you mention were introduced by #1097 (as a successor to a commit (9944490) that was ultimately reverted).
although I'm not sure if it will have any other unforseen implications
The unforeseen circumstances are certainly a risk. Over-committing to ignore all server-sent Stimulus Values feels safer than under-committing. I'm sure with time there will be some edge cases that will emerge.
it would be great if this behavior just worked out of the box.
Integration with Stimulus was the main driver behind that contribution. As the dust of the Turbo 8 release settles, I hope that there will bandwidth for a coordinated effort to expand built-in Morph integration for Stimulus and Trix (and therefore Action Text). Something that affords a configuration-less turn-key solution for most circumstances with some focused escape hatches when necessary.
I am unsure if this issue is with Stimulus or Turbo, so I apologize if this is the wrong repo. I am using Turbo 8 morphing and I am noticing that all my controller values are reset when my page morphs. This behavior is a bit confusing since the
connect
callback is also skipped in these situations. I've included a simple example repo I used for testing this behavior here: https://github.com/rbclark/turbo-8-stimulus-bug-demoIn the video below I initially load the page and then after the first refresh morph the
connected-value
attribute disappears.Screen.Recording.2024-02-29.at.8.28.26.PM.mov
For now I have a global workaround added to my
application.js
to avoid this issue, although I'm not sure if it will have any other unforseen implications:With how well Stimulus works with Turbo normally, it would be great if this behavior just worked out of the box.
The text was updated successfully, but these errors were encountered: