-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Signup: DSS: Show loading overlay during image preloading #1256
Conversation
ping @kwight for review |
SUH-WEET. Looks great. 👍 |
Oh @sirbrillig , you've replaced tabs with spaces in |
Also, I found a race condition having to do with how |
There. That should fix it. |
Hm, now I get a flash of the default screenshots right before the white overlay kicks in :| And yep, I hadn't pulled to see the tabs. |
hm... now I'm seeing that too. back to research... |
ok, I have a few possibilities I've tried, but they all flicker one way or another:
I think we need to decide what we want it to look like while the search is in-progress. Ideally I'd say we want no image changes while the search is in-progress, and no flickering as it renders the searched image, but what does that look like, exactly? How does the code know when the user has actually stopped typing? We may need to disable search-as-you-type to get it. |
Prevents edge case where an image does not change even though the search changes, causing the `ImagePreloader` to never call its onLoad handler, resulting in an overlay sticking around forever.
1b46020
to
cd4f71c
Compare
5718685
to
fcbbc76
Compare
With the last commit I went with option 1 in my list above
It's actually looking pretty good. |
With the latest changes, we don't go back to seeing the default screenshots while the results image loads in, but I prefer this. Seeing the new image load over the old image (and not confusing people by flashing the default screenshots) is a better experience. |
LGTM 👍 |
Signup: DSS: Show loading overlay during image preloading
Fixes #1163
Testing
Load http://calypso.localhost:3000/start/dss/ and try searching for words. Make sure that the images load correctly and with very little or no flicker of unstyled previews.
Try the following types of search events to look for strange behavior: