Conversation
|
Flaky tests detected in 2cc7fc5. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/6197299771
|
There was a problem hiding this comment.
This seems good to me, thanks @spacedmonkey for following-up on #54496 #54424.
I'm leaving a pre-emptive approval on this because all that remains is filling in the PR description and taking care of some styling issues that CI will reject.
|
👋 @dmsnell This is on the 6.4 Editor Tasks board, so I'm wondering if this needs to be merged ready for the upcoming 6.4 RC. As @spacedmonkey is away at the moment, I wondered if you could help here. I'm happy to help fix the CS issues, but I'm not sure how high a priority this is or if it's not ready to be merged yet. Thank you! |
* Remove empty attrs. * Fix linter errors --------- Co-authored-by: Sarah Norris <sarah@sekai.co.uk>
|
I just cherry-picked this PR to the 6.4-rc1-2 branch to get it included in the next release: 0afdb21 |
* Add selector as id to layout style overrides. (#55291) * Fix flickering when focusing on global style variations (#55267) * ProgressBar: use text color to ensure enough contrast against background (#55285) * Use text color at different opacities for track and indicator * Add high contrast mode styles * CHANGELOG # Conflicts: # packages/components/CHANGELOG.md * Remove empty attrs. (#54496) * Remove empty attrs. * Fix linter errors --------- Co-authored-by: Sarah Norris <sarah@sekai.co.uk> * Add IS_GUTENBERG_PLUGIN flag to LastRevision (#55253) * useBlockPreview: Try outputting EditorStyles to ensure local style overrides are rendered (#55288) * useBlockPreview: Try alternative fix for displaying local style overrides * Avoid duplicate styles, fix rendering issues in Safari * Add more explanatory comments * Remove additional check for styles within the block preview, as it is not needed since EditorStyles handles its own style overrides retrieval * Bug: PHP notice when an image with lightbox is deleted (#55370) * Fix PHP notice when an image with lightbox is deleted * Fix PHP notice when an image with lightbox is deleted --------- Co-authored-by: tellthemachines <tellthemachines@users.noreply.github.com> Co-authored-by: Aki Hamano <54422211+t-hamano@users.noreply.github.com> Co-authored-by: Marco Ciampini <marco.ciampo@gmail.com> Co-authored-by: Jonny Harris <spacedmonkey@users.noreply.github.com> Co-authored-by: Andrew Serong <14988353+andrewserong@users.noreply.github.com> Co-authored-by: Kishan Jasani <kishanjasani007@yahoo.in>
What?
Following work in #54424, this replaces the
$empty_attrsobject, which used to have a role, with an empty array wherever it was previously used.Why?
The reason for having the property was that the block parser used to create a special object for empty attributes to disambiguate an empty object and an empty array in JSON. Because the block parser no longer creates this special object there's no more need to have an
$empty_attrsproperty. It's not causing harm, but its continued presence might confuse people who are wondering what its purpose is.How?
Directly replaces the property lookup with in-place
array()construction.Testing Instructions
A basic smoke test should verify failure because any problem in the block parser is likely to break a site in obvious ways. Ensure that the test suite passes.