Skip to content

Commit 5bd9fc4

Browse files
authored
Merge pull request #1238 from cloudinary/fix/gallery-settings-layout-controls-styling
Fix control styles on the gallery settings page
2 parents ec0934f + 3eca7a7 commit 5bd9fc4

7 files changed

Lines changed: 17 additions & 1 deletion

File tree

css/gallery-rtl.css

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/gallery.css

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/gallery-rtl.css

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/gallery.asset.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?php return array('dependencies' => array('wp-block-editor', 'wp-components', 'wp-components/build-style/style.css', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '92c1913a2ab581c0270f');
1+
<?php return array('dependencies' => array('wp-block-editor', 'wp-components', 'wp-components/build-style/style.css', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => 'e09fae43ef7020fbad7b');

js/gallery.css

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

php/media/class-gallery.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,17 @@ public function enqueue_admin_scripts() {
220220
$this->plugin->version
221221
);
222222

223+
// Styles for the shared gallery controls (e.g. the Layout radio group)
224+
// used by the settings page preview app. These live in `gallery.scss`,
225+
// which is bundled with the `gallery` (settings) entry but is not
226+
// auto-enqueued, so load it explicitly here.
227+
wp_enqueue_style(
228+
'cloudinary-gallery-controls-css',
229+
$this->plugin->dir_url . 'css/gallery.css',
230+
array(),
231+
$this->plugin->version
232+
);
233+
223234
$script = array(
224235
'slug' => 'gallery_config',
225236
'src' => $this->plugin->dir_url . 'js/gallery.js',

src/js/components/settings-gallery.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import { createRoot, render, useEffect, useState } from '@wordpress/element';
1313
/**
1414
* Internal dependencies
1515
*/
16+
import '../../css/gallery.scss';
1617
import GalleryControls from '../gallery-block/controls';
1718
import {
1819
convertColors,

0 commit comments

Comments
 (0)