Uh oh!
There was an error while loading. Please reload this page.
Backport script loader: enqueue stored block supports styles (refresh) - #3259
Backport script loader: enqueue stored block supports styles (refresh)#3259ockham wants to merge 6 commits into
Conversation
Backporting block supports filter callback and registrations
3f828d5 to
23a38f8CompareUh oh!
There was an error while loading. Please reload this page.
Unit tests are failing 😕 Edit: Looks like comments and whitespace aren't removed as expected 🤔 |
ockham
commented
Sep 15, 2022
A similar issue seems to be present over at #3237 (comment) and #3204 (comment). |
andrewserong
commented
Sep 16, 2022
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 !!! |
andrewserong
commented
Sep 18, 2022
Passing |
ramonjd
commented
Sep 19, 2022
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.
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.
As above.
| $this->assertEquals( | |
| $this->assertSame( |
| ), | ||
| ); | ||
| // Enqueue some other styles. |
There was a problem hiding this comment.
I forgot to change this verb tense from imperative to third person present
| // Enqueue some other styles. | |
| // Enqueues some other styles. |
ramonjd
commented
Sep 19, 2022
@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. |
ramonjd
commented
Sep 19, 2022
Update PR here: #3273 If you're happy with that, we can close this PR |
ockham
commented
Sep 19, 2022
…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.