-
Notifications
You must be signed in to change notification settings - Fork 369
Blueprint bundle editor #2942
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
Open
adamziel
wants to merge
39
commits into
trunk
Choose a base branch
from
blueprint-bundle-editor-website
base: trunk
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Blueprint bundle editor #2942
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AsyncWritableFilesystem requires EventTarget methods (addEventListener, removeEventListener, dispatchEvent). The test harness class was missing the EventTarget base class.
Moves the toolbar buttons into the same row as the file path, making better use of horizontal space. The layout wraps responsively on narrow screens.
…rectory type
When saving a temporary site to OPFS, the blueprint bundle is now persisted
alongside the site data. The originalBlueprintSource is set to { type: 'bundle-directory' }
to indicate the bundle should be loaded from the site's storage directory.
On site load, if originalBlueprintSource.type is 'bundle-directory', the
PersistedBlueprintBundle class is used to load the full bundle from OPFS,
allowing access to bundled resources (not just the JSON declaration).
…ly and avoid duplication - Pass originalBlueprintSource directly to JSON.stringify instead of creating a new object - Don't store originalBlueprint when source is bundle-directory (the bundle is stored separately) - This ensures the source type is correctly persisted and we don't duplicate the blueprint data
…compatibility PersistedBlueprintBundle now implements the full FilesystemBackend interface (isDir, fileExists, listFiles, readFileAsBuffer) so it can be used directly with WritableFilesystem in the blueprint editor. When loading a stored site with a persisted bundle, the editor now checks if originalBlueprint is already a filesystem backend and uses it directly instead of trying to populate from blueprint JSON.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
[Aspect] Website
[Feature] Blueprints Builder
[Package][@wp-playground] Website
[Type] Enhancement
New feature or request
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation for the change, related issues
Support editing Blueprint bundles in the Blueprint editor:
CleanShot.2025-11-28.at.22.55.30.mp4
Implementation
The filesystem abstraction (
WritableFilesystem) with in-memory and OPFS backends is a stopgap solution until we connect the Blueprint filesystem types, Git integration filesystem types, and editor filesystem types. I'd like to get to a place where we only have a single Filesystem abstraction, similarly to what php-toolkit does in PHP. TBD on how that will enable working with zip files and git repos.Testing Instructions (or ideally a Blueprint)