Skip to content

Conversation

@ramonjd
Copy link
Member

@ramonjd ramonjd commented Sep 19, 2022

🎼 So much, So much clean 🎶

This is combination of of @ockham's changes in #3259, which is a fork of @ramonjd's #3218.

The purpose here is to

Original PR desc:

Backporting changes to script-loader that enqueue block support styles stored by the style engine

See tracking issue: WordPress/gutenberg#43440

Backporting the following changes
WordPress/gutenberg#42880
(WordPress/gutenberg#4288 has testing instructions.)

Props to @gziolo and @ockham

Trac ticket: https://core.trac.wordpress.org/ticket/56467


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

$style_tag_id = 'core';
foreach ( $core_styles_keys as $style_key ) {
// Adds comment if code is prettified to identify core styles sections in debugging.
$should_prettify = isset( $options['prettify'] ) ? true === $options['prettify'] : defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG;
Copy link
Contributor

Choose a reason for hiding this comment

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

Could consider moving this line before of the loop. (Not a blocker ofc.)

Copy link
Contributor

Choose a reason for hiding this comment

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

Agreed @ockham. While not a blocker, it's a quick change that could be made in the PR or prior to commit.

Copy link
Contributor

@ockham ockham left a comment

Choose a reason for hiding this comment

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

Thanks @ramonjd! LGTM :shipit:

Copy link
Contributor

@costdev costdev left a comment

Choose a reason for hiding this comment

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

Just one minor thought but other than that, LGTM! 👍

@audrasjb audrasjb self-assigned this Sep 19, 2022
Copy link
Contributor

@audrasjb audrasjb left a comment

Choose a reason for hiding this comment

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

LGTM. I committed the two proposed changes.

@audrasjb
Copy link
Contributor

Committed in https://core.trac.wordpress.org/changeset/54214

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects

Development

Successfully merging this pull request may close these issues.

4 participants