-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Style engine: pre-core migration documentation and house keeping #43840
Conversation
Size Change: -1.89 kB (0%) Total Size: 1.25 MB
ℹ️ View Unchanged
|
packages/style-engine/docs/using-the-style-engine-with-block-supports.md
Outdated
Show resolved
Hide resolved
b07ae52
to
07c978a
Compare
packages/style-engine/docs/using-the-style-engine-with-block-supports.md
Show resolved
Hide resolved
This is looking good to me @ramonjd, thanks for all the house keeping here! Just left a couple of comments about how we can expose the added document. The only issue I ran into is that I couldn't access the |
I'm not sure either 🤔 I tried a bunch of stuff, and compared the package with other packages but can't see anything that stands out. I must be missing something. Maybe @gziolo has a few tips for us 😄 |
12a9618
to
960e024
Compare
@@ -39,7 +39,6 @@ public function test_enqueue_stored_styles() { | |||
$core_styles_to_enqueue, | |||
array( | |||
'context' => 'block-supports', | |||
'enqueue' => true, |
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.
The enqueue
option doesn't do anything and is deprecated.
894ffe6
to
2b8cf11
Compare
Looks like this is pretty much ready. Would someone mind rebasing and giving their final approval so we can get land this for WP 6.1? cc/ @andrewserong @aristath 😊 |
…eady to populate with real changes :P
ff7db37
to
19b6885
Compare
Rebased 🍺 |
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.
Thanks so much for rebasing @ramonjd, I was just about to do that! 😄
This is looking good to me, just smoke tested that it's still all working correctly in the post and site editors, and in server rendering block supports on the site front end 👍
The style engine is also available on the global wp
object, too:
LGTM! 🎉
@c4rl0sbr4v0 Let's include this on in GB 14.1 stable 🙂 |
) * Initial commit. Adding further documentation, cleaning up changelog ready to populate with real changes :P * Typos, formatting * Typos, formatting * Sorting out change log and formatting * Remove enqueue option. It does nothing. * Update packages/style-engine/docs/using-the-style-engine-with-block-supports.md No empty lines! :D Co-authored-by: Ari Stathopoulos <aristath@gmail.com> * Update README.md typo * Updating manifest.json to include new style engine docs Splitting the global functions out of the class files Checking for the directory when loading rather than each individual file * Adding type annotation * Updating CHANGELOG.md * Updated version to prerelease Reverted JS comments for TS types and rebuilt docs Removed style engine from bundle exception array * Rebase after #43886 * Updating change logs and emphasizing that new global JS methods are available since 6.1 * Checking for functions and classes in tests so that Gutenberg tests don't fail during the backport to Core. This is valid for 6.1. After that, developing the packages might require another solution, such as testing against `gutenberg_` prefixed functions. * Formatting PHP doc comments and params that describe associative arrays Updating test function names and annotations. * Formatting * Combining tests for get_declarations_string Updating php doc params * Adding message parameter to assertions where more than one assertion is used in a test method. * Updating PHP docs Testing for WP_Style_Engine_CSS_Rules_Store in WP_Style_Engine_Processor->add_store * Text domain added to __() * Refactoring sanitization tests for CSS declarations Counting calls to mock filters executed in safecss_filter_attr() (kses.php) * Formatting styleEngine tests Removing duplicated test (we were already testing context below) * My blod is typo * Active voice rather than imperative * Remove Gutenberg suffix * Adding message to script loader block support enqueuing expectations * Grammar, formatting, removing class_exists checks * Ignore unused variable. This is a common test pattern in Core. * Remove unusued var in tests Co-authored-by: Ari Stathopoulos <aristath@gmail.com>
|
) * Initial commit. Adding further documentation, cleaning up changelog ready to populate with real changes :P * Typos, formatting * Typos, formatting * Sorting out change log and formatting * Remove enqueue option. It does nothing. * Update packages/style-engine/docs/using-the-style-engine-with-block-supports.md No empty lines! :D Co-authored-by: Ari Stathopoulos <aristath@gmail.com> * Update README.md typo * Updating manifest.json to include new style engine docs Splitting the global functions out of the class files Checking for the directory when loading rather than each individual file * Adding type annotation * Updating CHANGELOG.md * Updated version to prerelease Reverted JS comments for TS types and rebuilt docs Removed style engine from bundle exception array * Rebase after #43886 * Updating change logs and emphasizing that new global JS methods are available since 6.1 * Checking for functions and classes in tests so that Gutenberg tests don't fail during the backport to Core. This is valid for 6.1. After that, developing the packages might require another solution, such as testing against `gutenberg_` prefixed functions. * Formatting PHP doc comments and params that describe associative arrays Updating test function names and annotations. * Formatting * Combining tests for get_declarations_string Updating php doc params * Adding message parameter to assertions where more than one assertion is used in a test method. * Updating PHP docs Testing for WP_Style_Engine_CSS_Rules_Store in WP_Style_Engine_Processor->add_store * Text domain added to __() * Refactoring sanitization tests for CSS declarations Counting calls to mock filters executed in safecss_filter_attr() (kses.php) * Formatting styleEngine tests Removing duplicated test (we were already testing context below) * My blod is typo * Active voice rather than imperative * Remove Gutenberg suffix * Adding message to script loader block support enqueuing expectations * Grammar, formatting, removing class_exists checks * Ignore unused variable. This is a common test pattern in Core. * Remove unusued var in tests Co-authored-by: Ari Stathopoulos <aristath@gmail.com>
I just cherry-picked this PR to the wp/6.1 branch to get it included in the next release: 0fc7a57 |
What?
Adding further documentation, cleaning up change log ready to populate with real changes (TODO) :P
Removing trailing references to
'enqueue' => true,
Updating PHP unit tests to conform with WordPress PHP test standards: https://make.wordpress.org/core/handbook/testing/automated-testing/writing-phpunit-tests/
Why?
Getting the style engine package into a reasonable state to migrate to core for 6.1.
See backport PR: WordPress/wordpress-develop#3199
TODO
Testing Instructions
wp.styleEngine.compileCSS
andwp.styleEngine.getCSSRules
are available in the global window scope in the editor.