-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Support zip theme sources in Playground runtime #75155
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
Conversation
| // Mount themes | ||
| // All theme types (local, git, zip) can be mounted after downloading/extraction | ||
| for ( const theme of envConfig.themeSources || [] ) { | ||
| if ( theme.type === 'local' || theme.type === 'git' ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was just unnecessary.
Allow zip archive themes to be mounted in Playground runtime, matching Docker runtime behavior. After download and extraction, zip themes have a path property that can be mounted like local and git themes. Fixes #75140 https://claude.ai/code/session_016DZPQdYCKRcYKh42Y6MX3h
8b62e79 to
7febf31
Compare
andrewserong
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is testing well for me — I assume in the testing instructions, you mean testing the themes array in .wp-env.override.json, including a zip, a local theme, and a git-based theme? All three are working for me 👍
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Unlinked AccountsThe following contributors have not linked their GitHub and WordPress.org accounts: @claude. Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases. If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Awesome thank you :) |
|
Size Change: 0 B Total Size: 3 MB ℹ️ View Unchanged
|
|
Flaky tests detected in 7febf31. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/21608647781
|
Fixes #75140
What?
Enable mounting of zip-based theme sources in the Playground runtime by removing the type restriction that previously only allowed local and git themes.
Why?
The current implementation throws an error when attempting to use zip-based theme sources, limiting the flexibility of theme deployment options. Since the theme extraction/downloading is handled before the mount operation, all theme types (local, git, and zip) can be mounted using the same
--mount-dirapproach after their files are prepared.How?
Simplified the
getMountArgs()function inblueprint-builder.jsby:This change assumes that theme sources are already downloaded/extracted before reaching this mount stage, making the type-specific handling unnecessary.
Testing Instructions
/wordpress/wp-content/themes/{theme-basename}https://claude.ai/code/session_016DZPQdYCKRcYKh42Y6MX3h