impress/app/assets/javascripts
Emi Matchu 684dcb53ba Add Turbo to speed up the app, and set up for missing UJS features
Oh right, we don't have Rails UJS going on anymore, which is what
handled the confirmation prompts for deleting lists. Turbo is the more
standard modern solution to that, and should speed up certain
pageloads, so let's do it!

Here I install the `turbo-rails` gem, then run `rails turbo:install` to
install the `@hotwired/turbo-rails` npm package. Then I move
`application.js` that's run all on pages but the outfit editor into our
section of JS that gets run through the bundler, and add Turbo to it.

I had to fix a couple tricky things:

1. The outfit editor page doesn't play nice with being swapped into the
   document, so I make it require a full page reload instead.
2. Prefetching the Sign In link can cause the wrong `return_to` address
   to be written to the `session`. (It's a GET request that does, ever
   so slightly, take its own actions, oops!) As a simple hacky answer,
   we disallow prefetching on that link.

Haven't fixed up the UJS stuff for confirm prompts to use Turbo yet,
that's next!
2024-03-13 13:43:48 -07:00
..
closet_hangers Oops, fix regression of editor features on item lists page 2024-02-22 15:52:40 -08:00
fundraising Move most fundraising files into a Fundraising module 2024-02-18 20:12:14 -08:00
items Oops, fix silly bug keeping the bulk list form open all the time 2024-01-23 04:40:05 -08:00
lib Replace old stickUp dependency with position: sticky 2024-02-20 18:33:23 -08:00
outfits Run Prettier on some of our JS assets 2024-02-18 20:34:55 -08:00
pets Run Prettier on some of our JS assets 2024-02-18 20:34:55 -08:00
ajax_auth.js Run Prettier on some of our JS assets 2024-02-18 20:34:55 -08:00