-
Notifications
You must be signed in to change notification settings - Fork 346
IDE-like PHP Playground #2694
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
Closed
adamziel
wants to merge
41
commits into
WordPress:trunk
from
articles-adamziel-com:php-playground-react-app
Closed
IDE-like PHP Playground #2694
adamziel
wants to merge
41
commits into
WordPress:trunk
from
articles-adamziel-com:php-playground-react-app
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
…t more CLI commands, compute the current edited file path
adamziel
added a commit
that referenced
this pull request
Oct 1, 2025
## Motivation for the change, related issues Introduces a beta version of PHP Playground that has a file explorer and a built-in terminal with `php`, `wp`, and `composer` commands available: <img width="3450" height="1988" alt="CleanShot 2025-09-29 at 01 55 42@2x (1)" src="https://github.com/user-attachments/assets/a54c85aa-322c-4025-82b6-44c733c90f3f" /> It does not replace the existing PHP Playground, only introduces a new beta version. We won't replace the existing one until a few people confirm the new one is useful and stable. After merging and deploying, it will be available at https://playground.wordpress.net/beta-php-playground.html This PR supersedes #2694 ## Implementation details This PR ships mostly new code and updates code unused anywhere else. The few changes it makes to the shared configuration are non-destructive and mostly don't affect the existing packages. ### FilePickerTree component Ships a substantial update to the FilePickerTree component to: * Accept an asynchronous filesystem * Consider asynchronous nature of operations in interactions such as initial loading, expanding tree nodes, renaming files * Have contextual menu with delete, rename, create file/dir operations * Support moving nodes via drag&drop * Support "uploading" files from the desktop via drag&drop It seems like it breaks the "type to focus" interaction. That's fine, we'll fix it in a follow-up. That component isn't used anywhere else at the moment so we're not breaking any other page. It also ships a few e2e tests to be expanded ### New package This PR ships an additional `website-extras` package with the beta version of PHP Playground. Why a new package? Because the `website` packages is built offline-first. We have manifest.json automations in place for PWAs so browsers can download and cache most of the built files. Maintaining a clear separation between required and optional files is a substantial burden. Hence, this PR takes another approach entirely and clearly separates the offline-first parts from the parts we don't need to ask the client to download pre-emptively. The nx build pipeline will build the `remote` package, the `website` package, build the list of assets required for offline mode, prepare the website deployment, and only then it will merge the `website-extras` into that deployment directory. ## Testing Instructions (or ideally a Blueprint) Go to http://127.0.0.1:5400/website-extras/beta-php-playground.html and play with the beta PHP Playground.
adamziel
added a commit
that referenced
this pull request
Oct 1, 2025
…mote.html (#2717) ## Motivation for the change, related issues #2694 is trying to attach to a local remote (127.0.0.1) instead of https://playground.wordpress.net/remote.html. This PR makes it use a remote appropriate for a given environment by leveraging the same `website-config` virtual vite module as the `@wp-playground/website` package
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
🚧 Work in progress 🚧
Implementation details
Testing Instructions (or ideally a Blueprint)