-
Notifications
You must be signed in to change notification settings - Fork 270
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
Prototype: Block-based Blueprints Editor #1755
base: trunk
Are you sure you want to change the base?
Conversation
we had another iteration of the UI builder but there was the urge to use blocks as listed above to benefit from all the foundational pieces we get with the block editor. demo: https://wp-playground-blueprint-builder.pages.dev/ The initial discussion on Block-based Visual Builder for Playground was initiated at WCEU 2024 Turin at the Playground Contribution Table. We now have the POC and MVP on its way which will be concluded at WCUS 2024 in Portland. A sneak peek into what's lined up: Glimpse of early POC: blueprint.mp4 |
Oh nice @ajitbohra! I'm happy to ditch this PR, it was just a 2 hours exploration to get a better feeling of the problem space, I expected to throw the code away anyway. Would you be interested in starting a PR for this repo? Here's why that would be useful:
|
@adamziel let's keep this PR open for now we can close this once we have the pull with the MVP opened here. yes, we can reuse the efforts, we are on the same page.
|
@ajitbohra sounds great, thank you! Aha, there's one change I'd suggest based on the video. The form inputs might be more useful directly in the |
@adamziel agree inspector controls are meant for secondary interaction in blocks. video is the initial poc,the mvp we are heading towards uses inline editing for better UX. As seen in screenshot we will have contextual editing so user get Birds Eye view of what blueprint will look like. |
Lovely! By the way, DataForm might be useful here: https://wordpress.github.io/gutenberg/?path=/docs/dataviews-dataform--docs |
@adamziel Yes we are already using them for steps with simple forms. |
You are three steps ahead of me @ajitbohra ❤️ |
@adamziel This is what we have so far after polishing things at #WCUS playground-blueprint-builder-social.mp4for a quick test drive Some cleanup and we are good to transition this here. |
@ajitbohra slick! 😍 Such a lovely, lovely work, I thank you with all my heart for getting it so far! It will be so, SO helpful and also it will also unlock extending Blueprints with new steps! |
@ajitbohra that does look super! A few ideas For the plugin block when using slug, is it possible to query the repo to search for a plugin slug rather than having to know it ahead of time. This would be a great help Alternatively there also could be a way to choose from a list of plugins the current site already has. This is especially useful if you're building a blueprint to recreate the current site. And a very long term goal it would super sweet to recreate a plugin based on the current site options, server settings and plugin and theme profile with one click. Sort of a plugin generator, but that's probably down the road! |
The current builder is MVP and we have plans to expand this. Better UI/UX for plugin, theme, and options selection is already on my wishlist. Big yes for generating a blueprint from the site and seems like you read my mind :) We will get this MVP rolling and put down a rough roadmap on what more we can done. |
That's great to hear |
680cd19
to
2e376d2
Compare
As part of the ongoing Playground UX overhaul, I put together some designs that I hope may help bring the Blueprint Editor to wp-admin's new design language. They build off of @ajitbohra's fantastic work on the block builder (kudos!) and mostly refine some stylistic choices and microinteractions. Let me know what you think. Happy to do another take if you feel it needs further work. This is a very high-level exploration and many details are missing, but I hope it'll spark an interesting discussion about the future UX of blueprint editing. The workflow-like layout is probably the most significant update. Though technically still blocks, I made the actions look like boxes to avoid confusing users who mostly associate blocks with content displayed on the front-end. Each box displays the most important information about the associated action:
Users can move actions up and down when they select them in the canvas. I also renamed all steps to "Actions" (it can be a good umbrella term given that each item impacts the site's config or data in some way) and rearranged and converged the items in the Inserter to make the list shorter and more concise (e.g. Note that it's just my own thinking and if it isn't reasonable or feasible, feel free to adjust. In the sidebar, users can edit each action's settings and data (doing so in the canvas doesn't feel well-aligned with where the site editor is heading and some of the latest changes to block editing UX) and access the blueprint's global settings, like WP version, status, categories, etc. |
Lovely explorations @jarekmorawski! One thing that jumps out for me is the Another thing that stands out is that these steps are not immediately editable and that the interactions are hidden in the block inspector. It would be useful to make them immediately interactive – see the conversation above about this exact topic. |
Amazing look! Could there be a step to lever runPHP to create a page or post? Like a shortcut to automatically create the necessary code to read a page/post, it's contents/metadata and then generate the PHP to recreate it in a step. That would be such a killer demo. |
@asirota the |
True dat! @adamziel |
PR to add the builder #2008 @jarekmorawski thanks for the explorations 🌟 I have incorporated a few of them in the above pull. |
@ajitbohra This looks fantastic! @adamziel I'm just wondering wouldn't this be more suitable for PR in the playground-tools repo? |
Motivation for the change, related issues
Note
You're the most welcome to take over this PR. I won't be able to make progress here in the short term. Do you want a kick-ass Blueprints editing experience? You can make it happen!
A quick prototype of what a block-based Blueprints editor could look like:
Why a UI? We have JSON already...
Why? Because writing JSON is so annoying! You can't easily write 10 lines of PHP code for the
runPHP
step, you can't reference other files from your local computer, and you need to understand a lot of ideas (like resource types).A UI editor can provide a tremendously better experience. This prototype doesn't do any of that, but here's what we'll be able to do:
Why Gutenberg blocks?
My first hunch was to prototype this editor as a standalone app but my intuition was wrong. Everything about building a standalone app sucked.
Here's what Gutenberg gives us for free:
And there's more! The experience can be combined with existing WordPress plugins, we'll get new features for free as WordPress grows, we'll improve the WordPress ecosystem, I can keep going.
Testing instructions
Copy this code and paste the contents of
steps-quick-n-dirty-prototype.js
to your browser's devtools with Gutenberg open. If you want to try it in Playground, go to the "New post" page, open devtools and select "wp (post-new.php)" as the execution context before pasting the code.Related resources
cc @akirk @dmsnell @bgrgicak @brandonpayton @dawidurbanski @griffbrad @ajitbohra