Commit graph

83 commits

Author SHA1 Message Date
5bf2ef42a0 Move JS libraries to vendor/javascript
The silly motivation is that I wanted to remove `.prettierignore`,
which just exists to omit that one folder from `npm run format`. But it
also seems like this is the standard place to put them—a standard
created long after we first set this up lol
2024-09-13 21:16:46 -07:00
c011e99819 Fix various JS Turbo issues
First one, Turbo reasonably yelled at us in the JS console that we
should put its script tag in the `head` rather than the `body`, because
it re-executes scripts in the `body` and we don't want to spin up Turbo
multiple times!

I also removed some scripts that aren't relevant anymore, fixed a bug
in `outfits/new.js` where failing to load a donation pet would cause
the preview thing to not work when you type (I think this might've
already been an issue?), reworked `item_header.js` to just run once in
the `head`, and split scripts into `:javascripts` (run once in `head`)
vs `:javascripts_body` (run every page load in `body`).
2024-03-13 21:26:22 -07:00
583f3c712f High-level caching for closet lists
Okay, so I still don't know why rendering is just so slow (though
migrating away from item translations did help!), but I can at least
cache entire closet lists as a basic measure.

That way, the first user to see the latest version of a closet list
will still need just as much time to load it… but *only* the ones that
have changed since last time (rather than always the full page), and
then subsequent users get to reuse it too!

Should help a lot for high-traffic lists, which incidentally are likely
to be the big ones belonging to highly active traders!

One big change we needed to make was to extract the `user-owns` and
`user-wants` classes (which we use for trade matches for *the user
viewing the list right now*) out of the cached HTML, and apply them
after with Javascript instead. I always dislike moving stuff to JS, but
the wins here seem. truly very very good, all things considered!
2024-02-20 18:43:39 -08:00
13b92b30d0 Replace old stickUp dependency with position: sticky
From an era when we didn't have that! Now we do!

(My motivation is that I'm trying to add new JS to this page and errors
in stickUp are crashing the page early, womp womp!)
2024-02-20 18:33:23 -08:00
7efe795edb Move JS library files into a new lib folder
Just sorting things a bit cleaner!
2024-02-18 20:40:16 -08:00
df4ea967c6 Remove now-unnecessary polyfill for the placeholder attribute
Long unnecessary, in fact!
2024-02-18 20:36:45 -08:00
f9669195ea Remove old feedback UserVoice link 2023-11-11 15:48:05 -08:00
c9dd0f7376 Remove "Import from pets" page
This hasn't worked for a while, and I don't know an API off the top of
my head to drop in for it. Let's just delete it for now, and revisit it
later if we want to!
2023-11-06 13:06:18 -08:00
22e3f4240a Update most URLs to use HTTPS
I noticed we didn't have the little lock icon in the browser, and yeah
huh there's a lot of `http://` still floating around! Let's fix that!
2023-10-25 15:22:57 -07:00
Matchu
02abd4e07f Simplify item_link rendering
In the interest of clearing out Resque, I'm just gonna remove a lot of our more complex caching stuff, and we can do a perf pass for things like big item list pages once everything's upgraded. (I'm hopeful that the upgrades themselves improve perf; and if not, that some improved sensibilities 10 years later can find simpler approaches.)
2023-10-23 19:05:04 -07:00
Matchu
49cd93087a get STUCK, actions bar! get. stuck. 2015-09-26 20:09:13 -07:00
Matchu
40f508247d hint at the select all button 2015-09-26 19:59:16 -07:00
Matchu
e4757b0ee4 deselect all 2015-09-26 19:58:31 -07:00
Matchu
e6a2b978f1 oh huh. looks like remove/move are ready. 2015-09-26 19:55:09 -07:00
Matchu
6bba2ae288 bulk action bar renders, but does nothing 2015-09-26 15:31:55 -07:00
Matchu
48185fd5b8 bulk actions toolbar, with selected items count
TODO: adding an item resets the checked state of everything, boooo.
this is why react is better :'(
2015-09-26 15:00:31 -07:00
Matchu
621c768921 Select All + visual feedback 2015-09-26 14:22:11 -07:00
Matchu
0aca529e27 checkbox for closet management
drop the remove link (just use quantity: 0)
to create a bigger checkbox label target
2015-09-26 13:56:25 -07:00
7b17f70635 show campaign on trade lists
Turns out ~22% of our users initially land on a trade list.
We like to keep the campaign off the pages where space is at a
premium, so we try to whitelist it to major landing pages in order
to avoid accidentally creating a bad experience on some page :)
2015-09-05 17:53:15 +00:00
Matchu
b9a9ce3890 import from gallery
some of the stuff to support single-pageiness feels a bit hacky. ah, well :P
2015-07-28 15:05:40 -04:00
Matchu
deb0aa90f0 refactor importing 2015-07-27 13:25:24 -04:00
Matchu
dcf254a78d finally let people remove all items from the list at once.
I've been doing this manually via email for a long time,
since building new stuff in the logged-in world was a pain in the old env.

But now here we are! Finally, finally :)
2015-07-19 12:35:49 -04:00
026bdbbc0c warn users with trading lists but no neomail address 2014-12-02 10:05:11 -06:00
79a96b7670 lookup link alongside neomail 2014-05-15 22:34:00 -07:00
b2fca6b6c1 closet hangers index uses neopets connections dropdown 2014-01-18 22:50:14 -06:00
b6247fa22f prepare partials for closet_hangers#index, too 2013-12-27 21:48:28 -05:00
d858f33083 noscript warning on closet_hangers#index 2013-06-22 16:42:38 -07:00
816584f177 Move item_link partial caching to a helper rather than the template itself
This is a surprisingly huge performance gain. On my testing (with
cache_classes set to true to also cache templates), this sped up
closet_hangers#index rendering by a factor of 2 when there were a
significant number of items. Cool beans.

I think we can even hold off on the individual hanger caching now:
we've made the closet hanger partial tons faster by moving forms out
of them and doing this cache check earlier. I'm expecting significant
performance gains both here and on items#index (though less so there).
I'll deploy and see how much it helps in production; if not enough, we
can look at the layered caching of hangers, lists, groups, full pages,
etc.

So glad we don't *have* to move to a pagination model!
2013-06-22 16:31:46 -07:00
d132567931 move closet-hanger-destroy form to JS 2013-06-22 15:45:59 -07:00
2876de2db0 Move closet-hangers-update form from partial to JS
We lose no-JS support, which I kinda miss, but caching is gonna be more
important down the line. Delete form moves next, then we cache.

CSRF token changes: it looks like, by setting a data attribute in AJAX, I
was overwriting the CSRF token. I don't remember it working that way, but
now we use beforeSend to add the X-CSRF-Token header instead, which is nicer,
anyway. The issue might've been something else, but this worked :/

The CSS was also not showing the loading ellipsis properly. I think that's a
dev-only issue in how live assets are being served versus static assets, but
may as well add UTF-8 charset directives everywhere, anyway.
2013-06-22 15:27:00 -07:00
2fc0e61394 use inline-block for petpage exports, now that TNT allow it 2013-05-06 21:50:49 -04:00
e5702076ff move jquery-ui south-street assets to google cdn 2013-03-08 13:43:16 -06:00
4cd2755f84 oops, distinguish between owns/wants in closet petpage 2013-02-19 11:08:10 -06:00
0ae6762bf5 oops, re-refactor closet_hangers.index.autocomplete, since markdown wraps it in a paragraph 2013-01-09 18:28:20 -06:00
a370000b3d refactor closet_hangers.petpage.instructions to use twl 2013-01-09 17:32:56 -06:00
87920b4b94 refactor tmd helper, move closet_hangers#index autocomplete to markdown 2013-01-09 17:30:40 -06:00
397c556c50 i18n for closet_hangers#index search bar autocomplete 2013-01-09 17:15:25 -06:00
1ca59c5288 i18n for closet_hangers#petpage and items#_item (NC icon) 2013-01-09 17:15:24 -06:00
0731c7093c i18n for closet_hangers#index, closet_lists#edit, closet_lists#new, and maybe some more closet-related things - this was a biggie 2013-01-09 17:15:24 -06:00
f3d64840d6 filter lists on petpage export 2012-04-08 15:59:51 -05:00
c46d7ae2c0 fix petpage export styles
thumbnails were right-aligned when they really shouldn't have been
2012-04-08 14:50:50 -05:00
b04c5db98a add ajax auth for closet_hangers#index 2012-03-23 16:59:23 -05:00
7d0edbf23c closet_hangers#destroy now tied to hanger ID, not item 2012-03-23 16:25:10 -05:00
44156c5b21 can now have the same item in more than one list 2012-03-23 16:25:10 -05:00
2398f34071 import items from pets 2011-08-03 11:35:06 -04:00
bad1eb13a5 compare Your Items to someone elses list 2011-08-03 10:33:13 -04:00
513711bf60 import sdb as well as closet 2011-08-02 22:42:56 -04:00
374e85f9d0 drop in redirect image url for urls blocked on petpages 2011-08-02 20:01:48 -04:00
9422d5d8fe remove redundancy on no hangers in a group 2011-07-31 23:35:57 -04:00
071ba56ae9 public url on Your Items 2011-07-31 19:24:06 -04:00