-
Notifications
You must be signed in to change notification settings - Fork 208
Migrate from Turbolinks 5 to Hotwire Turbo 8 #2087
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
base: master
Are you sure you want to change the base?
Conversation
This will require more testing, and likely would need a new release with upgrade notes (to update the JS files projects call on Peek.2025-07-08.17-39.mp4But so far it's working 🤯 Seems to also fix #2063 that triggered this experiment 😄 |
Auto refresh is also working. Peek.2025-07-08.18-59.mp4 |
I'm trying to check the SSC following https://ihp.digitallyinduced.com/Guide/server-side-components.html#serverside-components But I'm getting this error. My What else might I be missing? p.s. Is anyone using SSC? Is this a feature we might want to drop at a certain point? |
@mpscholten this can already benefit from a review/ testing locally, as it's a big change. |
I've fixed ihp-scc not working, maybe it's not needed if running non-local IHP 🤷 haskellPackages = p: with p; [
# Haskell dependencies go here
p.ihp
+ p.ihp-ssc |
SSC is now included in the compile, but it complains about the code from the guide. So maybe someone that has ever used it, should give it a try 😄 |
@unhammer care to check your scenario with the back button? You can do it by changing in your
- <script src={assetPath "/vendor/morphdom-umd.min.js"}></script>
+ <script src={assetPath "/vendor/turbo.js"}></script>
- <script src={assetPath "/vendor/turbolinks.js"}></script>
- <script src={assetPath "/vendor/turbolinksInstantClick.js"}></script>
- <script src={assetPath "/vendor/turbolinksMorphdom.js"}></script> |
Migrates IHP from legacy Turbolinks 5.1.1 to modern Hotwire Turbo 8.0.13, replacing morphdom with Turbo's built-in morphing.
Changes
• Replace Turbolinks with Turbo 8.0.13 bundle
• Remove morphdom dependency - use Turbo's Idiomorph instead
• Enable morphing with
<meta name="turbo-refresh-method" content="morph">
• Update auto-refresh to use Turbo Streams
• Migrate
transitionToNewPage()
toTurbo.renderPage()
API• Update events:
turbolinks:load
→turbo:load
Benefits
🚀 Better performance with Idiomorph vs morphdom
📦 Single library instead of multiple dependencies
🔧 Actively maintained vs discontinued Turbolinks
Test plan
js-delete
🤖 Generated with Claude Code