-
Notifications
You must be signed in to change notification settings - Fork 800
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
Newsletter: Email preview: Access Selector improvementes #38751
Conversation
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. Once your PR is ready for review, check one last time that all required checks appearing at the bottom of this PR are passing or skipped. 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. |
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
...jetpack/_inc/lib/core-api/wpcom-endpoints/class-wpcom-rest-api-v2-endpoint-email-preview.php
Show resolved
Hide resolved
@crisbusquets I think I fixed the issue you were seeing, it's ready for review again, but don't look at design just yet! Will do a proper Design iteration once functionality is working 😄 |
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.
Nice work.
I think in a follow up PR we should deal with cases where the post is set to not send emails since this makes it so that we currently can't show a preview.
__experimentalToggleGroupControl as ToggleGroupControl, | ||
__experimentalToggleGroupControlOption as ToggleGroupControlOption, | ||
__experimentalToggleGroupControlOptionIcon as ToggleGroupControlOptionIcon, |
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.
To use those experimental APIs, you would need to add linting exceptions:
__experimentalToggleGroupControl as ToggleGroupControl, | |
__experimentalToggleGroupControlOption as ToggleGroupControlOption, | |
__experimentalToggleGroupControlOptionIcon as ToggleGroupControlOptionIcon, | |
__experimentalToggleGroupControl as ToggleGroupControl, // eslint-disable-line @wordpress/no-unsafe-wp-apis | |
__experimentalToggleGroupControlOption as ToggleGroupControlOption, // eslint-disable-line @wordpress/no-unsafe-wp-apis | |
__experimentalToggleGroupControlOptionIcon as ToggleGroupControlOptionIcon, // eslint-disable-line @wordpress/no-unsafe-wp-apis |
Since those may not be available depending on the site's version of Gutenberg / core installed, I would recommend adding a fallback to ensure no errors, when ToggleGroupControl
, ToggleGroupControlOption
, or ToggleGroupControlOptionIcon
do not exist. You can check
jetpack/projects/plugins/jetpack/extensions/shared/components/ai-model-selector-control/index.tsx
Lines 36 to 40 in 0bc9ec9
/* | |
* Add a fallback for the ToggleGroupControlOption component, | |
* since it is experimental and might not be available in all versions of Gutenberg. | |
*/ | |
if ( ! ToggleGroupControlOption || ! ToggleGroupControl ) { |
Proposed changes:
Other information:
Jetpack product discussion
Does this pull request change what data or activity we track or use?
Testing instructions:
JETPACK__SANDBOX_DOMAIN
to your sandbox.&showNewsletterMenu
to the url.