Skip to content

Promote Image Generation from an Experiment to a Feature#418

Open
dkotter wants to merge 9 commits intoWordPress:developfrom
dkotter:feature/promote-image-gen
Open

Promote Image Generation from an Experiment to a Feature#418
dkotter wants to merge 9 commits intoWordPress:developfrom
dkotter:feature/promote-image-gen

Conversation

@dkotter
Copy link
Copy Markdown
Collaborator

@dkotter dkotter commented Apr 10, 2026

What?

Partially closes #234, #416

At a code-level, change the Image Generation Feature to be a stable Feature instead of an Experimental Feature.

Why?

The groundwork was laid in #316 to distinguish between an experimental Feature and a stable Feature. We left all Features as experimental but now want to promote certain ones that we feel have been thoroughly tested and bring significant value. We are starting with the Image Generation (which also includes Image Editing) Feature.

Note this only modifies things at the code-level, not the UI. Those changes are coming in #417. Worth noting that until that PR is merged, the Image Generation Feature will start to show in an existing "Other Features" section (from the current Editor Experiments section):

Other Experiments admin settings section showing the Image Generation and Editing Feature

How?

  • Move the Image_Generation class from the Experiments directory to the Features directory
  • Mark this Feature as stable and remove the Experiment category of Editor
  • Add a new features directory within our src directory and move all Image Generation JS code here
  • Ensure this Feature is loaded properly and removed from loading as an Experiment
  • Move all tests (E2E and unit) into a new Features directory and out of the Experiments directory for consistency
  • Update docs

Use of AI Tools

None

Testing Instructions

  1. Pull this PR down and run npm i && npm run build
  2. Go to the settings page and ensure you no longer see Image Generation and Editing in the Editor Experiments section but you do see it in the Other Features section (again, this is temporary until Add visual-card presentation for featured experiments #417 is done)
  3. Turn this Feature on and test it thoroughly, ensuring you have a Provider connected (like Google) that supports image generation and editing
Open WordPress Playground Preview

@dkotter dkotter added this to the 0.8.0 milestone Apr 10, 2026
@dkotter dkotter self-assigned this Apr 10, 2026
@github-actions
Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: dkotter <dkotter@git.wordpress.org>
Co-authored-by: justlevine <justlevine@git.wordpress.org>
Co-authored-by: jeffpaul <jeffpaul@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@@ -42,7 +41,7 @@ protected function load_metadata(): array {
return array(
'label' => __( 'Image Generation and Editing', 'ai' ),
'description' => __( 'Generate and edit images using AI', 'ai' ),
'category' => Experiment_Category::EDITOR,
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note I removed this category as we currently have that marked as an Experiment Category, and the only place we use this is determining what section a Feature shows within our settings page (this defaults to "Other" if not set).

In #417 we'll start showing stable Features in a new section up top so I don't think categories are needed anymore for stable Features. That said, we can introduce Feature Categories (maybe matching what we have for Experiment Categories, Editor and Admin) if we think that would still be useful to have

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 10, 2026

Codecov Report

❌ Patch coverage is 50.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 65.75%. Comparing base (cf338eb) to head (22ffbe1).

Files with missing lines Patch % Lines
...des/Features/Image_Generation/Image_Generation.php 33.33% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             develop     #418   +/-   ##
==========================================
  Coverage      65.75%   65.75%           
  Complexity       763      763           
==========================================
  Files             53       53           
  Lines           3863     3863           
==========================================
  Hits            2540     2540           
  Misses          1323     1323           
Flag Coverage Δ
unit 65.75% <50.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant