1
0
Fork 0
forked from OpenNeo/impress
impress/app/assets/stylesheets
Emi Matchu d69c37089e Fix bug where item preview loading indicator sometimes doesn't delay
The loading indicator *should* fade in after two seconds, to avoid a
flash of a loading indicator when the page loads quickly - but in some
circumstances it wouldn't delay:

1. Visit an item page. (It delays correctly the first time!)
2. Click "Infinite Closet", then click a link to another item page.
3. The loading indicator appears immediately, because this time the
   web component JS is already loaded, so the `outfit-layer` elements
   enter `:state(loading)` *immediately*. The element starts at
   `opacity: 1`, and the delay doesn't matter, because it was never at
   anything else.

In this change, we have the `outfit-viewer` web component take on a
`:state(after-first-frame)`, after a `setTimeout(0)` resolves. That
enables the loading state CSS to *never* apply on the first frame, but
then sometimes kick in on the *second* frame, so that the element is
correctly perceived as "transitioning" from hidden to visible, and the
two-second delay will apply.
2024-09-06 12:13:10 -07:00
..
alt_styles Left-align the alt styles on the page, to flow better with the headers 2024-01-24 08:02:19 -08:00
application Improve the loading indicator for the new item page previews 2024-07-07 21:32:41 -07:00
auth_users Update some stylesheets to use new page_stylesheet_link_tag helper 2024-05-14 16:10:09 -07:00
closet_hangers Replace old stickUp dependency with position: sticky 2024-02-20 18:33:23 -08:00
closet_lists Add trade warning to closet list form 2024-04-16 16:53:30 -07:00
contributions Upgrade to latest Sass and Sprockets 2023-10-23 19:05:09 -07:00
devise/sessions Update some stylesheets to use new page_stylesheet_link_tag helper 2024-05-14 16:10:09 -07:00
fundraising Update some stylesheets to use new page_stylesheet_link_tag helper 2024-05-14 16:10:09 -07:00
item_trades Don't overflow long usernames in the trades table 2024-01-21 06:52:51 -08:00
items Fix bug where item preview loading indicator sometimes doesn't delay 2024-09-06 12:13:10 -07:00
neopets_page_import_tasks Upgrade to latest Sass and Sprockets 2023-10-23 19:05:09 -07:00
outfits Add announcement about new item page, replacing the hidden Neopass one 2024-09-06 11:47:17 -07:00
partials Add responsive layout for item page 2024-09-05 16:18:48 -07:00
pets Upgrade to latest Sass and Sprockets 2023-10-23 19:05:09 -07:00
swf_assets Fix bug precompiling a CSS file that contains a min() expression 2024-09-06 11:00:49 -07:00
users Upgrade to latest Sass and Sprockets 2023-10-23 19:05:09 -07:00
_items.sass Add responsive layout for item page 2024-09-05 16:18:48 -07:00
_layout.sass Remove CSS reset that removes focus outline from all elements by default 2024-05-27 15:49:12 -07:00
_responsive.sass Add responsive layout for item page 2024-09-05 16:18:48 -07:00
application.css.sass Add responsive layout for item page 2024-09-05 16:18:48 -07:00
fonts.css.sass Upgrade to latest Sass and Sprockets 2023-10-23 19:05:09 -07:00