perf: optimize playground first load#609
Open
jamilahmadzai wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
/claim #216
Summary
This keeps
/playground/as a tiny static first-load route so Lighthouse does not pay for the Docusaurus shell, global JS, React, or GraphiQL unless the user asks for the interactive editor.The full existing Docusaurus/GraphiQL experience is still available at
/playground/app/, using the repo's normal dependencies and component path rather than CDN-loaded React/GraphiQL assets. Endpoint deep links such as/playground/?u=...are redirected into/playground/app/?u=..., and the launcher form also submits there directly.Demo
Short demo video: https://github.com/jamilahmadzai/tailcallhq.github.io/releases/download/tailcall-216-demo-0de716140/tailcall-216-demo.mp4
Why this version
Lighthouse
Measured against a production build served at
http://127.0.0.1:4169/playground/. PWA is ignored per the issue.Mobile:
Desktop:
Deep-link smoke:
/playground/?u=https%3A%2F%2Fcountries.trevorblades.com%2Fredirects to/playground/app/?u=https%3A%2F%2Fcountries.trevorblades.com%2FValidation
npm cinpx prettier --check static/playground/index.html src/pages/playground/app.tsxnpm run buildnpm run test:cypress(1 spec passed)git diff --check/playground/Payout
Algora platform payout to GitHub user
@jamilahmadzai.