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

Blueprint Builder: Fix stuck loader bar #1284

Merged
merged 3 commits into from
Apr 19, 2024
Merged

Blueprint Builder: Fix stuck loader bar #1284

merged 3 commits into from
Apr 19, 2024

Conversation

adamziel
Copy link
Collaborator

@adamziel adamziel commented Apr 19, 2024

Fixes the stuck Playground loading process on
https://playground.wordpress.net/builder/builder.html

Technically, we trash the existing iframe and start a new one instead of trying to bind multiple Playground clients to the same one. They very likely competed for events and missing even a single one meant not finishing the Playground loading sequence.

This also fixes the following issues with the builder:

  • Cmd+s saving the Blueprint to the disk instead of running it
  • Too many double quotes inserted when completing a step name

Furthermore, it adds an "Edit the Blueprint" link to the hamburger menu.

Closes #863

Follow-up work

Scrap the entire Builder codebase and rebuild it with CodeMirror and generic autocompletion (Ace doesn't work well for mobile, and the current autocompletion is bound to an exact JSON schema shape).

Testing plan

  1. Go to http://127.0.0.1:5400/website-server/builder/builder.html
  2. Run a few Blueprints
  3. Reload them 40 times
  4. Confirm Playground loaded every single time

Fixes the stuck Playground loading process on
https://playground.wordpress.net/builder/builder.html

Technically, we trash the existing iframe and start a new one instead of
trying to bind multiple Playground clients to the same one. They very
likely competed for events and missing even a single one meant not
finishing the Playground loading sequence.

This also fixes the following issues with the builder:

* Cmd+s saving the Blueprint to the disk instead of running it
* Too many double quotes inserted when completing a step name

 ## Follow-up work

Scrap the entire Builder codebase and rebuild it with CodeMirror and
generic autocompletion (Ace doesn't work well for mobile, and the
current autocompletion is bound to an exact JSON schema shape).

 ## Testing plan

1. Go to http://127.0.0.1:5400/website-server/builder/builder.html
1. Run a few Blueprints
1. Reload them 40 times
1. Confirm Playground loaded every single time
@adamziel adamziel added [Type] Bug An existing feature does not function as intended [Package][@wp-playground] Blueprints labels Apr 19, 2024
@adamziel adamziel merged commit 0a0f03f into trunk Apr 19, 2024
5 checks passed
@adamziel adamziel deleted the fix-builder branch April 19, 2024 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package][@wp-playground] Blueprints [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Blueprints Builder getting stuck
1 participant