-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Backport script loader: enqueue stored block supports styles (refresh) #3259
Backport script loader: enqueue stored block supports styles (refresh) #3259
Conversation
Backporting block supports filter callback and registrations
3f828d5
to
23a38f8
Compare
Unit tests are failing 😕
Edit: Looks like comments and whitespace aren't removed as expected 🤔 |
A similar issue seems to be present over at #3237 (comment) and #3204 (comment). |
I believe the test failure with this one is slightly different to those other two PRs. For the other two PRs, the inline styles tests likely need to be updated to either expect no space between the colon and the value (since the style engine intentionally switched inline style output to remove the space), or for the tests to be more permissive of spaces (i.e. remove spaces between property + colon and value before doing the comparison). For this one, I think the issue is that (inferring from the test failures) the tests in core appear to be run with As far as I can tell, for these tests, the So, what's the best fix for these particular tests? Given that I've opened up (yet another 😅) fork of this changeset in #3262 to try that out. But feel free to close that / copy + paste anything from there if it's helpful. |
Thanks for looking into this folks. Sorry I was out of action last week. Yeah, while I was running these tests locally There was a recent change to Would that be kosher?
Thank you @andrewserong !!! |
Passing |
Okey dokey! I'll update this PR, but let's keep #3262 just in case there are doubts. 🙇 |
|
||
wp_enqueue_stored_styles(); | ||
|
||
$this->assertEquals( |
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 a hangover from my original PR.
I think it's better to use assertSame
here for string comparisons and assertEquals
for objects etc
$this->assertEquals( | |
$this->assertSame( |
'Registered styles with handle of "core-block-supports" do not match expected value from Style Engine store.' | ||
); | ||
|
||
$this->assertEquals( |
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.
As above.
$this->assertEquals( | |
$this->assertSame( |
), | ||
); | ||
|
||
// Enqueue some other styles. |
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.
I forgot to change this verb tense from imperative to third person present
// Enqueue some other styles. | |
// Enqueues some other styles. |
@ockham I've added a Gutenberg PR with the proposed changes mentioned in the comment above. Happy to refork this PR with the changes if you don't have the bandwidth to port them across to this PR. |
Update PR here: #3273 If you're happy with that, we can close this PR |
…sts to 6.1. This changeset backports the following changes: - Implement [WordPress/gutenberg#42880 gutenberg#42880]: Backport script loader: enqueue stored block supports styles - Allow a way to bypass `SCRIPT_DEBUG` in tests. See [WordPress/wordpress-develop#3259 (comment) comment] and the related [WordPress/gutenberg#44248 Gutenberg pull request] Props ramonopoly, gziolo, bernhard-reiter, audrasjb, costdev. See #56467. Built from https://develop.svn.wordpress.org/trunk@54214 git-svn-id: http://core.svn.wordpress.org/trunk@53773 1a063a9b-81f0-0310-95a4-ce76da25c4cd
…sts to 6.1. This changeset backports the following changes: - Implement [WordPress/gutenberg#42880 gutenberg#42880]: Backport script loader: enqueue stored block supports styles - Allow a way to bypass `SCRIPT_DEBUG` in tests. See [WordPress/wordpress-develop#3259 (comment) comment] and the related [WordPress/gutenberg#44248 Gutenberg pull request] Props ramonopoly, gziolo, bernhard-reiter, audrasjb, costdev. See #56467. Built from https://develop.svn.wordpress.org/trunk@54214 git-svn-id: https://core.svn.wordpress.org/trunk@53773 1a063a9b-81f0-0310-95a4-ce76da25c4cd
…sts to 6.1. This changeset backports the following changes: - Implement [WordPress/gutenberg#42880 gutenberg#42880]: Backport script loader: enqueue stored block supports styles - Allow a way to bypass `SCRIPT_DEBUG` in tests. See [WordPress#3259 (comment) comment] and the related [WordPress/gutenberg#44248 Gutenberg pull request] Props ramonopoly, gziolo, bernhard-reiter, audrasjb, costdev. See #56467. git-svn-id: https://develop.svn.wordpress.org/trunk@54214 602fd350-edb4-49c9-b593-d223f7449a82
🎼 So Fresh, So Clean 🎶
This is a fork of @ramonjd's #3218, to rebase it (now that #3199 has been merged), and to address feedback by @gziolo.
Original PR desc:
(WordPress/gutenberg#4288 has testing instructions.)
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.