[FORNO-229] Image Studio: Enable Image Studio if AI Feature is enabled#47453
[FORNO-229] Image Studio: Enable Image Studio if AI Feature is enabled#47453kat3samsin wants to merge 9 commits intotrunkfrom
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 🤖 Follow this PR Review Process:
If you have questions about anything, 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 SummaryCoverage changed in 1 file.
|
There was a problem hiding this comment.
Pull request overview
This PR enables Image Studio when the Big Sky plugin is installed and enabled. It adds a new is_big_sky_enabled() helper function that checks for the presence of the Big_Sky class and a big_sky_enable option, and hooks it into is_image_studio_enabled() as an additional activation condition alongside the existing filter-based checks.
Changes:
- Added
is_big_sky_enabled()helper function toimage-studio.phpthat detects the Big Sky plugin and its enabled option - Updated
is_image_studio_enabled()to also returntruewhen Big Sky is active - Added comprehensive test coverage for both
is_big_sky_enabled()and its integration withis_image_studio_enabled(), with proper test isolation via option management inset_up/tear_down
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
extensions/plugins/image-studio/image-studio.php |
Adds is_big_sky_enabled() function and integrates it into is_image_studio_enabled() |
tests/php/extensions/plugins/image-studio/Image_Studio_Test.php |
Adds test isolation (option in set_up/tear_down), simulate_big_sky_class() helper, and 9 new test cases |
changelog/forno-229-disable-image-studio-in-big-sky |
Changelog entry for the patch |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
projects/plugins/jetpack/extensions/plugins/image-studio/image-studio.php
Show resolved
Hide resolved
projects/plugins/jetpack/changelog/forno-229-disable-image-studio-in-big-sky
Show resolved
Hide resolved
projects/plugins/jetpack/changelog/forno-229-disable-image-studio-in-big-sky
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
projects/plugins/jetpack/tests/php/extensions/plugins/image-studio/Image_Studio_Test.php
Show resolved
Hide resolved
28652d3 to
27bd1ac
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
projects/plugins/jetpack/changelog/forno-229-enable-image-studio-when-big-sky-enabled
Show resolved
Hide resolved
t-wright
left a comment
There was a problem hiding this comment.
Tested on simple by toggling AI assistant to disable Big Sky. Works as expected!
Thank you for testing! I realized there will be a short period where Jetpack will not be updated immediately in WoA due to weekly release cadence. I set the |
I realized we shouldn't disable Image Studio because we have Jetpack connected and AI features enabled. |
projects/plugins/jetpack/extensions/plugins/image-studio/image-studio.php
Show resolved
Hide resolved
The test_is_big_sky_enabled_false_when_class_missing test now skips gracefully if Big_Sky was already defined by a prior test, since PHP class definitions persist for the process lifetime.
6398754 to
1cd9f1a
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
projects/plugins/jetpack/extensions/plugins/image-studio/image-studio.php
Outdated
Show resolved
Hide resolved
projects/plugins/jetpack/tests/php/extensions/plugins/image-studio/Image_Studio_Test.php
Outdated
Show resolved
Hide resolved
projects/plugins/jetpack/tests/php/extensions/plugins/image-studio/Image_Studio_Test.php
Outdated
Show resolved
Hide resolved
Require has_ai_features() AND (is_automattician() || is_big_sky_enabled()) for Image Studio to load. Uses \is_automattician() on Simple sites, AT_PROXIED_REQUEST on Atomic/self-hosted. Includes updated unit tests for the new enablement logic.
87a6ead to
a928b19
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
projects/plugins/jetpack/extensions/plugins/image-studio/image-studio.php
Outdated
Show resolved
Hide resolved
projects/plugins/jetpack/extensions/plugins/image-studio/image-studio.php
Show resolved
Hide resolved
…-studio.php Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Fixes #
Proposed changes:
OR
jetpack_ai_enabledOther information:
Jetpack product discussion
Does this pull request change what data or activity we track or use?
Testing instructions:
See Big Sky PR
Changelog