-
Notifications
You must be signed in to change notification settings - Fork 808
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
Blocks: Add get_variation method #41589
base: trunk
Are you sure you want to change the base?
Conversation
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available. Follow this PR Review Process:
Still unsure? Reach out in #jetpack-developers for guidance! Jetpack plugin: The Jetpack plugin has different release cadences depending on the platform:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. |
Code Coverage SummaryNo summary data is avilable for parent commit 71ea4c6, cannot calculate coverage changes. 😴 If that commit is a feature branch rather than a trunk commit, this is expected. Otherwise, you might try re-running the Tests / Publish coverage data job on this PR once the corresponding job on the trunk commit has succeeded. |
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 tests well for me. I left a few notes below.
projects/plugins/jetpack/changelog/add-blocks-get_variation-method
Outdated
Show resolved
Hide resolved
@jeherve Can you take a look at the tests here. Should I break this up into two PRs. One that adds the new method to the blocks package and then one where we deprecated the method? |
Co-authored-by: Jeremy Herve <[email protected]>
Co-authored-by: Jeremy Herve <[email protected]>
Co-authored-by: Jeremy Herve <[email protected]>
Co-authored-by: Jeremy Herve <[email protected]>
Co-authored-by: Jeremy Herve <[email protected]>
321adde
to
5de3f86
Compare
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.
Can you take a look at the tests here.
I added some tests in e52d465
Should I break this up into two PRs. One that adds the new method to the blocks package and then one where we deprecated the method?
I think it's fine to do both at the same time, as long as you ensure we do not use the deprecated method anywhere.
This Pr adds a helper method for getting the variation that you want to use.
Note:
The new method could also be used in the videopress package but I wasn't sure how I would go about testing this.
Also currently the package doesn't have the blocks dependency.
@jeherve How should I deprecate the jetpack method. Should I add the
_doing_it_wrong
?Proposed changes:
Other information:
Jetpack product discussion
Does this pull request change what data or activity we track or use?
No
Testing instructions:
Load the PR.
Go to the block editor.
Notice that if you have the variation 'beta' set that you see some beta blocks.
Notice that you see some experiments blocks as well if you have the experimental variation set.