1
0
Fork 0
forked from OpenNeo/impress
impress/app/views
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
..
about Add "Posted" date to NeoPass announcement 2024-03-13 12:22:15 -07:00
alt_styles Update site copy to reflect that Alt Styles are released 2024-02-01 06:58:54 -08:00
application Move partials in views/static to views/application 2024-03-10 18:48:25 -07:00
closet_hangers High-level caching for closet lists 2024-02-20 18:43:39 -08:00
closet_lists High-level caching for closet lists 2024-02-20 18:43:39 -08:00
contributions i18n for contributions#index 2013-01-09 17:15:23 -06:00
devise Can edit username in user settings page 2023-10-23 19:05:08 -07:00
fundraising Move most fundraising files into a Fundraising module 2024-02-18 20:12:14 -08:00
item_trades Oops, load the data for the bulk item quantity form on the trades page! 2024-01-21 06:42:24 -08:00
items Add warning for "Baby Body Paint" bugs 2024-02-27 18:16:23 -08:00
layouts Add Turbo to speed up the app, and set up for missing UJS features 2024-03-13 13:43:48 -07:00
neopets_page_import_tasks refactor importing 2015-07-27 13:25:24 -04:00
outfits Add Turbo to speed up the app, and set up for missing UJS features 2024-03-13 13:43:48 -07:00
pets Update most URLs to use HTTPS 2023-10-25 15:22:57 -07:00
sitemap Update most URLs to use HTTPS 2023-10-25 15:22:57 -07:00
users i18n for contributions#index 2013-01-24 18:23:18 -06:00