Repository navigation
Ensure compatibility with WordPress 7.2 - #1377
Draft
utkarshcloudinary wants to merge 1 commit into
Draft
utkarshcloudinary wants to merge 1 commit into
utkarshcloudinary wants to merge 1 commit into
Conversation
The committed bundles were built before the latest wordpress group bump, so they still contained @wordpress/components 43. Rebuild them from the current lockfile (@wordpress/components 44.0.0, @wordpress/ui 0.26.0, @wordpress/dataviews 22.0.0). These are the minimum versions that the WordPress 7.2 dev note on CSS module class name collisions requires for plugins that bundle these packages. gallery-ui.css bundles the @wordpress/components styles.
This branch has not been deployed
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.
Approach
Tested the plugin against WordPress 7.2 and compared the results with 7.1.4. The first round ran on
7.2-beta5-65536. The plugin was tested again on7.2-RC2and checked against the WordPress 7.2 Field Guide. No regressions were found.Change
wordpressgroup bump and still contained@wordpress/components43. They now use@wordpress/components44.0.0,@wordpress/ui0.26.0 and@wordpress/dataviews22.0.0. These are the minimum versions in the 7.2 dev note Update bundled @wordpress/* packages … to fix CSS module class name collisions.css/gallery-ui.cssbundles the@wordpress/componentsstyles, so this applies to the plugin.Client-side media processing (new in 7.2), tested on RC2 in Chrome
/wp/v2/media, then/sideload, then/finalize, and no longer throughasync-upload.php.Document-Isolation-Policy: isolate-and-credentialless). The Cloudinary tab in the media modal still loads, and the browser still sends the user's Cloudinary login cookie to it.test-image-6-300x225.jpg/test-image-6-300x225.jpg.jpg). The classic upload path gives the same result, so this is not caused by 7.2.Checked against the Field Guide; no change needed
dashicons-cloudinaryfont icon, which has nocore-adminreplacement, so it renders as before. The admin bar node has noab-icon, and no plugin CSS targets core menu or admin bar icons.asprop, the deprecated components,asButtons,FontFamilyControl,__experimentalGroup,__experimentalImageEditoror the style-state API.registry.subscribeinterms-inspector.jsdoes not pass a store name, so the 7.2 change to it does not affect the plugin.wp_start_cross_origin_isolation_output_buffer()orwp_add_crossorigin_attributes(). The plugin still self-hosts its media library script (Cloudinary media tab broken under WP 7.1 + Chromium ≥ 137: all.js blocked by CORS (crossorigin="anonymous" stamped by wp_set_up_cross_origin_isolation) #1254). 7.2 no longer adds thecrossoriginattribute, but 7.1 still does, so the workaround stays.show_in_rest, not revisioned) is no longer reset when a revision is restored. This is a fix, not a regression.statusparameter,rest_allowed_cors_methods,NO_BACKSLASH_ESCAPES, the compression constants or text shadow./random/redirects do not apply, because both plugin post types usepublic => false.Results on 7.2-RC2
JQMIGRATE: DEPRECATED: jQuery.proxy()on the Media grid. It comes from core. The plugin does not calljQuery.proxy().Follow-up for 7.3 (not a 7.2 blocker)
$.isFunction, which is called insrc/js/wp-color-picker-alpha.js(lines 545, 599, 626) andsrc/js/components/settings-page.js(line 36). Those calls must be replaced before 7.3.Already present on 7.1.4 (out of scope)
cloudinary/galleryuses blockapiVersion: 2, which has been deprecated since 6.9.src/js/components/video.jscallsgetMedia, which has been deprecated since 6.9.cloudinary.Cloudinary.new()in the video preview templates.Attempt to read property "post_title" on nullinphp/assets/class-rest-assets.phpwhen a cache point is missing.wp cloudinary syncpass, the relationship row keepspublic_idNULL until a later read. This can make the video delivery E2E test fail sometimes.Not tested
Tested up toinreadme.txtis still 7.1.4. Bump it when 7.2 ships (Dec 8).QA notes
"core": "https://wordpress.org/wordpress-7.2-RC2.zip"(or a later RC) in.wp-env.override.json, then runnpm run env:start.default, runnpx wp-env run tests-cli wp plugin activate cloudinary_wordpressandnpx wp-env run tests-cli wp theme activate twentytwentyfive.npm run test:unitandnpm run test:e2e.localhostor HTTPS:window.crossOriginIsolatedistruein the console./wp/v2/media,/sideloadand/finalizerequests.res.cloudinary.com, and that the GIF stays animated.