WordPress / wordpress-playground

Run WordPress in the browser via WebAssembly PHP
https://w.org/playground/
GNU General Public License v2.0
1.62k stars 248 forks source link

Consolidate Blueprint builders #1800

Open adamziel opened 4 days ago

adamziel commented 4 days ago

Let's see what can we consolidate in all the existing Blueprint builders. We have:

Some of them make sense as separate experiences, others don't. For sure we can reuse a lot of UI components between all the UI builders, and we can reuse a lot of the low-level interfaces between the TypeScript-based builders. Let's use this issue as a space to explore and discuss. cc @brandonpayton @dawidurbanski @bgrgicak @dmsnell

bgrgicak commented 3 days ago

I think that Playground settings should be the only official UI builder we focus on.

Settings should include a builder that allows users to visually adjust blueprints and modify JSON if they have more complex needs.

For visual adjustments, there are two approaches we are taking, forms and drag and drop. I'm wondering if we could have a UI that supports both workflows.

The Query API in my mind is just Website state. It shouldn't be a core Blueprint feature, but it's practical, so we need to document it.

bgrgicak commented 3 days ago

Let's also add the step library to the list. It has some interesting concepts like creating custom steps.

adamziel commented 3 days ago

I think that https://github.com/WordPress/wordpress-playground/pull/1731 should be the only official UI builder we focus on.

We'll still need an "Edit Blueprint" button and the Playground Settings modal is not expressive enough for that use-case. The block editor is. We'll likely need to adopt it at one point to enable the full experience, as in run a Blueprint, edit it, upload a plugin zip from a local directory, submit a PR for the Blueprints directory.

The step library makes perfect sense in Gutenberg. Custom steps would be just custom blocks. Step blocks can be composable via patterns. Predefined sites with customizable parts are just partially synced patterns etc.

bgrgicak commented 3 days ago

Correct me if I'm wrong but we currently only run blueprints during the first boot. If you use storage, we won't run blueprints on the second boot.

In that case should a blueprint builder be part of the Add site form and not part of the settings?

adamziel commented 3 days ago

@bgrgicak There's a few different use-cases here: