74363 graduate media experiments v3#75729
Open
adamsilverstein wants to merge 28 commits intowp/7.0from
Open
Conversation
…table Move the media processing module from lib/experimental/media/ to lib/media/ as part of graduating this feature from experimental status. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Remove the experiment toggle as this feature is now graduated to stable. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Remove the experiment check and always load the media processing module from its new stable location. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace experiment check with gutenberg_client_side_media_processing_enabled filter that defaults to true. This allows sites to disable the feature while keeping it enabled by default. Also rename the window global from __experimentalMediaProcessing to __clientSideMediaProcessing to reflect stable status. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add early return when client-side media processing is disabled via filter. Update docblocks and comments to reflect stable status. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Use the gutenberg_client_side_media_processing_enabled filter to determine whether to use the 6.9 compat REST controller for attachments. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Update all JavaScript references from __experimentalMediaProcessing to __clientSideMediaProcessing to reflect the stable status of this feature. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add documentation to test files and add new tests for the gutenberg_client_side_media_processing_enabled filter. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Consolidates the duplicated `gutenberg_client_side_media_processing_enabled` filter calls into a single helper function `gutenberg_is_client_side_media_processing_enabled()` in lib/load.php. This follows the same pattern as `gutenberg_is_experiment_enabled()` and reduces code duplication across three files. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
With client-side media processing enabled by default, image uploads take longer to complete because they include WASM-based processing via libvips before the actual upload. The previous 10-second default timeout for Playwright assertions was not sufficient. This commit increases the timeout to 30 seconds for assertions that wait for image uploads to complete (checking that the src attribute no longer contains a blob URL and instead contains the uploaded filename). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
With client-side media processing, the uploaded filename may be changed by the server during processing. Update the E2E tests to: 1. Check for a valid HTTP URL instead of the specific UUID filename 2. Check that the image block has a valid ID in the content 3. Remove unused fileName variables This is necessary because the upload-media module may rename files during processing (e.g., when the file is a Blob that gets converted to a File with a default name like 'image.png'). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Update cover block test to check for HTTP URL instead of filename (filename may be changed by server during processing) - Add is-transient class wait for image tests that publish posts (ensures thumbnail generation is complete before publish) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add explicit wait for Publish button to be enabled with 30s timeout in image upload tests. This ensures all background processing (thumbnail generation, sideloads) completes before attempting to publish. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Complete the window global rename started in 01c7971 by updating use-upload-save-lock and media-upload utils.
Add test plugin to disable client-side media processing for tests incompatible with cross-origin isolation (COEP/ COOP headers). Update cross-origin isolation tests to expect isolation enabled by default.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add upload-media store queue wait in site editor image upload test to handle async client-side processing completing before checking src - Fix big-image-size-threshold test: make original_image assertion conditional since client-side scaling may not set this metadata (it's a server-side behavior during wp_create_image_subsizes) - Move dimension assertions outside the -scaled suffix check since both client-side and server-side scaling should respect the threshold Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…d test Client-side media processing is not yet fully supported in the site editor context — the upload-media store pipeline gets stuck and items never leave the queue. Disable it for this test using the existing test plugin so it can use the traditional server-side upload path. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move gutenberg_is_client_side_media_processing_enabled() from lib/load.php to lib/compat/wordpress-7.0/media.php per the convention for release-specific features. Rename the filter from gutenberg_ to wp_ prefix for Core migration.
These were development-only helpers that are no longer needed for the graduated client-side media processing feature.
The feature is no longer experimental, so the variable name should reflect its actual purpose.
This JS global is no longer experimental. Moving it to lib/media/load.php which already gates on the feature being enabled.
Rename __experimentalMediaProcessing to __clientSideMediaProcessing in image block edit.js, and remove gutenberg-media-processing from test bootstrap experiments since the feature is now graduated. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
COEP headers break TinyMCE iframe initialization, causing the wp-editor meta box E2E test to fail. This matches the fix already applied in the classic block test.
COOP headers cause browsing context replacement during page navigations, breaking Playwright's page reference. This affects template creation and revert tests in both the post editor and site editor.
The call was at the top level of the file, executing during plugin load before enqueue hooks fire. Wrap it in a function hooked to admin_init, matching the pattern in editor-settings.php.
|
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 If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Size Change: +42 B (0%) Total Size: 6.84 MB
ℹ️ View Unchanged
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
Closes
Why?
How?
Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast