From 3eca7a79d99503fe6c733d087a8c3fe8cba324bc Mon Sep 17 00:00:00 2001 From: Utkarsh Patel Date: Tue, 18 Aug 2026 10:29:57 +0530 Subject: [PATCH 1/3] Fix control styles on the gallery settings page The Layout control and the other custom controls on the gallery settings page showed the default browser button style. The controls did not get their styles. The styles are in gallery.scss. Only the block editor imported this file. The settings page app did not import it, and the enqueued styles did not include it. To correct this: - Import gallery.scss in the settings page app. - Enqueue the built css/gallery.css on the settings page. Commit 0b0b5207 removed the gallery.scss import from the settings page app. --- css/gallery-rtl.css | 1 + css/gallery.css | 1 + js/gallery-rtl.css | 1 + js/gallery.asset.php | 2 +- js/gallery.css | 1 + php/media/class-gallery.php | 11 +++++++++++ src/js/components/settings-gallery.js | 1 + 7 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 css/gallery-rtl.css create mode 100644 css/gallery.css create mode 100644 js/gallery-rtl.css create mode 100644 js/gallery.css diff --git a/css/gallery-rtl.css b/css/gallery-rtl.css new file mode 100644 index 000000000..c621ca7be --- /dev/null +++ b/css/gallery-rtl.css @@ -0,0 +1 @@ +.radio-select{align-items:center;background:none;border:none;cursor:pointer;display:flex;margin:12px 0}.radio-select:focus{color:#007cba;outline:none}.radio-select--active{color:#007cba}.radio-select--active g{fill:#007cba!important}.radio-select__label{font-size:14px;margin-left:7px}.loading-spinner-container{align-items:center;background-color:hsla(0,0%,100%,.8);display:flex;height:100%;justify-content:center;left:0;position:absolute;top:0;width:100%}.components-placeholder__fieldset{justify-content:start}.colorpalette-color-label{align-items:center;display:flex;margin:8px 0}.wp-block-cloudinary-gallery .block-editor-media-placeholder .components-placeholder__label .dashicon{margin-right:8px}.wp-block-cloudinary-gallery .block-editor-media-placeholder.is-appender .components-placeholder__label{display:none}.wp-block-cloudinary-gallery .block-editor-media-placeholder.is-appender{margin-bottom:11px;margin-top:11px;min-height:auto;padding:11px}.wp-block-cloudinary-gallery .block-editor-media-placeholder.is-appender .components-button{margin-bottom:0} \ No newline at end of file diff --git a/css/gallery.css b/css/gallery.css new file mode 100644 index 000000000..c621ca7be --- /dev/null +++ b/css/gallery.css @@ -0,0 +1 @@ +.radio-select{align-items:center;background:none;border:none;cursor:pointer;display:flex;margin:12px 0}.radio-select:focus{color:#007cba;outline:none}.radio-select--active{color:#007cba}.radio-select--active g{fill:#007cba!important}.radio-select__label{font-size:14px;margin-left:7px}.loading-spinner-container{align-items:center;background-color:hsla(0,0%,100%,.8);display:flex;height:100%;justify-content:center;left:0;position:absolute;top:0;width:100%}.components-placeholder__fieldset{justify-content:start}.colorpalette-color-label{align-items:center;display:flex;margin:8px 0}.wp-block-cloudinary-gallery .block-editor-media-placeholder .components-placeholder__label .dashicon{margin-right:8px}.wp-block-cloudinary-gallery .block-editor-media-placeholder.is-appender .components-placeholder__label{display:none}.wp-block-cloudinary-gallery .block-editor-media-placeholder.is-appender{margin-bottom:11px;margin-top:11px;min-height:auto;padding:11px}.wp-block-cloudinary-gallery .block-editor-media-placeholder.is-appender .components-button{margin-bottom:0} \ No newline at end of file diff --git a/js/gallery-rtl.css b/js/gallery-rtl.css new file mode 100644 index 000000000..17a5f61ac --- /dev/null +++ b/js/gallery-rtl.css @@ -0,0 +1 @@ +.radio-select{align-items:center;background:none;border:none;cursor:pointer;display:flex;margin:12px 0}.radio-select:focus{color:#007cba;outline:none}.radio-select--active{color:#007cba}.radio-select--active g{fill:#007cba!important}.radio-select__label{font-size:14px;margin-right:7px}.loading-spinner-container{align-items:center;background-color:hsla(0,0%,100%,.8);display:flex;height:100%;justify-content:center;position:absolute;right:0;top:0;width:100%}.components-placeholder__fieldset{justify-content:start}.colorpalette-color-label{align-items:center;display:flex;margin:8px 0}.wp-block-cloudinary-gallery .block-editor-media-placeholder .components-placeholder__label .dashicon{margin-left:8px}.wp-block-cloudinary-gallery .block-editor-media-placeholder.is-appender .components-placeholder__label{display:none}.wp-block-cloudinary-gallery .block-editor-media-placeholder.is-appender{margin-bottom:11px;margin-top:11px;min-height:auto;padding:11px}.wp-block-cloudinary-gallery .block-editor-media-placeholder.is-appender .components-button{margin-bottom:0} \ No newline at end of file diff --git a/js/gallery.asset.php b/js/gallery.asset.php index 7a344f4b1..75e92a8bb 100644 --- a/js/gallery.asset.php +++ b/js/gallery.asset.php @@ -1 +1 @@ - array('wp-block-editor', 'wp-components', 'wp-components/build-style/style.css', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '92c1913a2ab581c0270f'); + array('wp-block-editor', 'wp-components', 'wp-components/build-style/style.css', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => 'e09fae43ef7020fbad7b'); diff --git a/js/gallery.css b/js/gallery.css new file mode 100644 index 000000000..c621ca7be --- /dev/null +++ b/js/gallery.css @@ -0,0 +1 @@ +.radio-select{align-items:center;background:none;border:none;cursor:pointer;display:flex;margin:12px 0}.radio-select:focus{color:#007cba;outline:none}.radio-select--active{color:#007cba}.radio-select--active g{fill:#007cba!important}.radio-select__label{font-size:14px;margin-left:7px}.loading-spinner-container{align-items:center;background-color:hsla(0,0%,100%,.8);display:flex;height:100%;justify-content:center;left:0;position:absolute;top:0;width:100%}.components-placeholder__fieldset{justify-content:start}.colorpalette-color-label{align-items:center;display:flex;margin:8px 0}.wp-block-cloudinary-gallery .block-editor-media-placeholder .components-placeholder__label .dashicon{margin-right:8px}.wp-block-cloudinary-gallery .block-editor-media-placeholder.is-appender .components-placeholder__label{display:none}.wp-block-cloudinary-gallery .block-editor-media-placeholder.is-appender{margin-bottom:11px;margin-top:11px;min-height:auto;padding:11px}.wp-block-cloudinary-gallery .block-editor-media-placeholder.is-appender .components-button{margin-bottom:0} \ No newline at end of file diff --git a/php/media/class-gallery.php b/php/media/class-gallery.php index f16d9a024..a706b2b1d 100644 --- a/php/media/class-gallery.php +++ b/php/media/class-gallery.php @@ -220,6 +220,17 @@ public function enqueue_admin_scripts() { $this->plugin->version ); + // Styles for the shared gallery controls (e.g. the Layout radio group) + // used by the settings page preview app. These live in `gallery.scss`, + // which is bundled with the `gallery` (settings) entry but is not + // auto-enqueued, so load it explicitly here. + wp_enqueue_style( + 'cloudinary-gallery-controls-css', + $this->plugin->dir_url . 'css/gallery.css', + array(), + $this->plugin->version + ); + $script = array( 'slug' => 'gallery_config', 'src' => $this->plugin->dir_url . 'js/gallery.js', diff --git a/src/js/components/settings-gallery.js b/src/js/components/settings-gallery.js index e6cb35fe1..ee889878e 100644 --- a/src/js/components/settings-gallery.js +++ b/src/js/components/settings-gallery.js @@ -13,6 +13,7 @@ import { createRoot, render, useEffect, useState } from '@wordpress/element'; /** * Internal dependencies */ +import '../../css/gallery.scss'; import GalleryControls from '../gallery-block/controls'; import { convertColors, From 4fb3eaa519f3b1f3ce69546a8479b11b6ee0ee12 Mon Sep 17 00:00:00 2001 From: Gabriel de Tassigny Date: Fri, 21 Aug 2026 08:47:43 +0200 Subject: [PATCH 2/3] Restrict action trigger to only prod releases --- .github/workflows/build-docs.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index 30e8ae788..f4f48f6c5 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -1,11 +1,8 @@ name: Build Docs on: - push: - branches: - - master release: - types: [published] + types: [released] workflow_dispatch: permissions: From 062e632fc7435433b53f918a586ad8bcc748fbed Mon Sep 17 00:00:00 2001 From: Gabriel de Tassigny Date: Fri, 21 Aug 2026 09:17:53 +0200 Subject: [PATCH 3/3] Update pot file --- languages/cloudinary.pot | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/languages/cloudinary.pot b/languages/cloudinary.pot index 94bc936e1..d188b1a71 100644 --- a/languages/cloudinary.pot +++ b/languages/cloudinary.pot @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: Cloudinary STABLETAG\n" "Report-Msgid-Bugs-To: https://github.com/cloudinary/cloudinary_wordpress\n" -"POT-Creation-Date: 2026-08-12 10:35:06+00:00\n" +"POT-Creation-Date: 2026-08-21 07:17:30+00:00\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -768,7 +768,7 @@ msgid "Cloudinary only" msgstr "" #: php/class-sync.php:1343 php/delivery/class-lazy-load.php:543 -#: php/media/class-gallery.php:443 ui-definitions/components/header.php:19 +#: php/media/class-gallery.php:454 ui-definitions/components/header.php:19 #: ui-definitions/settings-image.php:263 ui-definitions/settings-pages.php:207 #: ui-definitions/settings-pages.php:223 ui-definitions/settings-pages.php:224 #: ui-definitions/settings-video.php:306 @@ -961,36 +961,36 @@ msgstr "" msgid "Attachment Display Settings" msgstr "" -#: php/media/class-gallery.php:392 php/media/class-gallery.php:393 +#: php/media/class-gallery.php:403 php/media/class-gallery.php:404 msgid "Gallery settings" msgstr "" -#: php/media/class-gallery.php:401 +#: php/media/class-gallery.php:412 msgid "Gallery Settings" msgstr "" -#: php/media/class-gallery.php:411 +#: php/media/class-gallery.php:422 msgid "Replace WooCommerce Gallery" msgstr "" -#: php/media/class-gallery.php:412 +#: php/media/class-gallery.php:423 msgid "" "Replace the default WooCommerce gallery with the Cloudinary Gallery on " "product pages." msgstr "" -#: php/media/class-gallery.php:420 +#: php/media/class-gallery.php:431 msgid "Cloudinary Gallery block defaults" msgstr "" -#: php/media/class-gallery.php:423 +#: php/media/class-gallery.php:434 msgid "" "The Cloudinary Gallery is available as a new block type which can be " "inserted to any post or page. Note, this is not available when using the " "classic editor." msgstr "" -#: php/media/class-gallery.php:446 +#: php/media/class-gallery.php:457 #. Translators: The HTML for opening and closing link tags. msgid "" "Watch free lessons on how to use the Gallery Settings in the %1$sCloudinary "