julienbourdeau / debugbar

Powerful devtools for Ruby on Rails. Inspired by the Laravel Debugbar.
https://debugbar.dev
MIT License
486 stars 7 forks source link

Better support for Turbo Drive (Breaking Change) #26

Closed julienbourdeau closed 7 months ago

julienbourdeau commented 7 months ago

Loading the javascript inside the body caused it to be re-executed when using Turbo Drive navigation.

CleanShot 2024-03-30 at 11 52 24@2x

The #__debugbar element uses data-turbo-permanent to not be reloaded, see #25

And the js file is loaded inside the head element. I'm a little bit scared that it doesn't work well if the js is loaded before #__debugbar exists in the dom 🤔

The debugbar_javascript helper is now split into 2 helpers: