Skip to content
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

Browser extension: Zero Loading Time #297

Open
adamziel opened this issue Jun 5, 2024 · 6 comments
Open

Browser extension: Zero Loading Time #297

adamziel opened this issue Jun 5, 2024 · 6 comments
Labels
Browser extension Enhancement New feature or request

Comments

@adamziel
Copy link
Collaborator

adamziel commented Jun 5, 2024

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

CleanShot.2024-06-02.at.00.54.36.mp4

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?

@bgrgicak
Copy link
Collaborator

bgrgicak commented Jun 6, 2024

@adamziel would this still be needed if Playground had offline support?

With offline support the first load would take longer, but future loads should be quick because all files will be cached.

@adamziel
Copy link
Collaborator Author

adamziel commented Jun 6, 2024

@bgrgicak I’m not sure — maybe it won’t! Let’s decide once we know how snappy the offline-enabled version is. We could also get fancy and, say, boot invisible Playground in the last three active tabs or so while reaping the rest.

@ellatrix
Copy link
Member

how easy would that be? Could we "just boot" the Gutenberg framework or fork the standalone Blocknotes editor?

I'm not sure I'm following. You're talking about a Playground Extension right? Or a standalone GB one?

@adamziel adamziel moved this to Future work in Playground Board Jul 1, 2024
@adamziel
Copy link
Collaborator Author

adamziel commented Jul 1, 2024

I'm not sure I'm following. You're talking about a Playground Extension right? Or a standalone GB one?

I was thinking about a standalone Gutenberg

@ellatrix
Copy link
Member

ellatrix commented Jul 2, 2024

Yes, honestly that makes more sense for something simple like editing with the block editor in the browser

@adamziel
Copy link
Collaborator Author

adamziel commented Jul 2, 2024

Right — do you have an isolated example of that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Browser extension Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants