playground-tools icon indicating copy to clipboard operation
playground-tools copied to clipboard

Browser extension: Zero Loading Time

Open adamziel opened this issue 8 months ago • 6 comments

Let's make the browser extension load Playground instantly, without any perceivable loading.

https://github.com/WordPress/playground-tools/assets/205419/1628213e-f0a5-4a73-ad6a-cdd339f6bc83

We could preload it on every page, but booting Playground in 15 browser tabs would slow down the browser.

The way forward here would be to:

  • Boot Playground locally
  • Go the the new post page editor
  • Cache the loaded HTML response and all the API fetch responses
  • Build a single bundle with all WordPress static assets and that cached data
  • Ship that with the extension (or on Playground.wordpress.net)
  • Preload that static HTML+JS on every GitHub page
  • Initialize the rest of Playground only after the user opens the editor for the first time, maybe they've started typing at that point
  • Brownie points if we can... not initialize Playground at that point and just stay with the pre-rendered editor

cc @ellatrix @youknowriad – how easy would that be? Could we "just boot" the Gutenberg framework or fork the standalone Blocknotes editor?

adamziel avatar Jun 05 '24 12:06 adamziel