Skip to content
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

Docker: install Gutenberg and Gutenberg debugger by default #11439

Merged
merged 3 commits into from
Feb 28, 2019

Conversation

simison
Copy link
Member

@simison simison commented Feb 28, 2019

When running yarn docker:install (quick WordPress installer helper), install also Gutenberg and Gutenberg debugger plugins.

While WP 5 has Gutenberg, it's pretty important to test with latest Gutenberg changes while developing. Latest Gutenberg also contains features for the next phases (e.g. right now Widgets and

G Debugger, on the other hand, integrates with the Gutenberg block editor to add useful visual debugging tools to assist in block development.

Testing

If you have WP installed, just run yarn docker:uninstall and then yarn docker:install again to test this script. You should end up with these plugins installed, but not activated.

./bin:/var/scripts is mounted as volume, so changes to it should be visible in Docker container without restart or rebuild.

Ensure you don't have gutenberg or g-debugger plugins in your folder before testing, unless you just want to see "Plugins already installed" -messages :-)

@simison simison self-assigned this Feb 28, 2019
@simison simison requested a review from a team February 28, 2019 11:16
@jetpackbot
Copy link

jetpackbot commented Feb 28, 2019

Warnings
⚠️ "Testing instructions" are missing for this PR. Please add some
⚠️ "Proposed changelog entry" is missing for this PR. Please include any meaningful changes

This is automated check which relies on PULL_REQUEST_TEMPLATE.We encourage you to follow that template as it helps Jetpack maintainers do their job. If you think 'Testing instructions' or 'Proposed changelog entry' are not needed for your PR - please explain why you think so. Thanks for cooperation 🤖

Generated by 🚫 dangerJS against 88f2d47

@simison simison added the [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. label Feb 28, 2019
Copy link
Member

@jeherve jeherve left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That sounds fair. Should we also take that opportunity to set GUTENBERG_DEVELOPMENT_MODE to true?

@simison
Copy link
Member Author

simison commented Feb 28, 2019

Should we also take that opportunity to set GUTENBERG_DEVELOPMENT_MODE to true?

Excellent idea! Added in 3e53b67. This will turn it true to everyone even if they don't run yarn docker:install.

Anyone who had this constant defined in their mu-plugins file, will need to remove it from there. Otherwise they'll see warning in their PHP logs:

[28-Feb-2019 11:39:14 UTC] PHP Notice:  Constant GUTENBERG_DEVELOPMENT_MODE already defined in /var/www/html/wp-content/plugins/gutenberg/gutenberg.php on line 13
[28-Feb-2019 11:39:14 UTC] PHP Stack trace:
[28-Feb-2019 11:39:14 UTC] PHP   1. {main}() /var/www/html/wp-cron.php:0
[28-Feb-2019 11:39:14 UTC] PHP   2. require_once() /var/www/html/wp-cron.php:39
[28-Feb-2019 11:39:14 UTC] PHP   3. require_once() /var/www/html/wp-load.php:37
[28-Feb-2019 11:39:14 UTC] PHP   4. require_once() /var/www/html/wp-config.php:89
[28-Feb-2019 11:39:14 UTC] PHP   5. include_once() /var/www/html/wp-settings.php:342
[28-Feb-2019 11:39:14 UTC] PHP   6. define() /var/www/html/wp-content/plugins/gutenberg/gutenberg.php:13

We can write a short announcement internally.

@simison
Copy link
Member Author

simison commented Feb 28, 2019

Hmm, actually I take that back; the constant is defined in Gutenberg plugin itself when running Gutenberg directly from the repo:
https://github.com/WordPress/gutenberg/blob/4472b1bf3da10f3e382b68f6e7f8894757d7c395/gutenberg.php#L13

That should really be:

if ( ! defined( 'GUTENBERG_DEVELOPMENT_MODE' ) ) {
	define ( 'GUTENBERG_DEVELOPMENT_MODE', true );
}

... I'll PR in core and revert the change here. Update: WordPress/gutenberg#14165

@simison
Copy link
Member Author

simison commented Feb 28, 2019

Good for another review. 👍

@jeherve jeherve added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. labels Feb 28, 2019
Copy link
Member

@jeherve jeherve left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me. 🚢

@jeherve jeherve merged commit f1e743e into master Feb 28, 2019
@ghost ghost removed the [Status] Ready to Merge Go ahead, you can push that green button! label Feb 28, 2019
@jeherve jeherve deleted the update/docker-install-gutenberg branch February 28, 2019 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants