-
Notifications
You must be signed in to change notification settings - Fork 370
[Blueprint Editor] Add multiline string editor modal #2962
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
Merged
Merged
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
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Keep only keyboard shortcut (Cmd/Ctrl+E) and toolbar button as triggers. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
The toolbar now stays within the visible editor area when scrolling horizontally on long lines, using a scroll listener that applies a transform offset when needed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
… strings Replace custom string-utils with standard JSON methods. The multiline edit button now only appears for strings that can be successfully JSON-parsed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Replace getLanguageLabel() and getAvailableLanguages() with a simple languageLabels Record<SupportedLanguage, string> constant. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
# Conflicts: # packages/playground/website/src/components/blueprint-editor/json-schema-editor/jsonSchemaCompletion.ts
The multiline edit feature was previously only in JSONSchemaEditor, but BlueprintBundleEditor uses CodeEditor directly. This adds the tooltip button and Cmd/Ctrl+E keyboard shortcut to open a modal for editing JSON strings with proper syntax highlighting based on the string's context (PHP, SQL, HTML, etc).
da43a42 to
9910e4e
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
[Feature] Blueprints Builder
[Package][@wp-playground] Blueprints
[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.
Editing PHP code or SQL queries inside Blueprint JSON is painful because newlines become
\nescape sequences. This adds a modal editor that lets you edit string values as actual multiline text with proper syntax highlighting.When your cursor is inside a string value, a floating "Multiline Edit" toolbar appears above it. You can also press Cmd/Ctrl+E. The modal opens with the string content unescaped and syntax-highlighted based on the step type—PHP for
runPHPsteps, SQL forrunSQL, and so on. If the step type doesn't give enough context, it falls back to detecting the language from the content itself (looking for<?php, SQL keywords, HTML tags, or Markdown patterns). You can always override the detected language with the dropdown.CleanShot.2025-11-28.at.18.23.52.mp4
When you save, the content is escaped back to valid JSON and inserted into the document.