-
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
Sync shadow presets support in theme.json #3915
Conversation
45ac4fa
to
8a12e9c
Compare
I just pushed the Cc @oandregal |
👍 Good call, those changes pertain to this feature as well. |
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.
Code changes look good, it has tests, and I verified that it works as expected following the test instructions at WordPress/gutenberg#46813
Current reviewing. There are a few tweaks needed to the tests. And there's a merge conflict. |
fec0a49
to
020373c
Compare
Rebase this PR on top of |
$this->assertEquals( $styles, $theme_json->get_stylesheet(), 'Returned of "::get_stylesheet" does not match expectations' ); | ||
$this->assertEquals( $styles, $theme_json->get_stylesheet( array( 'variables' ) ), 'Returned of "::get_stylesheet" does not match expectations' ); |
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.
- use
assertSame()
- Failure messages need to be different to identify which assertion failed.
Commit coming.
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.
Resolved in 5e3e536.
$element_styles = 'a:where(:not(.wp-element-button)){box-shadow: var(--wp--preset--shadow--natural);}.wp-element-button, .wp-block-button__link{box-shadow: var(--wp--preset--shadow--natural);}p{box-shadow: var(--wp--preset--shadow--natural);}'; | ||
$styles = $global_styles . $element_styles; | ||
|
||
$this->assertEquals( $styles, $theme_json->get_stylesheet() ); |
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.
- use
assertSame()
Commit coming.
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.
Resolved in 5e3e536.
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.
- Confirmed both GB PRs are present in this PR ✅
- Changes are noted in
@since 6.2.0
✅ - Includes tests ✅
- Has a test report ✅
Ready for commit.
Committed via https://core.trac.wordpress.org/changeset/55176. |
Trac ticket: https://core.trac.wordpress.org/ticket/57559
Gutenberg PRs: