[openstreetmap/openstreetmap-website] Add Turbo to replace custom JS (PR #4562)
Tom Hughes
notifications at github.com
Wed Mar 6 13:55:28 UTC 2024
So I'm not familiar with turbo at all beyond the quick look I've just had over lunch but in principle it looks nice and I don't have any objections - definitely not if it eventually lets us get rid of the client side router that nobody understands.
I do think you probably chose a bad example to get started with... I can see why you chose it, because it's somewhere that is already manually doing partial updates but in order to preserve that behaviour you've wound up with a lot of really ugly stuff to handle the transitions :disappointed:
Possibly eventually that's something [view transitions](https://turbo.hotwired.dev/handbook/drive#view-transitions) could handle better? They're not supported in firefox yet though...
I suspect it would have been compelling to demonstrate what's possible with something like the diary entries or trace lists where I think you could pretty much just wrap the content in a turbo frame and get instant partial updates with no mess.
One thing I'm unclear on is why we're installing turbo with npm when the `turbo-rails` gem already includes a copy which seems to be the [recommended](https://turbo.hotwired.dev/handbook/installing) way to get it when using rails?
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/4562#issuecomment-1980929273
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/4562/c1980929273 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240306/098b1e63/attachment-0001.htm>
More information about the rails-dev
mailing list