-
Notifications
You must be signed in to change notification settings - Fork 735
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
Animated loading screen #281
Conversation
Wow this |
const middlewareOptions: MiddlewareOptions = { | ||
...options, | ||
version, | ||
isLocal: req.headers.host.includes('localhost'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
set isLocal
to false
to have a glimpse of the flashy loading component in local mode
Thanks for the PR @xavcz! |
This shows an animated loading screen when opening the `/playground` route. There is a flag to disable it in local dev (looking for "localhost" in the headers 🙄) The `render-playground-page.ts` has been extracted in its own module, only used for Express at the moment.
6b3000a
to
c082c07
Compare
…he html package 👌
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot! I even want bad internet connection now
Animated loading screen
Initial draft
This shows an animated loading screen when opening the
/playground
route.The playground UI code is still loaded via a CDN.
The loading UI code has been generated and slightly modified for readability from the output of the codepen prototype (+ a jest snapshot mill). It may get minified in the future?
There is a flag to disable it in local dev by looking for "localhost" in the headers. What would be a better way (no such thing as
process.env.NODE_ENV
)?The
render-playground-page.ts
has been extracted in its own module, only used for Express at the moment.How to test
My process so far below. Is there another way (with less context switching)?