lucky_cli icon indicating copy to clipboard operation
lucky_cli copied to clipboard

Consider replacing turbolinks with hotwire

Open matthewmcgarvey opened this issue 4 years ago • 4 comments

I'm not sure if we want to add all of hotwire or just turbo since that has turbolinks in it.

matthewmcgarvey avatar Apr 16 '21 21:04 matthewmcgarvey

I'm going to give https://github.com/jgaskins/turbo a try in my latest app, which will tangentially give me some experience with the JS portion as well.

One important thing to note is that we'll lose our disable_with helpers if we make this move and also elect to remove rails_ujs, which is recommended by the Turbo team in the Rails world. Not sure if we'd need to do that in Lucky as well, but worth considering!

stephendolan avatar Apr 17 '21 22:04 stephendolan

I'm replacing turbolinks with turbo right now. AFAIK, rails_ujs still works as long as you remove all your data-remote.

You'll need to add data_turbo: false to your forms otherwise you'll get an error because turbo expects a 400 or a redirect and not a 200. Currently we cannot use another status code when rendering a page (https://github.com/luckyframework/lucky/issues/1312).

snadon avatar May 04 '21 20:05 snadon

I'm bumping this since luckyframework/lucky#1312 is fixed and hotwire/turbo has matured a lot since.

rmarronnier avatar Jan 11 '22 20:01 rmarronnier

We actually already have a discussion relating to this here: https://github.com/luckyframework/lucky/discussions/1600

The next step for anyone who would like to see this is to take a stab at a PR so that the core team can review what would actually need to change in the scaffolded app to get a functional Lucky app.

stephendolan avatar Jan 14 '22 14:01 stephendolan