Dress to Impress, a big fancy Neopets customization tool!
Emi Matchu
d69c37089e
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. |
||
---|---|---|
.devcontainer | ||
.husky | ||
app | ||
bin | ||
config | ||
db | ||
deploy | ||
lib | ||
public | ||
test | ||
vendor | ||
.eslintrc.json | ||
.gitignore | ||
.ruby-version | ||
.solargraph.yml | ||
.yarnrc.yml | ||
config.ru | ||
falcon.rb | ||
Gemfile | ||
Gemfile.lock | ||
LICENSE.md | ||
package.json | ||
Procfile.dev | ||
Rakefile | ||
README.md | ||
yarn.lock |
Dress to Impress
Oh! We've been revitalizing the Rails app! Fun!
There'll be more to say about it here soon :3