From 4bd8575f0faef5fe55d99abdc86bd7ddadd9a546 Mon Sep 17 00:00:00 2001 From: Marc Berger Date: Fri, 19 Jul 2024 12:00:14 -0700 Subject: [PATCH 01/11] feat(SHS-5629): Add patch to allow editing of media items in a modal from a node edit page --- composer.json | 3 +- composer.lock | 215 +++++++++++---------- patches/2985168-172.patch | 388 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 501 insertions(+), 105 deletions(-) create mode 100644 patches/2985168-172.patch diff --git a/composer.json b/composer.json index 7bd3a0f575..67ef68360f 100644 --- a/composer.json +++ b/composer.json @@ -240,7 +240,8 @@ "https://www.drupal.org/project/drupal/issues/3306916": "https://www.drupal.org/files/issues/2023-12-19/3306916-18.patch", "views form null fix": "patches/core-views.patch", "CKEditor 5 headings plugin paragraph label change": "patches/ckeditor5-paragraph-rename.patch", - "Allow hs group blocks in layout_builder": "patches/layout_builder-allow-hs-blocks.patch" + "Allow hs group blocks in layout_builder": "patches/layout_builder-allow-hs-blocks.patch", + "Allow media items to be edited in a modal when using the field widget https://www.drupal.org/project/drupal/issues/2985168": "patches/2985168-172.patch" }, "drupal/entity_reference_exposed_filters": { "https://www.drupal.org/project/entity_reference_exposed_filters/issues/3189025": "https://www.drupal.org/files/issues/2023-10-17/entity_reference_exposed_filters-empty_target-3189025-4.patch" diff --git a/composer.lock b/composer.lock index 1ceab8b024..4866b076f8 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "95b03fd16d8380a3ce26666722e4cdcf", + "content-hash": "a8f4dc1a8ba0c85ef6d05370ccadcb57", "packages": [ { "name": "acquia/blt", @@ -586,16 +586,16 @@ }, { "name": "composer/semver", - "version": "3.4.0", + "version": "3.4.2", "source": { "type": "git", "url": "https://github.com/composer/semver.git", - "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32" + "reference": "c51258e759afdb17f1fd1fe83bc12baaef6309d6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/35e8d0af4486141bc745f23a29cc2091eb624a32", - "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32", + "url": "https://api.github.com/repos/composer/semver/zipball/c51258e759afdb17f1fd1fe83bc12baaef6309d6", + "reference": "c51258e759afdb17f1fd1fe83bc12baaef6309d6", "shasum": "" }, "require": { @@ -647,7 +647,7 @@ "support": { "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/3.4.0" + "source": "https://github.com/composer/semver/tree/3.4.2" }, "funding": [ { @@ -663,7 +663,7 @@ "type": "tidelift" } ], - "time": "2023-08-31T09:50:34+00:00" + "time": "2024-07-12T11:35:52+00:00" }, { "name": "consolidation/annotated-command", @@ -5725,26 +5725,26 @@ }, { "name": "drupal/externalauth", - "version": "2.0.5", + "version": "2.0.6", "source": { "type": "git", "url": "https://git.drupalcode.org/project/externalauth.git", - "reference": "2.0.5" + "reference": "2.0.6" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/externalauth-2.0.5.zip", - "reference": "2.0.5", - "shasum": "7c262c7ca20d26aae45896daee4249e47b637abc" + "url": "https://ftp.drupal.org/files/projects/externalauth-2.0.6.zip", + "reference": "2.0.6", + "shasum": "0dbc9fbab0901e940d52b239e08f031797f6bd2a" }, "require": { - "drupal/core": "^9 || ^10" + "drupal/core": "^9.5 || ^10 || ^11" }, "type": "drupal-module", "extra": { "drupal": { - "version": "2.0.5", - "datestamp": "1708329378", + "version": "2.0.6", + "datestamp": "1720689758", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" @@ -6325,20 +6325,20 @@ }, { "name": "drupal/focal_point", - "version": "2.1.0", + "version": "2.1.1", "source": { "type": "git", "url": "https://git.drupalcode.org/project/focal_point.git", - "reference": "2.1.0" + "reference": "2.1.1" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/focal_point-2.1.0.zip", - "reference": "2.1.0", - "shasum": "f5be307039e226953598932d30a4eb6b2e9ac7d9" + "url": "https://ftp.drupal.org/files/projects/focal_point-2.1.1.zip", + "reference": "2.1.1", + "shasum": "f8c24bb4257f784176e79ec6f2b4c11ed46391e0" }, "require": { - "drupal/core": "^9.3 || ^10", + "drupal/core": "^9.3 || ^10 || ^11", "drupal/crop": "^2.3" }, "require-dev": { @@ -6347,8 +6347,8 @@ "type": "drupal-module", "extra": { "drupal": { - "version": "2.1.0", - "datestamp": "1715085292", + "version": "2.1.1", + "datestamp": "1721126807", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" @@ -6626,31 +6626,32 @@ }, { "name": "drupal/hal", - "version": "2.0.2", + "version": "2.0.3", "source": { "type": "git", "url": "https://git.drupalcode.org/project/hal.git", - "reference": "2.0.2" + "reference": "2.0.3" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/hal-2.0.2.zip", - "reference": "2.0.2", - "shasum": "9ec3ad376678941bae2e0eae0c980c42cddfc8b2" + "url": "https://ftp.drupal.org/files/projects/hal-2.0.3.zip", + "reference": "2.0.3", + "shasum": "81bc4b0bfdc6c3b7c2ec50f5eb4739451ff5c2ae" }, "require": { - "drupal/core": "^10" + "drupal/core": "^10 || ^11" }, "require-dev": { "drupal/aggregator": "2.x-dev", "drupal/entity_reference_revisions": "1.x-dev", - "drupal/rdf": "2.x-dev" + "drupal/rdf": "^2.1 || 3.0.x-dev", + "drupal/tour": "^1" }, "type": "drupal-module", "extra": { "drupal": { - "version": "2.0.2", - "datestamp": "1700523711", + "version": "2.0.3", + "datestamp": "1721252595", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" @@ -8706,17 +8707,17 @@ }, { "name": "drupal/migrate_plus", - "version": "6.0.2", + "version": "6.0.3", "source": { "type": "git", "url": "https://git.drupalcode.org/project/migrate_plus.git", - "reference": "6.0.2" + "reference": "6.0.3" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/migrate_plus-6.0.2.zip", - "reference": "6.0.2", - "shasum": "4315bc293aa75ea9247582d5d1925b075865e467" + "url": "https://ftp.drupal.org/files/projects/migrate_plus-6.0.3.zip", + "reference": "6.0.3", + "shasum": "08feb88178a45d8354862b03fd7fcf9b47ae14e1" }, "require": { "drupal/core": ">=9.1", @@ -8733,8 +8734,8 @@ "type": "drupal-module", "extra": { "drupal": { - "version": "6.0.2", - "datestamp": "1705424638", + "version": "6.0.3", + "datestamp": "1721333111", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" @@ -9776,23 +9777,23 @@ }, { "name": "drupal/rabbit_hole", - "version": "1.0.0-beta11", + "version": "1.0.0", "source": { "type": "git", "url": "https://git.drupalcode.org/project/rabbit_hole.git", - "reference": "8.x-1.0-beta11" + "reference": "8.x-1.0" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/rabbit_hole-8.x-1.0-beta11.zip", - "reference": "8.x-1.0-beta11", - "shasum": "a5c3bd5d1a190e25bb4d339525dd71918015fea2" + "url": "https://ftp.drupal.org/files/projects/rabbit_hole-8.x-1.0.zip", + "reference": "8.x-1.0", + "shasum": "9fd3129b27cd10e23a775719770bf2bda977c234" }, "require": { - "drupal/core": "^8 || ^9 || ^10" + "drupal/core": "^9.5 || ^10 || ^11" }, "require-dev": { - "drupal/commerce": "*", + "drupal/commerce": "^2.39", "drupal/commerce_product": "*", "drupal/file_entity": "*", "drupal/group": "*", @@ -9801,11 +9802,11 @@ "type": "drupal-module", "extra": { "drupal": { - "version": "8.x-1.0-beta11", - "datestamp": "1670668459", + "version": "8.x-1.0", + "datestamp": "1721413113", "security-coverage": { - "status": "not-covered", - "message": "Beta releases are not covered by Drupal security advisories." + "status": "covered", + "message": "Covered by Drupal's security advisory policy" } } }, @@ -9826,6 +9827,10 @@ "name": "Dylan Donkersgoed", "homepage": "https://www.drupal.org/user/2803351" }, + { + "name": "japerry", + "homepage": "https://www.drupal.org/user/45640" + }, { "name": "Matroskeen", "homepage": "https://www.drupal.org/user/3426249" @@ -12086,20 +12091,20 @@ }, { "name": "drupal/webform", - "version": "6.2.3", + "version": "6.2.5", "source": { "type": "git", "url": "https://git.drupalcode.org/project/webform.git", - "reference": "6.2.3" + "reference": "6.2.5" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/webform-6.2.3.zip", - "reference": "6.2.3", - "shasum": "b23b2746643ef11ee764ac420a02e2162d727930" + "url": "https://ftp.drupal.org/files/projects/webform-6.2.5.zip", + "reference": "6.2.5", + "shasum": "84d43a7c35339e831dcb762002164ba1cbbc5d80" }, "require": { - "drupal/core": "^9.4 || ^10", + "drupal/core": "^10.1", "php": ">=8.1" }, "require-dev": { @@ -12116,6 +12121,7 @@ "drupal/group": "1.x-dev", "drupal/hal": "1 - 2", "drupal/jquery_ui": "1.x-dev", + "drupal/jquery_ui_button": "2.x-dev", "drupal/jquery_ui_checkboxradio": "2.x-dev", "drupal/jquery_ui_datepicker": "2.x-dev", "drupal/mailsystem": "4.x-dev", @@ -12139,14 +12145,14 @@ "drupal/webform_ui": "*" }, "suggest": { - "drupal/jquery_ui_checkboxradio": "Provides jQuery UI Checkboxradio library. Required by the Webform jQueryUI Buttons module. The Webform jQueryUI Buttons module is deprecated because jQueryUI is no longer maintained.", + "drupal/jquery_ui_buttons": "Provides jQuery UI Checkboxradio library. Required by the Webform jQueryUI Buttons module. The Webform jQueryUI Buttons module is deprecated because jQueryUI is no longer maintained.", "drupal/jquery_ui_datepicker": "Provides jQuery UI Datepicker library. Required to support datepickers. The Webform jQueryUI Datepicker module is deprecated because jQueryUI is no longer maintained." }, "type": "drupal-module", "extra": { "drupal": { - "version": "6.2.3", - "datestamp": "1719431562", + "version": "6.2.5", + "datestamp": "1721065379", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" @@ -13110,22 +13116,22 @@ }, { "name": "guzzlehttp/guzzle", - "version": "7.8.1", + "version": "7.8.2", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "41042bc7ab002487b876a0683fc8dce04ddce104" + "reference": "f4152d9eb85c445fe1f992001d1748e8bec070d2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/41042bc7ab002487b876a0683fc8dce04ddce104", - "reference": "41042bc7ab002487b876a0683fc8dce04ddce104", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/f4152d9eb85c445fe1f992001d1748e8bec070d2", + "reference": "f4152d9eb85c445fe1f992001d1748e8bec070d2", "shasum": "" }, "require": { "ext-json": "*", - "guzzlehttp/promises": "^1.5.3 || ^2.0.1", - "guzzlehttp/psr7": "^1.9.1 || ^2.5.1", + "guzzlehttp/promises": "^1.5.3 || ^2.0.3", + "guzzlehttp/psr7": "^1.9.1 || ^2.6.3", "php": "^7.2.5 || ^8.0", "psr/http-client": "^1.0", "symfony/deprecation-contracts": "^2.2 || ^3.0" @@ -13136,9 +13142,9 @@ "require-dev": { "bamarni/composer-bin-plugin": "^1.8.2", "ext-curl": "*", - "php-http/client-integration-tests": "dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999", + "guzzle/client-integration-tests": "3.0.2", "php-http/message-factory": "^1.1", - "phpunit/phpunit": "^8.5.36 || ^9.6.15", + "phpunit/phpunit": "^8.5.39 || ^9.6.20", "psr/log": "^1.1 || ^2.0 || ^3.0" }, "suggest": { @@ -13216,7 +13222,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.8.1" + "source": "https://github.com/guzzle/guzzle/tree/7.8.2" }, "funding": [ { @@ -13232,20 +13238,20 @@ "type": "tidelift" } ], - "time": "2023-12-03T20:35:24+00:00" + "time": "2024-07-18T11:12:18+00:00" }, { "name": "guzzlehttp/promises", - "version": "2.0.2", + "version": "2.0.3", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "bbff78d96034045e58e13dedd6ad91b5d1253223" + "reference": "6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/bbff78d96034045e58e13dedd6ad91b5d1253223", - "reference": "bbff78d96034045e58e13dedd6ad91b5d1253223", + "url": "https://api.github.com/repos/guzzle/promises/zipball/6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8", + "reference": "6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8", "shasum": "" }, "require": { @@ -13253,7 +13259,7 @@ }, "require-dev": { "bamarni/composer-bin-plugin": "^1.8.2", - "phpunit/phpunit": "^8.5.36 || ^9.6.15" + "phpunit/phpunit": "^8.5.39 || ^9.6.20" }, "type": "library", "extra": { @@ -13299,7 +13305,7 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/2.0.2" + "source": "https://github.com/guzzle/promises/tree/2.0.3" }, "funding": [ { @@ -13315,20 +13321,20 @@ "type": "tidelift" } ], - "time": "2023-12-03T20:19:20+00:00" + "time": "2024-07-18T10:29:17+00:00" }, { "name": "guzzlehttp/psr7", - "version": "2.6.2", + "version": "2.6.3", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221" + "reference": "6de29867b18790c0d2c846af4c13a24cc3ad56f3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/45b30f99ac27b5ca93cb4831afe16285f57b8221", - "reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/6de29867b18790c0d2c846af4c13a24cc3ad56f3", + "reference": "6de29867b18790c0d2c846af4c13a24cc3ad56f3", "shasum": "" }, "require": { @@ -13343,8 +13349,8 @@ }, "require-dev": { "bamarni/composer-bin-plugin": "^1.8.2", - "http-interop/http-factory-tests": "^0.9", - "phpunit/phpunit": "^8.5.36 || ^9.6.15" + "http-interop/http-factory-tests": "0.9.0", + "phpunit/phpunit": "^8.5.39 || ^9.6.20" }, "suggest": { "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" @@ -13415,7 +13421,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.6.2" + "source": "https://github.com/guzzle/psr7/tree/2.6.3" }, "funding": [ { @@ -13431,7 +13437,7 @@ "type": "tidelift" } ], - "time": "2023-12-03T20:05:35+00:00" + "time": "2024-07-18T09:59:12+00:00" }, { "name": "harvesthq/chosen", @@ -21079,22 +21085,22 @@ }, { "name": "lullabot/mink-selenium2-driver", - "version": "v1.7.2", + "version": "v1.7.3", "source": { "type": "git", "url": "https://github.com/Lullabot/MinkSelenium2Driver.git", - "reference": "5f9ecc2dc329d87442843f6143a4307a62fc5f8c" + "reference": "91445897dda062790a741003c9c85d9bb2f902cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Lullabot/MinkSelenium2Driver/zipball/5f9ecc2dc329d87442843f6143a4307a62fc5f8c", - "reference": "5f9ecc2dc329d87442843f6143a4307a62fc5f8c", + "url": "https://api.github.com/repos/Lullabot/MinkSelenium2Driver/zipball/91445897dda062790a741003c9c85d9bb2f902cf", + "reference": "91445897dda062790a741003c9c85d9bb2f902cf", "shasum": "" }, "require": { "behat/mink": "^1.11@dev", "ext-json": "*", - "lullabot/php-webdriver": "^2.0", + "lullabot/php-webdriver": "^2.0.5", "php": ">=7.2" }, "replace": { @@ -21145,22 +21151,22 @@ "webdriver" ], "support": { - "source": "https://github.com/Lullabot/MinkSelenium2Driver/tree/v1.7.2" + "source": "https://github.com/Lullabot/MinkSelenium2Driver/tree/v1.7.3" }, - "time": "2024-02-12T10:40:39+00:00" + "time": "2024-07-17T16:07:12+00:00" }, { "name": "lullabot/php-webdriver", - "version": "v2.0.4", + "version": "v2.0.5", "source": { "type": "git", "url": "https://github.com/Lullabot/php-webdriver.git", - "reference": "55fb15bd92663c3f90f42b2c79ca3ee11f2d7925" + "reference": "b686c5fe74ae4f3d5f7ff6e45234d99562de9ff4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Lullabot/php-webdriver/zipball/55fb15bd92663c3f90f42b2c79ca3ee11f2d7925", - "reference": "55fb15bd92663c3f90f42b2c79ca3ee11f2d7925", + "url": "https://api.github.com/repos/Lullabot/php-webdriver/zipball/b686c5fe74ae4f3d5f7ff6e45234d99562de9ff4", + "reference": "b686c5fe74ae4f3d5f7ff6e45234d99562de9ff4", "shasum": "" }, "require": { @@ -21192,9 +21198,10 @@ "webtest" ], "support": { - "source": "https://github.com/Lullabot/php-webdriver/tree/v2.0.4" + "issues": "https://github.com/Lullabot/php-webdriver/issues", + "source": "https://github.com/Lullabot/php-webdriver/tree/v2.0.5" }, - "time": "2024-07-04T09:19:59+00:00" + "time": "2024-07-17T15:21:54+00:00" }, { "name": "mglaman/phpstan-drupal", @@ -24230,23 +24237,23 @@ }, { "name": "seld/jsonlint", - "version": "1.10.2", + "version": "1.11.0", "source": { "type": "git", "url": "https://github.com/Seldaek/jsonlint.git", - "reference": "9bb7db07b5d66d90f6ebf542f09fc67d800e5259" + "reference": "1748aaf847fc731cfad7725aec413ee46f0cc3a2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/9bb7db07b5d66d90f6ebf542f09fc67d800e5259", - "reference": "9bb7db07b5d66d90f6ebf542f09fc67d800e5259", + "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/1748aaf847fc731cfad7725aec413ee46f0cc3a2", + "reference": "1748aaf847fc731cfad7725aec413ee46f0cc3a2", "shasum": "" }, "require": { "php": "^5.3 || ^7.0 || ^8.0" }, "require-dev": { - "phpstan/phpstan": "^1.5", + "phpstan/phpstan": "^1.11", "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0 || ^8.5.13" }, "bin": [ @@ -24278,7 +24285,7 @@ ], "support": { "issues": "https://github.com/Seldaek/jsonlint/issues", - "source": "https://github.com/Seldaek/jsonlint/tree/1.10.2" + "source": "https://github.com/Seldaek/jsonlint/tree/1.11.0" }, "funding": [ { @@ -24290,7 +24297,7 @@ "type": "tidelift" } ], - "time": "2024-02-07T12:57:50+00:00" + "time": "2024-07-11T14:55:45+00:00" }, { "name": "seld/phar-utils", diff --git a/patches/2985168-172.patch b/patches/2985168-172.patch new file mode 100644 index 0000000000..0dbc0c664e --- /dev/null +++ b/patches/2985168-172.patch @@ -0,0 +1,388 @@ +diff --git a/core/modules/media_library/js/media_library.widget.js b/core/modules/media_library/js/media_library.widget.js +index b9f5b8a5cb1..6205288c167 100644 +--- a/core/modules/media_library/js/media_library.widget.js ++++ b/core/modules/media_library/js/media_library.widget.js +@@ -72,6 +72,28 @@ + }, + }; + ++ /** ++ * Allow users to edit media library items inside a modal. ++ */ ++ Drupal.behaviors.MediaLibraryWidgetEditItem = { ++ attach: function attach(context) { ++ const mediaLibraryEdit = once( ++ 'media-library-edit', ++ '.media-library-widget .edit-media', ++ context, ++ ); ++ $(mediaLibraryEdit).on('click', function () { ++ // Remove any "selected-media" classes. ++ $(this) ++ .closest('.media-library-selection') ++ .find('.selected-media') ++ .removeClass('selected-media'); ++ // Mark the media item as selected to render it properly when submitting an ajax media edit request. ++ $(this).parent().find('article').addClass('selected-media'); ++ }); ++ }, ++ }; ++ + /** + * Disable the open button when the user is not allowed to add more items. + * +diff --git a/core/modules/media_library/media_library.module b/core/modules/media_library/media_library.module +index d92028d7755..20adc675f7a 100644 +--- a/core/modules/media_library/media_library.module ++++ b/core/modules/media_library/media_library.module +@@ -5,13 +5,19 @@ + * Contains hook implementations for the media_library module. + */ + ++use Drupal\Component\Utility\Html; + use Drupal\Component\Utility\UrlHelper; + use Drupal\Core\Access\AccessResult; ++use Drupal\Core\Ajax\AjaxResponse; ++use Drupal\Core\Ajax\CloseModalDialogCommand; ++use Drupal\Core\Ajax\ReplaceCommand; + use Drupal\Core\Entity\EntityInterface; + use Drupal\Core\Entity\Entity\EntityFormDisplay; + use Drupal\Core\Entity\Entity\EntityViewDisplay; ++use Drupal\Core\EventSubscriber\MainContentViewSubscriber; + use Drupal\Core\Field\Plugin\Field\FieldType\EntityReferenceItem; + use Drupal\Core\Form\FormStateInterface; ++use Drupal\Core\Messenger\MessengerInterface; + use Drupal\Core\Render\Element; + use Drupal\Core\Routing\RouteMatchInterface; + use Drupal\Core\Session\AccountInterface; +@@ -220,6 +226,90 @@ function media_library_views_post_render(ViewExecutable $view, &$output, CachePl + } + } + ++/** ++ * Implements hook_form_FORM_ID_alter() for media_form forms. ++ */ ++function media_library_form_media_form_alter(array &$form, FormStateInterface $form_state) { ++ // Make the media edit form work inside modal dialogs. ++ $form_object = $form_state->getFormObject(); ++ if (is_object($form_object) && $form_object->getOperation() === 'edit') { ++ $wrapper_format = \Drupal::request()->query->get(MainContentViewSubscriber::WRAPPER_FORMAT); ++ ++ // Make sure that the media library opener is actually the 'field_widget'. ++ // Get the request uri for the $form. ++ $request_stack = \Drupal::service('request_stack'); ++ $currentRequest = $request_stack->getCurrentRequest(); ++ $mediaLibraryOpenerId = $currentRequest->getRequestUri(); ++ ++ // Extract and parse the 'media_library_opener_id' from the request URI. ++ $queryString = parse_url($mediaLibraryOpenerId, PHP_URL_QUERY); ++ parse_str($queryString ?? '', $queryParams); ++ $mediaLibraryOpenerId = $queryParams['media_library_opener_id'] ?? NULL; ++ ++ if (($wrapper_format === 'drupal_modal' || $wrapper_format === 'drupal_ajax') && $mediaLibraryOpenerId === 'media_library.opener.field_widget') { ++ foreach (Element::children($form['actions']) as $key) { ++ if ($key === 'submit') { ++ // The default name is 'op', but we change it on purpose so that it is ++ // easier to detect our modified AJAX call above. ++ $form['actions'][$key]['#name'] = 'media_library_ajax_submit'; ++ $form['actions'][$key]['#ajax'] = [ ++ 'callback' => 'media_library_media_form_ajax_submit', ++ ]; ++ ++ // Prevent the form that opened the modal dialog to refocus to the ++ // 'Save' button at the bottom of the form. ++ $form['actions'][$key]['#attributes']['data-disable-refocus'] = 'true'; ++ ++ // Reattach dialog AJAX library. ++ $form['#attached']['library'][] = 'core/drupal.dialog.ajax'; ++ ++ // The data-drupal-selector needs to be the same between the various ++ // AJAX requests. A bug in \Drupal\Core\Form\FormBuilder prevents that ++ // from happening unless $form['#id'] is also the same. Normally, #id ++ // is set to a unique HTML ID via Html::getUniqueId(), but here we ++ // bypass that in order to work around the data-drupal-selector bug. ++ // This is okay so long as we assume that this form only ever occurs ++ // once on a page. ++ // @todo: Remove once https://www.drupal.org/node/2897377 is fixed. ++ $form['#id'] = Html::getId($form_state->getBuildInfo()['form_id']); ++ } ++ else { ++ // We just want to allow the save action for now. Just hide other ++ // actions like the delete action. ++ $form['actions'][$key]['#access'] = FALSE; ++ } ++ } ++ } ++ } ++} ++ ++/** ++ * AJAX callback for media edit form when form is shown inside modal dialog. ++ * ++ * @ingroup form ++ */ ++function media_library_media_form_ajax_submit(array &$form, FormStateInterface $form_state) { ++ $response = new AjaxResponse(); ++ if (!$form_state->hasAnyErrors()) { ++ $media = $form_state->getFormObject()->getEntity(); ++ $render_array = \Drupal::entityTypeManager()->getViewBuilder('media')->view($media, 'media_library'); ++ $html = \Drupal::service('renderer')->render($render_array); ++ $response->addCommand(new CloseModalDialogCommand()); ++ $response->addCommand(new ReplaceCommand('.selected-media', $html)); ++ ++ // Remove status messages when editing medias. ++ \Drupal::messenger()->deleteByType(MessengerInterface::TYPE_STATUS); ++ } ++ else { ++ $form['status_messages'] = [ ++ '#type' => 'status_messages', ++ '#weight' => -1000, ++ ]; ++ $response->addCommand(new ReplaceCommand('[data-drupal-selector="' . $form['#attributes']['data-drupal-selector'] . '"]', $form)); ++ } ++ return $response; ++} ++ + /** + * Implements hook_preprocess_media(). + */ +diff --git a/core/modules/media_library/src/Plugin/Field/FieldWidget/MediaLibraryWidget.php b/core/modules/media_library/src/Plugin/Field/FieldWidget/MediaLibraryWidget.php +index 6ba3510eb75..01ed892d597 100644 +--- a/core/modules/media_library/src/Plugin/Field/FieldWidget/MediaLibraryWidget.php ++++ b/core/modules/media_library/src/Plugin/Field/FieldWidget/MediaLibraryWidget.php +@@ -379,6 +379,55 @@ public function formElement(FieldItemListInterface $items, $delta, array $elemen + ]; + } + ++ $cardinality_unlimited = ($element['#cardinality'] === FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED); ++ $remaining = $element['#cardinality'] - count($referenced_entities); ++ ++ // Inform the user of how many items are remaining. ++ if (!$cardinality_unlimited) { ++ if ($remaining) { ++ $cardinality_message = $this->formatPlural($remaining, 'One media item remaining.', '@count media items remaining.'); ++ } ++ else { ++ $cardinality_message = $this->t('The maximum number of media items have been selected.'); ++ } ++ ++ // Add a line break between the field message and the cardinality message. ++ if (!empty($element['#description'])) { ++ $element['#description'] .= '
'; ++ } ++ $element['#description'] .= $cardinality_message; ++ } ++ ++ // Create a new media library URL with the correct state parameters. ++ $selected_type_id = reset($allowed_media_type_ids); ++ $remaining = $cardinality_unlimited ? FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED : $remaining; ++ // This particular media library opener needs some extra metadata for its ++ // \Drupal\media_library\MediaLibraryOpenerInterface::getSelectionResponse() ++ // to be able to target the element whose 'data-media-library-widget-value' ++ // attribute is the same as $field_widget_id. The entity ID, entity type ID, ++ // bundle, field name are used for access checking. ++ $entity = $items->getEntity(); ++ $opener_parameters = [ ++ 'field_widget_id' => $field_widget_id, ++ 'entity_type_id' => $entity->getEntityTypeId(), ++ 'bundle' => $entity->bundle(), ++ 'field_name' => $field_name, ++ ]; ++ if (isset($form['#form_mode'])) { ++ $opener_parameters['form_mode'] = $form['#form_mode']; ++ } ++ // Only add the entity ID when we actually have one. The entity ID needs to ++ // be a string to ensure that the media library state generates its ++ // tamper-proof hash in a consistent way. ++ if (!$entity->isNew()) { ++ $opener_parameters['entity_id'] = (string) $entity->id(); ++ ++ if ($entity->getEntityType()->isRevisionable()) { ++ $opener_parameters['revision_id'] = (string) $entity->getRevisionId(); ++ } ++ } ++ $state = MediaLibraryState::create('media_library.opener.field_widget', $allowed_media_type_ids, $selected_type_id, $remaining, $opener_parameters); ++ + $element['selection'] = [ + '#type' => 'container', + '#theme_wrappers' => [ +@@ -427,6 +476,7 @@ public function formElement(FieldItemListInterface $items, $delta, array $elemen + '#type' => 'submit', + '#name' => $field_name . '-' . $delta . '-media-library-remove-button' . $id_suffix, + '#value' => $this->t('Remove'), ++ '#weight' => -10, + '#media_id' => $media_item->id(), + '#attributes' => [ + 'aria-label' => $media_item->access('view label') ? $this->t('Remove @label', ['@label' => $media_item->label()]) : $this->t('Remove media'), +@@ -443,6 +493,19 @@ public function formElement(FieldItemListInterface $items, $delta, array $elemen + // Prevent errors in other widgets from preventing removal. + '#limit_validation_errors' => $limit_validation_errors, + ], ++ 'edit_button' => [ ++ '#type' => 'submit', ++ '#value' => $this->t('Edit'), ++ '#weight' => 1, ++ '#access' => $media_item->access('update'), ++ '#attributes' => [ ++ 'aria-label' => $media_item->access('view label') ? $this->t('Edit @label', ['@label' => $media_item->label()]) : $this->t('Edit media'), ++ 'class' => ['edit-media', 'use-ajax'], ++ 'href' => $media_item->toUrl('edit-form', ['query' => $state->all()])->toString(), ++ 'data-dialog-type' => 'modal', ++ 'data-dialog-options' => '{"width":"80%"}', ++ ], ++ ], + 'rendered_entity' => $preview, + 'target_id' => [ + '#type' => 'hidden', +@@ -464,52 +527,6 @@ public function formElement(FieldItemListInterface $items, $delta, array $elemen + ]; + } + +- $cardinality_unlimited = ($element['#cardinality'] === FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED); +- $remaining = $element['#cardinality'] - count($referenced_entities); +- +- // Inform the user of how many items are remaining. +- if (!$cardinality_unlimited) { +- if ($remaining) { +- $cardinality_message = $this->formatPlural($remaining, 'One media item remaining.', '@count media items remaining.'); +- } +- else { +- $cardinality_message = $this->t('The maximum number of media items have been selected.'); +- } +- +- // Add a line break between the field message and the cardinality message. +- if (!empty($element['#description'])) { +- $element['#description'] .= '
'; +- } +- $element['#description'] .= $cardinality_message; +- } +- +- // Create a new media library URL with the correct state parameters. +- $selected_type_id = reset($allowed_media_type_ids); +- $remaining = $cardinality_unlimited ? FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED : $remaining; +- // This particular media library opener needs some extra metadata for its +- // \Drupal\media_library\MediaLibraryOpenerInterface::getSelectionResponse() +- // to be able to target the element whose 'data-media-library-widget-value' +- // attribute is the same as $field_widget_id. The entity ID, entity type ID, +- // bundle, field name are used for access checking. +- $entity = $items->getEntity(); +- $opener_parameters = [ +- 'field_widget_id' => $field_widget_id, +- 'entity_type_id' => $entity->getEntityTypeId(), +- 'bundle' => $entity->bundle(), +- 'field_name' => $field_name, +- ]; +- // Only add the entity ID when we actually have one. The entity ID needs to +- // be a string to ensure that the media library state generates its +- // tamper-proof hash in a consistent way. +- if (!$entity->isNew()) { +- $opener_parameters['entity_id'] = (string) $entity->id(); +- +- if ($entity->getEntityType()->isRevisionable()) { +- $opener_parameters['revision_id'] = (string) $entity->getRevisionId(); +- } +- } +- $state = MediaLibraryState::create('media_library.opener.field_widget', $allowed_media_type_ids, $selected_type_id, $remaining, $opener_parameters); +- + // Add a button that will load the Media library in a modal using AJAX. + $element['open_button'] = [ + '#type' => 'button', +diff --git a/core/themes/claro/claro.theme b/core/themes/claro/claro.theme +index f33e425c165..4826c25e234 100644 +--- a/core/themes/claro/claro.theme ++++ b/core/themes/claro/claro.theme +@@ -1505,6 +1505,8 @@ function claro_preprocess_item_list__media_library_add_form_media_list(array &$v + * This targets each media item selected in an entity reference field. + */ + function claro_preprocess_media_library_item__widget(array &$variables) { ++ $variables['content']['edit_button']['#attributes']['class'][] = 'media-library-item__edit'; ++ $variables['content']['edit_button']['#attributes']['class'][] = 'icon-link'; + $variables['content']['remove_button']['#attributes']['class'][] = 'media-library-item__remove'; + $variables['content']['remove_button']['#attributes']['class'][] = 'icon-link'; + } +diff --git a/core/themes/claro/css/theme/media-library.css b/core/themes/claro/css/theme/media-library.css +index 951f95d85f6..f98cb27ab06 100644 +--- a/core/themes/claro/css/theme/media-library.css ++++ b/core/themes/claro/css/theme/media-library.css +@@ -752,6 +752,12 @@ + .media-library-item__edit, + .media-library-item__edit:hover, + .media-library-item__edit:focus, ++.media-library-item__edit.button, ++.media-library-item__edit.button:disabled, ++.media-library-item__edit.button:disabled:active, ++.media-library-item__edit.button:hover, ++.media-library-item__edit.button:focus, ++.media-library-item__edit.button:not(:focus), + .media-library-item__remove, + .media-library-item__remove:hover, + .media-library-item__remove:focus, +@@ -794,7 +800,13 @@ + left: 0.625rem; + } + +-.media-library-item__edit { ++.media-library-item__edit, ++.media-library-item__edit.button, ++.media-library-item__edit.button:disabled, ++.media-library-item__edit.button:disabled:active, ++.media-library-item__edit.button:hover, ++.media-library-item__edit.button:focus, ++.media-library-item__edit.button:not(:focus) { + /* !important to override button class border. */ + border: 1px solid var(--color-gray-200) !important; + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3e%3cg fill='%23545560'%3e%3cpath d='M14.545 3.042l-1.586-1.585a1.003 1.003 0 00-1.414 0L10.252 2.75l3 3 1.293-1.293a1.004 1.004 0 000-1.415zM5.25 13.751l-3-3 6.998-6.998 3 3zM.908 14.775c-.087.262.055.397.316.312l2.001-.667-1.65-1.646-.667 2.001z'/%3e%3c/g%3e%3c/svg%3e"); +@@ -803,7 +815,9 @@ + background-size: 0.75rem; + } + +-.media-library-item__edit:active { ++.media-library-item__edit:active, ++.media-library-item__edit.button:active, ++.media-library-item__edit.button:disabled:active { + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3e%3cg%3e%3cpath fill='%23ffffff' d='M14.545 3.042l-1.586-1.585c-.389-.389-1.025-.389-1.414 0l-1.293 1.293 3 3 1.293-1.293c.389-.389.389-1.026 0-1.415z'/%3e%3crect fill='%23ffffff' x='5.129' y='3.8' transform='matrix(-.707 -.707 .707 -.707 6.189 20.064)' width='4.243' height='9.899'/%3e%3cpath fill='%23ffffff' d='M.908 14.775c-.087.262.055.397.316.312l2.001-.667-1.65-1.646-.667 2.001z'/%3e%3c/g%3e%3c/svg%3e"); + } + +diff --git a/core/themes/claro/css/theme/media-library.pcss.css b/core/themes/claro/css/theme/media-library.pcss.css +index 318b4339b0e..b404f318137 100644 +--- a/core/themes/claro/css/theme/media-library.pcss.css ++++ b/core/themes/claro/css/theme/media-library.pcss.css +@@ -692,6 +692,12 @@ + .media-library-item__edit, + .media-library-item__edit:hover, + .media-library-item__edit:focus, ++.media-library-item__edit.button, ++.media-library-item__edit.button:disabled, ++.media-library-item__edit.button:disabled:active, ++.media-library-item__edit.button:hover, ++.media-library-item__edit.button:focus, ++.media-library-item__edit.button:not(:focus), + .media-library-item__remove, + .media-library-item__remove:hover, + .media-library-item__remove:focus, +@@ -732,7 +738,13 @@ + left: 10px; + } + +-.media-library-item__edit { ++.media-library-item__edit, ++.media-library-item__edit.button, ++.media-library-item__edit.button:disabled, ++.media-library-item__edit.button:disabled:active, ++.media-library-item__edit.button:hover, ++.media-library-item__edit.button:focus, ++.media-library-item__edit.button:not(:focus) { + /* !important to override button class border. */ + border: 1px solid var(--color-gray-200) !important; + background-image: url("../../images/icons/545560/pencil.svg"); +@@ -740,7 +752,9 @@ + background-position: center; + background-size: 12px; + } +-.media-library-item__edit:active { ++.media-library-item__edit:active, ++.media-library-item__edit.button:active, ++.media-library-item__edit.button:disabled:active { + background-image: url("../../../../misc/icons/ffffff/pencil.svg"); + } + .media-library-item__remove, From 7d8eb2cd20ec36c5c0e3bb869b9e1deace924b23 Mon Sep 17 00:00:00 2001 From: Marc Berger Date: Fri, 19 Jul 2024 15:15:35 -0700 Subject: [PATCH 02/11] fix(SHS-5629): Remove todo in patch file --- patches/2985168-172.patch | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/patches/2985168-172.patch b/patches/2985168-172.patch index 0dbc0c664e..776d3d3a74 100644 --- a/patches/2985168-172.patch +++ b/patches/2985168-172.patch @@ -5,7 +5,7 @@ index b9f5b8a5cb1..6205288c167 100644 @@ -72,6 +72,28 @@ }, }; - + + /** + * Allow users to edit media library items inside a modal. + */ @@ -38,7 +38,7 @@ index d92028d7755..20adc675f7a 100644 @@ -5,13 +5,19 @@ * Contains hook implementations for the media_library module. */ - + +use Drupal\Component\Utility\Html; use Drupal\Component\Utility\UrlHelper; use Drupal\Core\Access\AccessResult; @@ -58,7 +58,7 @@ index d92028d7755..20adc675f7a 100644 @@ -220,6 +226,90 @@ function media_library_views_post_render(ViewExecutable $view, &$output, CachePl } } - + +/** + * Implements hook_form_FORM_ID_alter() for media_form forms. + */ @@ -103,7 +103,7 @@ index d92028d7755..20adc675f7a 100644 + // bypass that in order to work around the data-drupal-selector bug. + // This is okay so long as we assume that this form only ever occurs + // once on a page. -+ // @todo: Remove once https://www.drupal.org/node/2897377 is fixed. ++ // Remove once https://www.drupal.org/node/2897377 is fixed. + $form['#id'] = Html::getId($form_state->getBuildInfo()['form_id']); + } + else { @@ -153,7 +153,7 @@ index 6ba3510eb75..01ed892d597 100644 @@ -379,6 +379,55 @@ public function formElement(FieldItemListInterface $items, $delta, array $elemen ]; } - + + $cardinality_unlimited = ($element['#cardinality'] === FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED); + $remaining = $element['#cardinality'] - count($referenced_entities); + @@ -237,7 +237,7 @@ index 6ba3510eb75..01ed892d597 100644 @@ -464,52 +527,6 @@ public function formElement(FieldItemListInterface $items, $delta, array $elemen ]; } - + - $cardinality_unlimited = ($element['#cardinality'] === FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED); - $remaining = $element['#cardinality'] - count($referenced_entities); - @@ -320,7 +320,7 @@ index 951f95d85f6..f98cb27ab06 100644 @@ -794,7 +800,13 @@ left: 0.625rem; } - + -.media-library-item__edit { +.media-library-item__edit, +.media-library-item__edit.button, @@ -335,14 +335,14 @@ index 951f95d85f6..f98cb27ab06 100644 @@ -803,7 +815,9 @@ background-size: 0.75rem; } - + -.media-library-item__edit:active { +.media-library-item__edit:active, +.media-library-item__edit.button:active, +.media-library-item__edit.button:disabled:active { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3e%3cg%3e%3cpath fill='%23ffffff' d='M14.545 3.042l-1.586-1.585c-.389-.389-1.025-.389-1.414 0l-1.293 1.293 3 3 1.293-1.293c.389-.389.389-1.026 0-1.415z'/%3e%3crect fill='%23ffffff' x='5.129' y='3.8' transform='matrix(-.707 -.707 .707 -.707 6.189 20.064)' width='4.243' height='9.899'/%3e%3cpath fill='%23ffffff' d='M.908 14.775c-.087.262.055.397.316.312l2.001-.667-1.65-1.646-.667 2.001z'/%3e%3c/g%3e%3c/svg%3e"); } - + diff --git a/core/themes/claro/css/theme/media-library.pcss.css b/core/themes/claro/css/theme/media-library.pcss.css index 318b4339b0e..b404f318137 100644 --- a/core/themes/claro/css/theme/media-library.pcss.css @@ -363,7 +363,7 @@ index 318b4339b0e..b404f318137 100644 @@ -732,7 +738,13 @@ left: 10px; } - + -.media-library-item__edit { +.media-library-item__edit, +.media-library-item__edit.button, From 5c944f6dc7ee85a42f5794cfe157248f54e49ba5 Mon Sep 17 00:00:00 2001 From: Marc Berger <107938318+codechefmarc@users.noreply.github.com> Date: Wed, 24 Jul 2024 11:35:24 -0700 Subject: [PATCH 03/11] SHS-5661: Remove legacy fields (#1577) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(SHS-5661): Remove paragraph field Overlay Color on banner image with text box * feat(SHS-5661): Remove other references to the overlay field * feat(SHS-5661): Add update hook to remove legacy field * fix(SHS-5661): Fix linting error * fix(shs-5661): remove hero-text-overlay variants and update viewmode config --------- Co-authored-by: Andrés Díaz Soto --- ...isplay.paragraph.hs_hero_image.default.yml | 9 ------- ...isplay.paragraph.hs_hero_image.default.yml | 2 -- ...agraph.hs_hero_image.hero_with_overlay.yml | 11 +------- ...aragraph.hs_hero_image.slideshow_slide.yml | 2 -- ...hero_image.field_hs_hero_overlay_color.yml | 25 ------------------- ....paragraph.field_hs_hero_overlay_color.yml | 24 ------------------ config/default/user.role.anonymous.yml | 2 -- config/default/user.role.authenticated.yml | 2 -- .../hero-text-overlay.html.twig | 5 ---- .../hero-text-overlay.ui_patterns.yml | 16 ------------ .../hs_paragraph_types.install | 8 ++++++ .../3a0fcda7-c346-40e3-af09-f16ad1a3467c.yml | 12 --------- 12 files changed, 9 insertions(+), 109 deletions(-) delete mode 100644 config/default/field.field.paragraph.hs_hero_image.field_hs_hero_overlay_color.yml delete mode 100644 config/default/field.storage.paragraph.field_hs_hero_overlay_color.yml diff --git a/config/default/core.entity_form_display.paragraph.hs_hero_image.default.yml b/config/default/core.entity_form_display.paragraph.hs_hero_image.default.yml index 68a4c7540d..42413c0597 100644 --- a/config/default/core.entity_form_display.paragraph.hs_hero_image.default.yml +++ b/config/default/core.entity_form_display.paragraph.hs_hero_image.default.yml @@ -6,12 +6,10 @@ dependencies: - field.field.paragraph.hs_hero_image.field_hs_hero_body - field.field.paragraph.hs_hero_image.field_hs_hero_image - field.field.paragraph.hs_hero_image.field_hs_hero_link - - field.field.paragraph.hs_hero_image.field_hs_hero_overlay_color - field.field.paragraph.hs_hero_image.field_hs_hero_title - paragraphs.paragraphs_type.hs_hero_image module: - allowed_formats - - color_field - linkit - maxlength - media_library @@ -54,13 +52,6 @@ content: linkit_profile: default linkit_auto_link_text: false third_party_settings: { } - field_hs_hero_overlay_color: - type: color_field_widget_box - weight: 5 - region: content - settings: - default_colors: '#00505C,#53284F,#175E54,#4D4F53,#5E3032' - third_party_settings: { } field_hs_hero_title: type: string_textfield weight: 2 diff --git a/config/default/core.entity_view_display.paragraph.hs_hero_image.default.yml b/config/default/core.entity_view_display.paragraph.hs_hero_image.default.yml index 5584a5f6e0..1b57fd7f6b 100644 --- a/config/default/core.entity_view_display.paragraph.hs_hero_image.default.yml +++ b/config/default/core.entity_view_display.paragraph.hs_hero_image.default.yml @@ -6,7 +6,6 @@ dependencies: - field.field.paragraph.hs_hero_image.field_hs_hero_body - field.field.paragraph.hs_hero_image.field_hs_hero_image - field.field.paragraph.hs_hero_image.field_hs_hero_link - - field.field.paragraph.hs_hero_image.field_hs_hero_overlay_color - field.field.paragraph.hs_hero_image.field_hs_hero_title - paragraphs.paragraphs_type.hs_hero_image module: @@ -41,6 +40,5 @@ content: hidden: field_hs_hero_body: true field_hs_hero_link: true - field_hs_hero_overlay_color: true field_hs_hero_title: true search_api_excerpt: true diff --git a/config/default/core.entity_view_display.paragraph.hs_hero_image.hero_with_overlay.yml b/config/default/core.entity_view_display.paragraph.hs_hero_image.hero_with_overlay.yml index 333e77da16..feb0739cae 100644 --- a/config/default/core.entity_view_display.paragraph.hs_hero_image.hero_with_overlay.yml +++ b/config/default/core.entity_view_display.paragraph.hs_hero_image.hero_with_overlay.yml @@ -7,7 +7,6 @@ dependencies: - field.field.paragraph.hs_hero_image.field_hs_hero_body - field.field.paragraph.hs_hero_image.field_hs_hero_image - field.field.paragraph.hs_hero_image.field_hs_hero_link - - field.field.paragraph.hs_hero_image.field_hs_hero_overlay_color - field.field.paragraph.hs_hero_image.field_hs_hero_title - paragraphs.paragraphs_type.hs_hero_image module: @@ -32,14 +31,7 @@ third_party_settings: settings: pattern: field_templates: default - variant: _field - variant_field: field_hs_hero_overlay_color - variant_field_values: - default: 00505c - purple: 53284f - paloalto: '175e54' - coolgrey: 4d4f53 - brown: '5e3032' + variant_field: field_hs_hero_body regions: image: - field_hs_hero_image @@ -123,5 +115,4 @@ content: weight: 1 region: overlay_text hidden: - field_hs_hero_overlay_color: true search_api_excerpt: true diff --git a/config/default/core.entity_view_display.paragraph.hs_hero_image.slideshow_slide.yml b/config/default/core.entity_view_display.paragraph.hs_hero_image.slideshow_slide.yml index 89e6344e3d..4aeb15ac31 100644 --- a/config/default/core.entity_view_display.paragraph.hs_hero_image.slideshow_slide.yml +++ b/config/default/core.entity_view_display.paragraph.hs_hero_image.slideshow_slide.yml @@ -7,7 +7,6 @@ dependencies: - field.field.paragraph.hs_hero_image.field_hs_hero_body - field.field.paragraph.hs_hero_image.field_hs_hero_image - field.field.paragraph.hs_hero_image.field_hs_hero_link - - field.field.paragraph.hs_hero_image.field_hs_hero_overlay_color - field.field.paragraph.hs_hero_image.field_hs_hero_title - paragraphs.paragraphs_type.hs_hero_image module: @@ -47,6 +46,5 @@ content: hidden: field_hs_hero_body: true field_hs_hero_link: true - field_hs_hero_overlay_color: true field_hs_hero_title: true search_api_excerpt: true diff --git a/config/default/field.field.paragraph.hs_hero_image.field_hs_hero_overlay_color.yml b/config/default/field.field.paragraph.hs_hero_image.field_hs_hero_overlay_color.yml deleted file mode 100644 index 239286aba3..0000000000 --- a/config/default/field.field.paragraph.hs_hero_image.field_hs_hero_overlay_color.yml +++ /dev/null @@ -1,25 +0,0 @@ -uuid: a7643518-bc3d-4c85-add9-e99a0adfdf91 -langcode: en -status: true -dependencies: - config: - - field.storage.paragraph.field_hs_hero_overlay_color - - paragraphs.paragraphs_type.hs_hero_image - module: - - color_field -id: paragraph.hs_hero_image.field_hs_hero_overlay_color -field_name: field_hs_hero_overlay_color -entity_type: paragraph -bundle: hs_hero_image -label: 'Overlay Color' -description: '' -required: true -translatable: false -default_value: - - - color: '#00505C' - opacity: null -default_value_callback: '' -settings: - opacity: 0 -field_type: color_field_type diff --git a/config/default/field.storage.paragraph.field_hs_hero_overlay_color.yml b/config/default/field.storage.paragraph.field_hs_hero_overlay_color.yml deleted file mode 100644 index 0189c68ea7..0000000000 --- a/config/default/field.storage.paragraph.field_hs_hero_overlay_color.yml +++ /dev/null @@ -1,24 +0,0 @@ -uuid: b1393f01-63e8-4bc6-9dae-6ab572b39387 -langcode: en -status: true -dependencies: - module: - - color_field - - field_permissions - - paragraphs -third_party_settings: - field_permissions: - permission_type: custom -id: paragraph.field_hs_hero_overlay_color -field_name: field_hs_hero_overlay_color -entity_type: paragraph -type: color_field_type -settings: - format: hexhex -module: color_field -locked: false -cardinality: 1 -translatable: true -indexes: { } -persist_with_no_fields: false -custom_storage: false diff --git a/config/default/user.role.anonymous.yml b/config/default/user.role.anonymous.yml index 373bce90e7..b5cc10c224 100644 --- a/config/default/user.role.anonymous.yml +++ b/config/default/user.role.anonymous.yml @@ -18,13 +18,11 @@ permissions: - 'access content' - 'download media' - 'view field_hs_accordion_views' - - 'view field_hs_hero_overlay_color' - 'view field_hs_text_area_bg_color' - 'view field_media_embeddable_code' - 'view field_paragraph_style' - 'view humsci entity' - 'view media' - 'view own field_hs_accordion_views' - - 'view own field_hs_hero_overlay_color' - 'view own field_media_embeddable_code' - 'view the administration theme' diff --git a/config/default/user.role.authenticated.yml b/config/default/user.role.authenticated.yml index 05481dc40d..92ceeff2ae 100644 --- a/config/default/user.role.authenticated.yml +++ b/config/default/user.role.authenticated.yml @@ -30,13 +30,11 @@ permissions: - 'use text format basic_html_without_media' - 'use text format webform_default' - 'view field_hs_accordion_views' - - 'view field_hs_hero_overlay_color' - 'view field_hs_text_area_bg_color' - 'view field_media_embeddable_code' - 'view field_paragraph_style' - 'view humsci entity' - 'view media' - 'view own field_hs_accordion_views' - - 'view own field_hs_hero_overlay_color' - 'view own field_media_embeddable_code' - 'view the administration theme' diff --git a/docroot/modules/humsci/hs_layouts/patterns/hero-text-overlay/hero-text-overlay.html.twig b/docroot/modules/humsci/hs_layouts/patterns/hero-text-overlay/hero-text-overlay.html.twig index 99a9a4e881..3f60d3b5a5 100644 --- a/docroot/modules/humsci/hs_layouts/patterns/hero-text-overlay/hero-text-overlay.html.twig +++ b/docroot/modules/humsci/hs_layouts/patterns/hero-text-overlay/hero-text-overlay.html.twig @@ -1,10 +1,5 @@ {%- set attributes = attributes.addClass('hb-hero-overlay') -%} -{% if variant %} - {% set variant_class = "hb-hero-overlay--color-#{variant}" %} - {% set attributes = attributes.addClass(variant_class) %} -{% endif %} - {% set text_content = overlay_text %} {% if overlay_text['field_hs_hero_title'] is defined and overlay_text['field_hs_hero_title'][0] is defined %} {% set text_content %} diff --git a/docroot/modules/humsci/hs_layouts/patterns/hero-text-overlay/hero-text-overlay.ui_patterns.yml b/docroot/modules/humsci/hs_layouts/patterns/hero-text-overlay/hero-text-overlay.ui_patterns.yml index accd8fb43e..e0aa924891 100644 --- a/docroot/modules/humsci/hs_layouts/patterns/hero-text-overlay/hero-text-overlay.ui_patterns.yml +++ b/docroot/modules/humsci/hs_layouts/patterns/hero-text-overlay/hero-text-overlay.ui_patterns.yml @@ -1,22 +1,6 @@ hero_text_overlay: label: "Hero Text Overlay" description: "" - variants: - default: - label: Lagunita - description: Lagunita Gradient - purple: - label: Purple - description: Purple Gradient - paloalto: - label: Palo Alto - description: Palo Alto Gradient - coolgrey: - label: Cool Grey - description: Cool Grey Gradient - brown: - label: Brown - description: Brown Gradient fields: image: label: "Image" diff --git a/docroot/modules/humsci/hs_paragraph_types/hs_paragraph_types.install b/docroot/modules/humsci/hs_paragraph_types/hs_paragraph_types.install index 8d31d58a28..8908811a2b 100644 --- a/docroot/modules/humsci/hs_paragraph_types/hs_paragraph_types.install +++ b/docroot/modules/humsci/hs_paragraph_types/hs_paragraph_types.install @@ -217,3 +217,11 @@ function hs_paragraph_types_update_10004(&$sandbox) { } $sandbox['#finished'] = count($sandbox['ids']) ? 1 - count($sandbox['ids']) / $sandbox['total'] : 1; } + +/** + * Removes legacy fields from paragraphs. + */ +function hs_paragraph_types_update_10005() { + // SHS-5661 - remove legacy Banner image(s) with text box Overlay Color field. + FieldConfig::loadByName('paragraph', 'hs_hero_image', 'field_hs_hero_overlay_color')->delete(); +} diff --git a/docroot/profiles/humsci/su_humsci_profile/modules/humsci_default_content/content/node/3a0fcda7-c346-40e3-af09-f16ad1a3467c.yml b/docroot/profiles/humsci/su_humsci_profile/modules/humsci_default_content/content/node/3a0fcda7-c346-40e3-af09-f16ad1a3467c.yml index b62cd2c9d5..b0edeaff76 100644 --- a/docroot/profiles/humsci/su_humsci_profile/modules/humsci_default_content/content/node/3a0fcda7-c346-40e3-af09-f16ad1a3467c.yml +++ b/docroot/profiles/humsci/su_humsci_profile/modules/humsci_default_content/content/node/3a0fcda7-c346-40e3-af09-f16ad1a3467c.yml @@ -1258,10 +1258,6 @@ default: target_uuid: 287db095-35b1-4050-8d26-5d8332eeb6a6 title: 'Link to The Homepage' options: { } - field_hs_hero_overlay_color: - - - color: 00505c - opacity: !!float 0 field_hs_hero_title: - value: 'Hero (Layered) - Slider title text' @@ -1293,10 +1289,6 @@ default: field_hs_hero_image: - entity: 941470f3-b916-4e5f-b53d-e2386277d01c - field_hs_hero_overlay_color: - - - color: 00505c - opacity: !!float 0 field_hs_hero_title: - value: 'Hero (Layered) - Slider title text 2' @@ -1333,10 +1325,6 @@ default: target_uuid: 287db095-35b1-4050-8d26-5d8332eeb6a6 title: 'Learn more' options: { } - field_hs_hero_overlay_color: - - - color: 00505c - opacity: !!float 0 field_hs_hero_title: - value: 'Hero (Overlay) component section' From c3f0d10923b833fc87ecd4a3d488aca8a4571c5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mariana=20N=C3=BA=C3=B1ez?= <48533432+mariannuar@users.noreply.github.com> Date: Wed, 24 Jul 2024 17:30:16 -0600 Subject: [PATCH 04/11] SHS-4929: Hide caption/credits on images in default views (#1578) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(shs-4929): add new media view mode and update news default views * feat(shs-4929): update people default views * feat(shs-4929): update publications default views --------- Co-authored-by: Mari Nez Co-authored-by: Andrés Díaz Soto --- ...ew_display.media.image.responsive_lazy.yml | 51 +++++++++++++++++++ ...entity_view_mode.media.responsive_lazy.yml | 11 ++++ config/default/views.view.hs_default_news.yml | 10 ++-- .../default/views.view.hs_default_people.yml | 19 ++----- .../views.view.hs_default_publications.yml | 13 ++--- 5 files changed, 79 insertions(+), 25 deletions(-) create mode 100644 config/default/core.entity_view_display.media.image.responsive_lazy.yml create mode 100644 config/default/core.entity_view_mode.media.responsive_lazy.yml diff --git a/config/default/core.entity_view_display.media.image.responsive_lazy.yml b/config/default/core.entity_view_display.media.image.responsive_lazy.yml new file mode 100644 index 0000000000..de68a8c7fc --- /dev/null +++ b/config/default/core.entity_view_display.media.image.responsive_lazy.yml @@ -0,0 +1,51 @@ +uuid: b7b180a8-5e6f-4479-98d1-6a6e6982eb68 +langcode: en +status: true +dependencies: + config: + - core.entity_view_mode.media.responsive_lazy + - field.field.media.image.field_media_image + - field.field.media.image.field_media_image_caption + - media.type.image + - responsive_image.styles.full_responsive + module: + - empty_fields + - field_formatter_class + - hs_field_helpers + - layout_builder + - responsive_image +third_party_settings: + layout_builder: + enabled: false + allow_custom: false +_core: + default_config_hash: UHOBG3TcAwserLclcHcEOGnkPaJlP9n_tSpy7TmELFQ +id: media.image.responsive_lazy +targetEntityType: media +bundle: image +mode: responsive_lazy +content: + field_media_image: + type: responsive_image + label: hidden + settings: + responsive_image_style: full_responsive + image_link: '' + image_loading: + attribute: lazy + third_party_settings: + empty_fields: + handler: '' + field_formatter_class: + class: '' + hs_field_helpers: + inline_contents: 0 + weight: 0 + region: content +hidden: + created: true + field_media_image_caption: true + name: true + search_api_excerpt: true + thumbnail: true + uid: true diff --git a/config/default/core.entity_view_mode.media.responsive_lazy.yml b/config/default/core.entity_view_mode.media.responsive_lazy.yml new file mode 100644 index 0000000000..3c2fb1e8b6 --- /dev/null +++ b/config/default/core.entity_view_mode.media.responsive_lazy.yml @@ -0,0 +1,11 @@ +uuid: 7f2edd8a-e200-49ed-96f8-fae0fd3e6886 +langcode: en +status: true +dependencies: + module: + - media +id: media.responsive_lazy +label: 'Responsive Lazy' +description: '' +targetEntityType: media +cache: true diff --git a/config/default/views.view.hs_default_news.yml b/config/default/views.view.hs_default_news.yml index 9d74100634..40e97acf51 100644 --- a/config/default/views.view.hs_default_news.yml +++ b/config/default/views.view.hs_default_news.yml @@ -657,7 +657,7 @@ display: click_sort_column: target_id type: media_responsive_image_formatter settings: - view_mode: caption_credit + view_mode: responsive_lazy link: true image_style: hp_3_across_events remove_alt: 0 @@ -1192,7 +1192,7 @@ display: click_sort_column: target_id type: media_responsive_image_formatter settings: - view_mode: caption_credit + view_mode: responsive_lazy link: true image_style: hp_3_down_events remove_alt: 0 @@ -1710,7 +1710,7 @@ display: click_sort_column: target_id type: media_responsive_image_formatter settings: - view_mode: caption_credit + view_mode: responsive_lazy link: true image_style: hp_4_across remove_alt: 0 @@ -2064,7 +2064,7 @@ display: click_sort_column: target_id type: media_responsive_image_formatter settings: - view_mode: caption_credit + view_mode: responsive_lazy link: true image_style: hp_3_down_events remove_alt: 0 @@ -3020,7 +3020,7 @@ display: click_sort_column: target_id type: media_responsive_image_formatter settings: - view_mode: caption_credit + view_mode: responsive_lazy link: true image_style: full_responsive remove_alt: 0 diff --git a/config/default/views.view.hs_default_people.yml b/config/default/views.view.hs_default_people.yml index a34d5156fa..699378e2c8 100644 --- a/config/default/views.view.hs_default_people.yml +++ b/config/default/views.view.hs_default_people.yml @@ -545,8 +545,6 @@ display: - 'config:field.storage.node.field_hs_person_email' - 'config:field.storage.node.field_hs_person_image' - 'config:field.storage.node.field_hs_person_title' - - entity_field_info - - views_data grid: id: grid display_title: 'People grid' @@ -606,7 +604,7 @@ display: click_sort_column: target_id type: media_responsive_image_formatter settings: - view_mode: caption_credit + view_mode: responsive_lazy link: true image_style: people_grid_square remove_alt: 0 @@ -1075,8 +1073,6 @@ display: - 'config:field.storage.node.field_hs_person_email' - 'config:field.storage.node.field_hs_person_square_img' - 'config:field.storage.node.field_hs_person_title' - - entity_field_info - - views_data list_link: id: list_link display_title: 'People list link' @@ -1136,7 +1132,7 @@ display: click_sort_column: target_id type: media_responsive_image_formatter settings: - view_mode: caption_credit + view_mode: responsive_lazy link: true image_style: people_grid_list remove_alt: 0 @@ -2144,8 +2140,6 @@ display: - 'config:field.storage.node.field_hs_person_square_img' - 'config:field.storage.node.field_hs_person_telephone' - 'config:field.storage.node.field_hs_person_title' - - entity_field_info - - views_data list_link_grouped: id: list_link_grouped display_title: 'People list link (grouped)' @@ -2205,7 +2199,7 @@ display: click_sort_column: target_id type: media_responsive_image_formatter settings: - view_mode: caption_credit + view_mode: responsive_lazy link: true image_style: people_grid_list remove_alt: 0 @@ -3282,8 +3276,6 @@ display: - 'config:field.storage.node.field_hs_person_square_img' - 'config:field.storage.node.field_hs_person_telephone' - 'config:field.storage.node.field_hs_person_title' - - entity_field_info - - views_data research_area_grid: id: research_area_grid display_title: 'Research Area People Grid' @@ -3343,9 +3335,10 @@ display: click_sort_column: target_id type: media_image_formatter settings: - view_mode: caption_credit + view_mode: responsive_lazy link: true image_style: hs_small_square_200x200 + remove_alt: false group_column: target_id group_columns: { } group_rows: true @@ -4000,5 +3993,3 @@ display: - 'config:field.storage.node.field_hs_person_square_img' - 'config:field.storage.node.field_hs_person_telephone' - 'config:field.storage.node.field_hs_person_title' - - entity_field_info - - views_data diff --git a/config/default/views.view.hs_default_publications.yml b/config/default/views.view.hs_default_publications.yml index a4add0cfb4..56651366e7 100644 --- a/config/default/views.view.hs_default_publications.yml +++ b/config/default/views.view.hs_default_publications.yml @@ -15,8 +15,8 @@ dependencies: - taxonomy.vocabulary.hs_publication_type module: - datetime - - eck - file + - hs_entities - hs_views_helper - link - media @@ -768,9 +768,10 @@ display: click_sort_column: target_id type: media_image_formatter settings: - view_mode: caption_credit + view_mode: responsive_lazy link: true image_style: hs_large_scaled_480px + remove_alt: false group_column: target_id group_columns: { } group_rows: true @@ -1477,7 +1478,7 @@ display: click_sort_column: target_id type: media_responsive_image_formatter settings: - view_mode: caption_credit + view_mode: responsive_lazy link: true image_style: publications_doc remove_alt: 0 @@ -1985,7 +1986,7 @@ display: click_sort_column: target_id type: media_responsive_image_formatter settings: - view_mode: caption_credit + view_mode: responsive_lazy link: true image_style: publications_grid remove_alt: 0 @@ -2477,7 +2478,7 @@ display: click_sort_column: target_id type: media_responsive_image_formatter settings: - view_mode: caption_credit + view_mode: responsive_lazy link: true image_style: publications_grid remove_alt: 0 @@ -3119,7 +3120,7 @@ display: click_sort_column: target_id type: media_responsive_image_formatter settings: - view_mode: caption_credit + view_mode: responsive_lazy link: true image_style: responsive_scaled remove_alt: 0 From ea5934bfe4206edb86acbd30272ef9ada4dc7da6 Mon Sep 17 00:00:00 2001 From: Marc Berger Date: Thu, 25 Jul 2024 10:48:32 -0700 Subject: [PATCH 05/11] refactor(SHS-5629): Switch local patch for remote patch, add patch to fix missing save button on media modal --- composer.json | 5 +- composer.lock | 128 +++++++------ patches/2985168-172.patch | 388 -------------------------------------- 3 files changed, 74 insertions(+), 447 deletions(-) delete mode 100644 patches/2985168-172.patch diff --git a/composer.json b/composer.json index 67ef68360f..5031843f91 100644 --- a/composer.json +++ b/composer.json @@ -241,7 +241,7 @@ "views form null fix": "patches/core-views.patch", "CKEditor 5 headings plugin paragraph label change": "patches/ckeditor5-paragraph-rename.patch", "Allow hs group blocks in layout_builder": "patches/layout_builder-allow-hs-blocks.patch", - "Allow media items to be edited in a modal when using the field widget https://www.drupal.org/project/drupal/issues/2985168": "patches/2985168-172.patch" + "Allow media items to be edited in a modal when using the field widget https://www.drupal.org/project/drupal/issues/2985168": "https://www.drupal.org/files/issues/2023-12-18/2985168-172.patch" }, "drupal/entity_reference_exposed_filters": { "https://www.drupal.org/project/entity_reference_exposed_filters/issues/3189025": "https://www.drupal.org/files/issues/2023-10-17/entity_reference_exposed_filters-empty_target-3189025-4.patch" @@ -250,6 +250,9 @@ "https://www.drupal.org/project/field_group/issues/2969051": "https://www.drupal.org/files/issues/2023-04-24/2969051-99.patch", "https://www.drupal.org/project/field_group/issues/2787179": "https://www.drupal.org/files/issues/2023-04-07/2787179-highlight-html5-validation-85.patch" }, + "drupal/gin": { + "Save button missing in modal for media library https://www.drupal.org/project/gin/issues/3460206": "https://git.drupalcode.org/project/gin/-/merge_requests/463.patch" + }, "drupal/google_analytics": { "https://www.drupal.org/project/google_analytics/issues/3373921": "https://www.drupal.org/files/issues/2023-08-07/google-analytics-issues-3373921-cannot-install-from-existing-config-11.patch" }, diff --git a/composer.lock b/composer.lock index 4866b076f8..1f739cf72f 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "a8f4dc1a8ba0c85ef6d05370ccadcb57", + "content-hash": "ec50bdcc1067247e5cec30f4e091b2d2", "packages": [ { "name": "acquia/blt", @@ -5546,20 +5546,20 @@ }, { "name": "drupal/entity_usage", - "version": "2.0.0-beta12", + "version": "2.0.0-beta13", "source": { "type": "git", "url": "https://git.drupalcode.org/project/entity_usage.git", - "reference": "8.x-2.0-beta12" + "reference": "8.x-2.0-beta13" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/entity_usage-8.x-2.0-beta12.zip", - "reference": "8.x-2.0-beta12", - "shasum": "cdd31e6c413cad6fbdb1bd0aac9ad8a0331eb429" + "url": "https://ftp.drupal.org/files/projects/entity_usage-8.x-2.0-beta13.zip", + "reference": "8.x-2.0-beta13", + "shasum": "3b07a629ed6c94ee23656556b0d1a1c7ba58a77f" }, "require": { - "drupal/core": "^9.1 || ^10" + "drupal/core": "^10.1 || ^11" }, "require-dev": { "drupal/block_field": "~1.0", @@ -5576,8 +5576,8 @@ "type": "drupal-module", "extra": { "drupal": { - "version": "8.x-2.0-beta12", - "datestamp": "1684309054", + "version": "8.x-2.0-beta13", + "datestamp": "1721834455", "security-coverage": { "status": "not-covered", "message": "Beta releases are not covered by Drupal security advisories." @@ -5594,6 +5594,10 @@ "GPL-2.0+" ], "authors": [ + { + "name": "Lullabot", + "homepage": "https://www.drupal.org/user/3815489" + }, { "name": "marcoscano", "homepage": "https://www.drupal.org/user/1288796" @@ -5667,26 +5671,26 @@ }, { "name": "drupal/environment_indicator", - "version": "4.0.18", + "version": "4.0.19", "source": { "type": "git", "url": "https://git.drupalcode.org/project/environment_indicator.git", - "reference": "4.0.18" + "reference": "4.0.19" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/environment_indicator-4.0.18.zip", - "reference": "4.0.18", - "shasum": "1dcf7beb1c23be49edbad04dd6e2a127714c4ea2" + "url": "https://ftp.drupal.org/files/projects/environment_indicator-4.0.19.zip", + "reference": "4.0.19", + "shasum": "4801e2969ecfc33d96defcaa34a34ac8faae4019" }, "require": { - "drupal/core": "^9.3 || ^10" + "drupal/core": "^9.3 || ^10 || ^11" }, "type": "drupal-module", "extra": { "drupal": { - "version": "4.0.18", - "datestamp": "1717143727", + "version": "4.0.19", + "datestamp": "1721460952", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" @@ -6163,26 +6167,26 @@ }, { "name": "drupal/field_permissions", - "version": "1.3.0", + "version": "1.4.0", "source": { "type": "git", "url": "https://git.drupalcode.org/project/field_permissions.git", - "reference": "8.x-1.3" + "reference": "8.x-1.4" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/field_permissions-8.x-1.3.zip", - "reference": "8.x-1.3", - "shasum": "f3815d21b423c94e800388f3c29237fc1a00189d" + "url": "https://ftp.drupal.org/files/projects/field_permissions-8.x-1.4.zip", + "reference": "8.x-1.4", + "shasum": "bd3f5803d8c195bc136d4a25774346d69f653029" }, "require": { - "drupal/core": ">=8.9 <11" + "drupal/core": "^9.5 || ^10 || ^11" }, "type": "drupal-module", "extra": { "drupal": { - "version": "8.x-1.3", - "datestamp": "1703264421", + "version": "8.x-1.4", + "datestamp": "1721754779", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" @@ -8707,17 +8711,17 @@ }, { "name": "drupal/migrate_plus", - "version": "6.0.3", + "version": "6.0.4", "source": { "type": "git", "url": "https://git.drupalcode.org/project/migrate_plus.git", - "reference": "6.0.3" + "reference": "6.0.4" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/migrate_plus-6.0.3.zip", - "reference": "6.0.3", - "shasum": "08feb88178a45d8354862b03fd7fcf9b47ae14e1" + "url": "https://ftp.drupal.org/files/projects/migrate_plus-6.0.4.zip", + "reference": "6.0.4", + "shasum": "0357c416d2a9fd3f4211dd13c6585ed8072fabe7" }, "require": { "drupal/core": ">=9.1", @@ -8734,8 +8738,8 @@ "type": "drupal-module", "extra": { "drupal": { - "version": "6.0.3", - "datestamp": "1721333111", + "version": "6.0.4", + "datestamp": "1721745585", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" @@ -12091,17 +12095,17 @@ }, { "name": "drupal/webform", - "version": "6.2.5", + "version": "6.2.7", "source": { "type": "git", "url": "https://git.drupalcode.org/project/webform.git", - "reference": "6.2.5" + "reference": "6.2.7" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/webform-6.2.5.zip", - "reference": "6.2.5", - "shasum": "84d43a7c35339e831dcb762002164ba1cbbc5d80" + "url": "https://ftp.drupal.org/files/projects/webform-6.2.7.zip", + "reference": "6.2.7", + "shasum": "7e0520773f2521d70837371b08e09a13704b4274" }, "require": { "drupal/core": "^10.1", @@ -12151,8 +12155,8 @@ "type": "drupal-module", "extra": { "drupal": { - "version": "6.2.5", - "datestamp": "1721065379", + "version": "6.2.7", + "datestamp": "1721425228", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" @@ -19871,30 +19875,38 @@ }, { "name": "composer/pcre", - "version": "3.1.4", + "version": "3.2.0", "source": { "type": "git", "url": "https://github.com/composer/pcre.git", - "reference": "04229f163664973f68f38f6f73d917799168ef24" + "reference": "ea4ab6f9580a4fd221e0418f2c357cdd39102a90" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/pcre/zipball/04229f163664973f68f38f6f73d917799168ef24", - "reference": "04229f163664973f68f38f6f73d917799168ef24", + "url": "https://api.github.com/repos/composer/pcre/zipball/ea4ab6f9580a4fd221e0418f2c357cdd39102a90", + "reference": "ea4ab6f9580a4fd221e0418f2c357cdd39102a90", "shasum": "" }, "require": { "php": "^7.4 || ^8.0" }, + "conflict": { + "phpstan/phpstan": "<1.11.8" + }, "require-dev": { - "phpstan/phpstan": "^1.3", + "phpstan/phpstan": "^1.11.8", "phpstan/phpstan-strict-rules": "^1.1", - "symfony/phpunit-bridge": "^5" + "phpunit/phpunit": "^8 || ^9" }, "type": "library", "extra": { "branch-alias": { "dev-main": "3.x-dev" + }, + "phpstan": { + "includes": [ + "extension.neon" + ] } }, "autoload": { @@ -19922,7 +19934,7 @@ ], "support": { "issues": "https://github.com/composer/pcre/issues", - "source": "https://github.com/composer/pcre/tree/3.1.4" + "source": "https://github.com/composer/pcre/tree/3.2.0" }, "funding": [ { @@ -19938,7 +19950,7 @@ "type": "tidelift" } ], - "time": "2024-05-27T13:40:54+00:00" + "time": "2024-07-25T09:36:02+00:00" }, { "name": "composer/spdx-licenses", @@ -20882,16 +20894,16 @@ }, { "name": "google/protobuf", - "version": "v3.25.3", + "version": "v3.25.4", "source": { "type": "git", "url": "https://github.com/protocolbuffers/protobuf-php.git", - "reference": "983a87f4f8798a90ca3a25b0f300b8fda38df643" + "reference": "749f6c8e99a7fe51d096c2db656a4af9a46a6b5e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/protocolbuffers/protobuf-php/zipball/983a87f4f8798a90ca3a25b0f300b8fda38df643", - "reference": "983a87f4f8798a90ca3a25b0f300b8fda38df643", + "url": "https://api.github.com/repos/protocolbuffers/protobuf-php/zipball/749f6c8e99a7fe51d096c2db656a4af9a46a6b5e", + "reference": "749f6c8e99a7fe51d096c2db656a4af9a46a6b5e", "shasum": "" }, "require": { @@ -20920,9 +20932,9 @@ "proto" ], "support": { - "source": "https://github.com/protocolbuffers/protobuf-php/tree/v3.25.3" + "source": "https://github.com/protocolbuffers/protobuf-php/tree/v3.25.4" }, - "time": "2024-02-15T21:11:49+00:00" + "time": "2024-07-24T17:10:25+00:00" }, { "name": "league/html-to-markdown", @@ -22688,16 +22700,16 @@ }, { "name": "phpstan/phpstan", - "version": "1.11.7", + "version": "1.11.8", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "52d2bbfdcae7f895915629e4694e9497d0f8e28d" + "reference": "6adbd118e6c0515dd2f36b06cde1d6da40f1b8ec" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/52d2bbfdcae7f895915629e4694e9497d0f8e28d", - "reference": "52d2bbfdcae7f895915629e4694e9497d0f8e28d", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/6adbd118e6c0515dd2f36b06cde1d6da40f1b8ec", + "reference": "6adbd118e6c0515dd2f36b06cde1d6da40f1b8ec", "shasum": "" }, "require": { @@ -22742,7 +22754,7 @@ "type": "github" } ], - "time": "2024-07-06T11:17:41+00:00" + "time": "2024-07-24T07:01:22+00:00" }, { "name": "phpstan/phpstan-deprecation-rules", diff --git a/patches/2985168-172.patch b/patches/2985168-172.patch deleted file mode 100644 index 776d3d3a74..0000000000 --- a/patches/2985168-172.patch +++ /dev/null @@ -1,388 +0,0 @@ -diff --git a/core/modules/media_library/js/media_library.widget.js b/core/modules/media_library/js/media_library.widget.js -index b9f5b8a5cb1..6205288c167 100644 ---- a/core/modules/media_library/js/media_library.widget.js -+++ b/core/modules/media_library/js/media_library.widget.js -@@ -72,6 +72,28 @@ - }, - }; - -+ /** -+ * Allow users to edit media library items inside a modal. -+ */ -+ Drupal.behaviors.MediaLibraryWidgetEditItem = { -+ attach: function attach(context) { -+ const mediaLibraryEdit = once( -+ 'media-library-edit', -+ '.media-library-widget .edit-media', -+ context, -+ ); -+ $(mediaLibraryEdit).on('click', function () { -+ // Remove any "selected-media" classes. -+ $(this) -+ .closest('.media-library-selection') -+ .find('.selected-media') -+ .removeClass('selected-media'); -+ // Mark the media item as selected to render it properly when submitting an ajax media edit request. -+ $(this).parent().find('article').addClass('selected-media'); -+ }); -+ }, -+ }; -+ - /** - * Disable the open button when the user is not allowed to add more items. - * -diff --git a/core/modules/media_library/media_library.module b/core/modules/media_library/media_library.module -index d92028d7755..20adc675f7a 100644 ---- a/core/modules/media_library/media_library.module -+++ b/core/modules/media_library/media_library.module -@@ -5,13 +5,19 @@ - * Contains hook implementations for the media_library module. - */ - -+use Drupal\Component\Utility\Html; - use Drupal\Component\Utility\UrlHelper; - use Drupal\Core\Access\AccessResult; -+use Drupal\Core\Ajax\AjaxResponse; -+use Drupal\Core\Ajax\CloseModalDialogCommand; -+use Drupal\Core\Ajax\ReplaceCommand; - use Drupal\Core\Entity\EntityInterface; - use Drupal\Core\Entity\Entity\EntityFormDisplay; - use Drupal\Core\Entity\Entity\EntityViewDisplay; -+use Drupal\Core\EventSubscriber\MainContentViewSubscriber; - use Drupal\Core\Field\Plugin\Field\FieldType\EntityReferenceItem; - use Drupal\Core\Form\FormStateInterface; -+use Drupal\Core\Messenger\MessengerInterface; - use Drupal\Core\Render\Element; - use Drupal\Core\Routing\RouteMatchInterface; - use Drupal\Core\Session\AccountInterface; -@@ -220,6 +226,90 @@ function media_library_views_post_render(ViewExecutable $view, &$output, CachePl - } - } - -+/** -+ * Implements hook_form_FORM_ID_alter() for media_form forms. -+ */ -+function media_library_form_media_form_alter(array &$form, FormStateInterface $form_state) { -+ // Make the media edit form work inside modal dialogs. -+ $form_object = $form_state->getFormObject(); -+ if (is_object($form_object) && $form_object->getOperation() === 'edit') { -+ $wrapper_format = \Drupal::request()->query->get(MainContentViewSubscriber::WRAPPER_FORMAT); -+ -+ // Make sure that the media library opener is actually the 'field_widget'. -+ // Get the request uri for the $form. -+ $request_stack = \Drupal::service('request_stack'); -+ $currentRequest = $request_stack->getCurrentRequest(); -+ $mediaLibraryOpenerId = $currentRequest->getRequestUri(); -+ -+ // Extract and parse the 'media_library_opener_id' from the request URI. -+ $queryString = parse_url($mediaLibraryOpenerId, PHP_URL_QUERY); -+ parse_str($queryString ?? '', $queryParams); -+ $mediaLibraryOpenerId = $queryParams['media_library_opener_id'] ?? NULL; -+ -+ if (($wrapper_format === 'drupal_modal' || $wrapper_format === 'drupal_ajax') && $mediaLibraryOpenerId === 'media_library.opener.field_widget') { -+ foreach (Element::children($form['actions']) as $key) { -+ if ($key === 'submit') { -+ // The default name is 'op', but we change it on purpose so that it is -+ // easier to detect our modified AJAX call above. -+ $form['actions'][$key]['#name'] = 'media_library_ajax_submit'; -+ $form['actions'][$key]['#ajax'] = [ -+ 'callback' => 'media_library_media_form_ajax_submit', -+ ]; -+ -+ // Prevent the form that opened the modal dialog to refocus to the -+ // 'Save' button at the bottom of the form. -+ $form['actions'][$key]['#attributes']['data-disable-refocus'] = 'true'; -+ -+ // Reattach dialog AJAX library. -+ $form['#attached']['library'][] = 'core/drupal.dialog.ajax'; -+ -+ // The data-drupal-selector needs to be the same between the various -+ // AJAX requests. A bug in \Drupal\Core\Form\FormBuilder prevents that -+ // from happening unless $form['#id'] is also the same. Normally, #id -+ // is set to a unique HTML ID via Html::getUniqueId(), but here we -+ // bypass that in order to work around the data-drupal-selector bug. -+ // This is okay so long as we assume that this form only ever occurs -+ // once on a page. -+ // Remove once https://www.drupal.org/node/2897377 is fixed. -+ $form['#id'] = Html::getId($form_state->getBuildInfo()['form_id']); -+ } -+ else { -+ // We just want to allow the save action for now. Just hide other -+ // actions like the delete action. -+ $form['actions'][$key]['#access'] = FALSE; -+ } -+ } -+ } -+ } -+} -+ -+/** -+ * AJAX callback for media edit form when form is shown inside modal dialog. -+ * -+ * @ingroup form -+ */ -+function media_library_media_form_ajax_submit(array &$form, FormStateInterface $form_state) { -+ $response = new AjaxResponse(); -+ if (!$form_state->hasAnyErrors()) { -+ $media = $form_state->getFormObject()->getEntity(); -+ $render_array = \Drupal::entityTypeManager()->getViewBuilder('media')->view($media, 'media_library'); -+ $html = \Drupal::service('renderer')->render($render_array); -+ $response->addCommand(new CloseModalDialogCommand()); -+ $response->addCommand(new ReplaceCommand('.selected-media', $html)); -+ -+ // Remove status messages when editing medias. -+ \Drupal::messenger()->deleteByType(MessengerInterface::TYPE_STATUS); -+ } -+ else { -+ $form['status_messages'] = [ -+ '#type' => 'status_messages', -+ '#weight' => -1000, -+ ]; -+ $response->addCommand(new ReplaceCommand('[data-drupal-selector="' . $form['#attributes']['data-drupal-selector'] . '"]', $form)); -+ } -+ return $response; -+} -+ - /** - * Implements hook_preprocess_media(). - */ -diff --git a/core/modules/media_library/src/Plugin/Field/FieldWidget/MediaLibraryWidget.php b/core/modules/media_library/src/Plugin/Field/FieldWidget/MediaLibraryWidget.php -index 6ba3510eb75..01ed892d597 100644 ---- a/core/modules/media_library/src/Plugin/Field/FieldWidget/MediaLibraryWidget.php -+++ b/core/modules/media_library/src/Plugin/Field/FieldWidget/MediaLibraryWidget.php -@@ -379,6 +379,55 @@ public function formElement(FieldItemListInterface $items, $delta, array $elemen - ]; - } - -+ $cardinality_unlimited = ($element['#cardinality'] === FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED); -+ $remaining = $element['#cardinality'] - count($referenced_entities); -+ -+ // Inform the user of how many items are remaining. -+ if (!$cardinality_unlimited) { -+ if ($remaining) { -+ $cardinality_message = $this->formatPlural($remaining, 'One media item remaining.', '@count media items remaining.'); -+ } -+ else { -+ $cardinality_message = $this->t('The maximum number of media items have been selected.'); -+ } -+ -+ // Add a line break between the field message and the cardinality message. -+ if (!empty($element['#description'])) { -+ $element['#description'] .= '
'; -+ } -+ $element['#description'] .= $cardinality_message; -+ } -+ -+ // Create a new media library URL with the correct state parameters. -+ $selected_type_id = reset($allowed_media_type_ids); -+ $remaining = $cardinality_unlimited ? FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED : $remaining; -+ // This particular media library opener needs some extra metadata for its -+ // \Drupal\media_library\MediaLibraryOpenerInterface::getSelectionResponse() -+ // to be able to target the element whose 'data-media-library-widget-value' -+ // attribute is the same as $field_widget_id. The entity ID, entity type ID, -+ // bundle, field name are used for access checking. -+ $entity = $items->getEntity(); -+ $opener_parameters = [ -+ 'field_widget_id' => $field_widget_id, -+ 'entity_type_id' => $entity->getEntityTypeId(), -+ 'bundle' => $entity->bundle(), -+ 'field_name' => $field_name, -+ ]; -+ if (isset($form['#form_mode'])) { -+ $opener_parameters['form_mode'] = $form['#form_mode']; -+ } -+ // Only add the entity ID when we actually have one. The entity ID needs to -+ // be a string to ensure that the media library state generates its -+ // tamper-proof hash in a consistent way. -+ if (!$entity->isNew()) { -+ $opener_parameters['entity_id'] = (string) $entity->id(); -+ -+ if ($entity->getEntityType()->isRevisionable()) { -+ $opener_parameters['revision_id'] = (string) $entity->getRevisionId(); -+ } -+ } -+ $state = MediaLibraryState::create('media_library.opener.field_widget', $allowed_media_type_ids, $selected_type_id, $remaining, $opener_parameters); -+ - $element['selection'] = [ - '#type' => 'container', - '#theme_wrappers' => [ -@@ -427,6 +476,7 @@ public function formElement(FieldItemListInterface $items, $delta, array $elemen - '#type' => 'submit', - '#name' => $field_name . '-' . $delta . '-media-library-remove-button' . $id_suffix, - '#value' => $this->t('Remove'), -+ '#weight' => -10, - '#media_id' => $media_item->id(), - '#attributes' => [ - 'aria-label' => $media_item->access('view label') ? $this->t('Remove @label', ['@label' => $media_item->label()]) : $this->t('Remove media'), -@@ -443,6 +493,19 @@ public function formElement(FieldItemListInterface $items, $delta, array $elemen - // Prevent errors in other widgets from preventing removal. - '#limit_validation_errors' => $limit_validation_errors, - ], -+ 'edit_button' => [ -+ '#type' => 'submit', -+ '#value' => $this->t('Edit'), -+ '#weight' => 1, -+ '#access' => $media_item->access('update'), -+ '#attributes' => [ -+ 'aria-label' => $media_item->access('view label') ? $this->t('Edit @label', ['@label' => $media_item->label()]) : $this->t('Edit media'), -+ 'class' => ['edit-media', 'use-ajax'], -+ 'href' => $media_item->toUrl('edit-form', ['query' => $state->all()])->toString(), -+ 'data-dialog-type' => 'modal', -+ 'data-dialog-options' => '{"width":"80%"}', -+ ], -+ ], - 'rendered_entity' => $preview, - 'target_id' => [ - '#type' => 'hidden', -@@ -464,52 +527,6 @@ public function formElement(FieldItemListInterface $items, $delta, array $elemen - ]; - } - -- $cardinality_unlimited = ($element['#cardinality'] === FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED); -- $remaining = $element['#cardinality'] - count($referenced_entities); -- -- // Inform the user of how many items are remaining. -- if (!$cardinality_unlimited) { -- if ($remaining) { -- $cardinality_message = $this->formatPlural($remaining, 'One media item remaining.', '@count media items remaining.'); -- } -- else { -- $cardinality_message = $this->t('The maximum number of media items have been selected.'); -- } -- -- // Add a line break between the field message and the cardinality message. -- if (!empty($element['#description'])) { -- $element['#description'] .= '
'; -- } -- $element['#description'] .= $cardinality_message; -- } -- -- // Create a new media library URL with the correct state parameters. -- $selected_type_id = reset($allowed_media_type_ids); -- $remaining = $cardinality_unlimited ? FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED : $remaining; -- // This particular media library opener needs some extra metadata for its -- // \Drupal\media_library\MediaLibraryOpenerInterface::getSelectionResponse() -- // to be able to target the element whose 'data-media-library-widget-value' -- // attribute is the same as $field_widget_id. The entity ID, entity type ID, -- // bundle, field name are used for access checking. -- $entity = $items->getEntity(); -- $opener_parameters = [ -- 'field_widget_id' => $field_widget_id, -- 'entity_type_id' => $entity->getEntityTypeId(), -- 'bundle' => $entity->bundle(), -- 'field_name' => $field_name, -- ]; -- // Only add the entity ID when we actually have one. The entity ID needs to -- // be a string to ensure that the media library state generates its -- // tamper-proof hash in a consistent way. -- if (!$entity->isNew()) { -- $opener_parameters['entity_id'] = (string) $entity->id(); -- -- if ($entity->getEntityType()->isRevisionable()) { -- $opener_parameters['revision_id'] = (string) $entity->getRevisionId(); -- } -- } -- $state = MediaLibraryState::create('media_library.opener.field_widget', $allowed_media_type_ids, $selected_type_id, $remaining, $opener_parameters); -- - // Add a button that will load the Media library in a modal using AJAX. - $element['open_button'] = [ - '#type' => 'button', -diff --git a/core/themes/claro/claro.theme b/core/themes/claro/claro.theme -index f33e425c165..4826c25e234 100644 ---- a/core/themes/claro/claro.theme -+++ b/core/themes/claro/claro.theme -@@ -1505,6 +1505,8 @@ function claro_preprocess_item_list__media_library_add_form_media_list(array &$v - * This targets each media item selected in an entity reference field. - */ - function claro_preprocess_media_library_item__widget(array &$variables) { -+ $variables['content']['edit_button']['#attributes']['class'][] = 'media-library-item__edit'; -+ $variables['content']['edit_button']['#attributes']['class'][] = 'icon-link'; - $variables['content']['remove_button']['#attributes']['class'][] = 'media-library-item__remove'; - $variables['content']['remove_button']['#attributes']['class'][] = 'icon-link'; - } -diff --git a/core/themes/claro/css/theme/media-library.css b/core/themes/claro/css/theme/media-library.css -index 951f95d85f6..f98cb27ab06 100644 ---- a/core/themes/claro/css/theme/media-library.css -+++ b/core/themes/claro/css/theme/media-library.css -@@ -752,6 +752,12 @@ - .media-library-item__edit, - .media-library-item__edit:hover, - .media-library-item__edit:focus, -+.media-library-item__edit.button, -+.media-library-item__edit.button:disabled, -+.media-library-item__edit.button:disabled:active, -+.media-library-item__edit.button:hover, -+.media-library-item__edit.button:focus, -+.media-library-item__edit.button:not(:focus), - .media-library-item__remove, - .media-library-item__remove:hover, - .media-library-item__remove:focus, -@@ -794,7 +800,13 @@ - left: 0.625rem; - } - --.media-library-item__edit { -+.media-library-item__edit, -+.media-library-item__edit.button, -+.media-library-item__edit.button:disabled, -+.media-library-item__edit.button:disabled:active, -+.media-library-item__edit.button:hover, -+.media-library-item__edit.button:focus, -+.media-library-item__edit.button:not(:focus) { - /* !important to override button class border. */ - border: 1px solid var(--color-gray-200) !important; - background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3e%3cg fill='%23545560'%3e%3cpath d='M14.545 3.042l-1.586-1.585a1.003 1.003 0 00-1.414 0L10.252 2.75l3 3 1.293-1.293a1.004 1.004 0 000-1.415zM5.25 13.751l-3-3 6.998-6.998 3 3zM.908 14.775c-.087.262.055.397.316.312l2.001-.667-1.65-1.646-.667 2.001z'/%3e%3c/g%3e%3c/svg%3e"); -@@ -803,7 +815,9 @@ - background-size: 0.75rem; - } - --.media-library-item__edit:active { -+.media-library-item__edit:active, -+.media-library-item__edit.button:active, -+.media-library-item__edit.button:disabled:active { - background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3e%3cg%3e%3cpath fill='%23ffffff' d='M14.545 3.042l-1.586-1.585c-.389-.389-1.025-.389-1.414 0l-1.293 1.293 3 3 1.293-1.293c.389-.389.389-1.026 0-1.415z'/%3e%3crect fill='%23ffffff' x='5.129' y='3.8' transform='matrix(-.707 -.707 .707 -.707 6.189 20.064)' width='4.243' height='9.899'/%3e%3cpath fill='%23ffffff' d='M.908 14.775c-.087.262.055.397.316.312l2.001-.667-1.65-1.646-.667 2.001z'/%3e%3c/g%3e%3c/svg%3e"); - } - -diff --git a/core/themes/claro/css/theme/media-library.pcss.css b/core/themes/claro/css/theme/media-library.pcss.css -index 318b4339b0e..b404f318137 100644 ---- a/core/themes/claro/css/theme/media-library.pcss.css -+++ b/core/themes/claro/css/theme/media-library.pcss.css -@@ -692,6 +692,12 @@ - .media-library-item__edit, - .media-library-item__edit:hover, - .media-library-item__edit:focus, -+.media-library-item__edit.button, -+.media-library-item__edit.button:disabled, -+.media-library-item__edit.button:disabled:active, -+.media-library-item__edit.button:hover, -+.media-library-item__edit.button:focus, -+.media-library-item__edit.button:not(:focus), - .media-library-item__remove, - .media-library-item__remove:hover, - .media-library-item__remove:focus, -@@ -732,7 +738,13 @@ - left: 10px; - } - --.media-library-item__edit { -+.media-library-item__edit, -+.media-library-item__edit.button, -+.media-library-item__edit.button:disabled, -+.media-library-item__edit.button:disabled:active, -+.media-library-item__edit.button:hover, -+.media-library-item__edit.button:focus, -+.media-library-item__edit.button:not(:focus) { - /* !important to override button class border. */ - border: 1px solid var(--color-gray-200) !important; - background-image: url("../../images/icons/545560/pencil.svg"); -@@ -740,7 +752,9 @@ - background-position: center; - background-size: 12px; - } --.media-library-item__edit:active { -+.media-library-item__edit:active, -+.media-library-item__edit.button:active, -+.media-library-item__edit.button:disabled:active { - background-image: url("../../../../misc/icons/ffffff/pencil.svg"); - } - .media-library-item__remove, From b8d12025d57db26cf53f116c89db299fecbb33d3 Mon Sep 17 00:00:00 2001 From: Marc Berger <107938318+codechefmarc@users.noreply.github.com> Date: Fri, 26 Jul 2024 08:16:45 -0700 Subject: [PATCH 06/11] SHS-5675: Helping users avoid 'Table cell missing context (e.g. headings) A11y warning (#1579) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(SHS-5675): Add default table header rows to new tables in CKEditor * fix(SHS-5675): Fix linting error * docs(SHS-5675): Add comments describing change and source of change. * feat(SHS-5675): Update table heading color in CKEditor * fix(shs-5675): change color variable for table headings --------- Co-authored-by: Andrés Díaz Soto --- .../su_humsci_profile.profile | 25 ++++++++++++++++--- .../src/scss/ckeditor/imports.scss | 1 + 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/docroot/profiles/humsci/su_humsci_profile/su_humsci_profile.profile b/docroot/profiles/humsci/su_humsci_profile/su_humsci_profile.profile index 4f310c3240..4fc0b40601 100644 --- a/docroot/profiles/humsci/su_humsci_profile/su_humsci_profile.profile +++ b/docroot/profiles/humsci/su_humsci_profile/su_humsci_profile.profile @@ -5,6 +5,8 @@ * su_humsci_profile.profile */ +use Drupal\ckeditor5\Plugin\CKEditor5PluginDefinition; +use Drupal\config_pages\ConfigPagesInterface; use Drupal\Core\Access\AccessResult; use Drupal\Core\Block\BlockPluginInterface; use Drupal\Core\Cache\Cache; @@ -12,19 +14,18 @@ use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Field\FieldDefinitionInterface; use Drupal\Core\Field\FieldItemListInterface; use Drupal\Core\Form\FormStateInterface; +use Drupal\Core\Routing\RouteMatchInterface; use Drupal\Core\Session\AccountInterface; use Drupal\Core\Url; -use Drupal\config_pages\ConfigPagesInterface; use Drupal\menu_link_content\MenuLinkContentInterface; use Drupal\menu_position\Entity\MenuPositionRule; use Drupal\node\NodeInterface; +use Drupal\paragraphs\Plugin\Field\FieldWidget\ParagraphsWidget; use Drupal\pathauto\PathautoPatternInterface; use Drupal\su_humsci_profile\HumsciCleanup; use Drupal\user\Entity\Role; use Drupal\user\RoleInterface; use Drupal\user\UserInterface; -use Drupal\Core\Routing\RouteMatchInterface; -use Drupal\paragraphs\Plugin\Field\FieldWidget\ParagraphsWidget; /** * Implements hook_ENTITY_TYPE_insert(). @@ -891,3 +892,21 @@ function su_humsci_profile_preprocess_form_element(&$variables) { $variables['#attached']['library'][] = 'su_humsci_profile/select-preact'; } } + +/** + * Implements hook_ckeditor5_plugin_info_alter(). + */ +function su_humsci_profile_ckeditor5_plugin_info_alter(array &$plugin_definitions) { + /* + * Adds default header row to CKEditor tables. + * @see https://www.drupal.org/forum/support/post-installation/2023-10-19/how-can-i-configure-defaultheadings-in-ckeditor-tables + * */ + if (isset($plugin_definitions['ckeditor5_table'])) { + $tableDefinition = $plugin_definitions['ckeditor5_table']->toArray(); + $tableDefinition['ckeditor5']['config']['table']['defaultHeadings'] = [ + 'rows' => 1, + 'columns' => 0, + ]; + $plugin_definitions['ckeditor5_table'] = new CKEditor5PluginDefinition($tableDefinition); + } +} diff --git a/docroot/themes/humsci/humsci_basic/src/scss/ckeditor/imports.scss b/docroot/themes/humsci/humsci_basic/src/scss/ckeditor/imports.scss index 5068a75062..16d08c304d 100644 --- a/docroot/themes/humsci/humsci_basic/src/scss/ckeditor/imports.scss +++ b/docroot/themes/humsci/humsci_basic/src/scss/ckeditor/imports.scss @@ -256,6 +256,7 @@ $px-only: true; thead th { @include table-heading; + color: var(--palette--white); } thead tr { From 517e03caa4480a07210b99ed38e38ce3eef0c2fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20D=C3=ADaz=20Soto?= Date: Fri, 26 Jul 2024 10:03:15 -0600 Subject: [PATCH 07/11] fix(shs-5629): revert composer.lock changes --- composer.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.lock b/composer.lock index 1f739cf72f..4616625358 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "ec50bdcc1067247e5cec30f4e091b2d2", + "content-hash": "14a8c99831865ed8ed86a00c9adffbfb", "packages": [ { "name": "acquia/blt", From cae0e4815bb0fd8ac3109e96ddaa6f6a16fa7ed7 Mon Sep 17 00:00:00 2001 From: Marc Berger Date: Mon, 29 Jul 2024 14:33:54 -0700 Subject: [PATCH 08/11] fix(SHS-5629): Possible fix for dialog box too low on screen --- composer.json | 5 +- composer.lock | 273 ++++++++++++++++++++++++++++---------------------- 2 files changed, 155 insertions(+), 123 deletions(-) diff --git a/composer.json b/composer.json index 5031843f91..80b6c35e0c 100644 --- a/composer.json +++ b/composer.json @@ -141,7 +141,7 @@ "drupal/pathauto": "^1.8", "drupal/publishcontent": "^1.2", "drupal/purge": "^3.2", - "drupal/rabbit_hole": "^1.0-beta4", + "drupal/rabbit_hole": "1.x-dev@dev", "drupal/readonly_field_widget": "^1.4", "drupal/real_aes": "^2.3", "drupal/redirect": "^1.6", @@ -250,9 +250,6 @@ "https://www.drupal.org/project/field_group/issues/2969051": "https://www.drupal.org/files/issues/2023-04-24/2969051-99.patch", "https://www.drupal.org/project/field_group/issues/2787179": "https://www.drupal.org/files/issues/2023-04-07/2787179-highlight-html5-validation-85.patch" }, - "drupal/gin": { - "Save button missing in modal for media library https://www.drupal.org/project/gin/issues/3460206": "https://git.drupalcode.org/project/gin/-/merge_requests/463.patch" - }, "drupal/google_analytics": { "https://www.drupal.org/project/google_analytics/issues/3373921": "https://www.drupal.org/files/issues/2023-08-07/google-analytics-issues-3373921-cannot-install-from-existing-config-11.patch" }, diff --git a/composer.lock b/composer.lock index 4616625358..3bfa194bbc 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "14a8c99831865ed8ed86a00c9adffbfb", + "content-hash": "3eb76080c7b200950000dd08d2c8eb6a", "packages": [ { "name": "acquia/blt", @@ -371,16 +371,16 @@ }, { "name": "commerceguys/addressing", - "version": "v2.2.1", + "version": "v2.2.2", "source": { "type": "git", "url": "https://github.com/commerceguys/addressing.git", - "reference": "3e679cd280169109ab6f9d7bff0d069e14d309ac" + "reference": "4d23e46ea32534268ea121453c93ceda2bc3ee69" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/commerceguys/addressing/zipball/3e679cd280169109ab6f9d7bff0d069e14d309ac", - "reference": "3e679cd280169109ab6f9d7bff0d069e14d309ac", + "url": "https://api.github.com/repos/commerceguys/addressing/zipball/4d23e46ea32534268ea121453c93ceda2bc3ee69", + "reference": "4d23e46ea32534268ea121453c93ceda2bc3ee69", "shasum": "" }, "require": { @@ -429,9 +429,9 @@ ], "support": { "issues": "https://github.com/commerceguys/addressing/issues", - "source": "https://github.com/commerceguys/addressing/tree/v2.2.1" + "source": "https://github.com/commerceguys/addressing/tree/v2.2.2" }, - "time": "2024-07-04T15:28:57+00:00" + "time": "2024-07-12T11:53:22+00:00" }, { "name": "composer/installers", @@ -6906,20 +6906,21 @@ }, { "name": "drupal/inline_entity_form", - "version": "3.0.0-rc19", + "version": "3.0.0-rc20", "source": { "type": "git", "url": "https://git.drupalcode.org/project/inline_entity_form.git", - "reference": "3.0.0-rc19" + "reference": "3.0.0-rc20" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/inline_entity_form-3.0.0-rc19.zip", - "reference": "3.0.0-rc19", - "shasum": "d8976940dd3f85412ba5e274af15fbcdd22ee27a" + "url": "https://ftp.drupal.org/files/projects/inline_entity_form-3.0.0-rc20.zip", + "reference": "3.0.0-rc20", + "shasum": "c9ad4572bce4260d1d233a0c3196e4ff0915e4ee" }, "require": { - "drupal/core": "^8.8 || ^9 || ^10", + "drupal/core": "^8.8 || ^9 || ^10 || ^11", + "drupal/rat": "^1.0.0@stable", "php": ">=7.1" }, "require-dev": { @@ -6928,8 +6929,8 @@ "type": "drupal-module", "extra": { "drupal": { - "version": "3.0.0-rc19", - "datestamp": "1704729077", + "version": "3.0.0-rc20", + "datestamp": "1722000368", "security-coverage": { "status": "not-covered", "message": "RC releases are not covered by Drupal security advisories." @@ -9781,17 +9782,11 @@ }, { "name": "drupal/rabbit_hole", - "version": "1.0.0", + "version": "dev-1.x", "source": { "type": "git", "url": "https://git.drupalcode.org/project/rabbit_hole.git", - "reference": "8.x-1.0" - }, - "dist": { - "type": "zip", - "url": "https://ftp.drupal.org/files/projects/rabbit_hole-8.x-1.0.zip", - "reference": "8.x-1.0", - "shasum": "9fd3129b27cd10e23a775719770bf2bda977c234" + "reference": "5320357bd2e8d13e8bc72e403fb0f71cf0e00a05" }, "require": { "drupal/core": "^9.5 || ^10 || ^11" @@ -9805,12 +9800,15 @@ }, "type": "drupal-module", "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + }, "drupal": { - "version": "8.x-1.0", - "datestamp": "1721413113", + "version": "8.x-1.0+1-dev", + "datestamp": "1721951995", "security-coverage": { - "status": "covered", - "message": "Covered by Drupal's security advisory policy" + "status": "not-covered", + "message": "Dev releases are not covered by Drupal security advisories." } } }, @@ -9858,6 +9856,39 @@ "source": "https://git.drupalcode.org/project/rabbit_hole" } }, + { + "name": "drupal/rat", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://git.drupalcode.org/project/rat.git", + "reference": "28202b02262a39ac8dbbfd43696b67c0c8c46b71" + }, + "require": { + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "drupal/core": "^9.4", + "drupal/core-dev": "^9.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "Drupal\\rat\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "gpl-2.0-or-later" + ], + "authors": [ + { + "name": "Merlin", + "email": "merlin@geeks4change.net" + } + ], + "time": "2023-07-19T20:22:22+00:00" + }, { "name": "drupal/readonly_field_widget", "version": "1.5.0", @@ -11006,26 +11037,29 @@ }, { "name": "drupal/token", - "version": "1.14.0", + "version": "1.15.0", "source": { "type": "git", "url": "https://git.drupalcode.org/project/token.git", - "reference": "8.x-1.14" + "reference": "8.x-1.15" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/token-8.x-1.14.zip", - "reference": "8.x-1.14", - "shasum": "df3cae709fcc1a99ac1111ce67a0d6af56d287d7" + "url": "https://ftp.drupal.org/files/projects/token-8.x-1.15.zip", + "reference": "8.x-1.15", + "shasum": "5916fbccc86458a5f51e71f832ac70ff4c84ebdf" }, "require": { - "drupal/core": "^9.2 || ^10" + "drupal/core": "^9.2 || ^10 || ^11" + }, + "require-dev": { + "drupal/book": "*" }, "type": "drupal-module", "extra": { "drupal": { - "version": "8.x-1.14", - "datestamp": "1713009399", + "version": "8.x-1.15", + "datestamp": "1722206211", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" @@ -15862,16 +15896,16 @@ }, { "name": "symfony/console", - "version": "v6.4.9", + "version": "v6.4.10", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "6edb5363ec0c78ad4d48c5128ebf4d083d89d3a9" + "reference": "504974cbe43d05f83b201d6498c206f16fc0cdbc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/6edb5363ec0c78ad4d48c5128ebf4d083d89d3a9", - "reference": "6edb5363ec0c78ad4d48c5128ebf4d083d89d3a9", + "url": "https://api.github.com/repos/symfony/console/zipball/504974cbe43d05f83b201d6498c206f16fc0cdbc", + "reference": "504974cbe43d05f83b201d6498c206f16fc0cdbc", "shasum": "" }, "require": { @@ -15936,7 +15970,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.4.9" + "source": "https://github.com/symfony/console/tree/v6.4.10" }, "funding": [ { @@ -15952,20 +15986,20 @@ "type": "tidelift" } ], - "time": "2024-06-28T09:49:33+00:00" + "time": "2024-07-26T12:30:32+00:00" }, { "name": "symfony/dependency-injection", - "version": "v6.4.9", + "version": "v6.4.10", "source": { "type": "git", "url": "https://github.com/symfony/dependency-injection.git", - "reference": "a4df9dfe5da2d177af6643610c7bee2cb76a9f5e" + "reference": "5caf9c5f6085f13b27d70a236b776c07e4a1c3eb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/a4df9dfe5da2d177af6643610c7bee2cb76a9f5e", - "reference": "a4df9dfe5da2d177af6643610c7bee2cb76a9f5e", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/5caf9c5f6085f13b27d70a236b776c07e4a1c3eb", + "reference": "5caf9c5f6085f13b27d70a236b776c07e4a1c3eb", "shasum": "" }, "require": { @@ -16017,7 +16051,7 @@ "description": "Allows you to standardize and centralize the way objects are constructed in your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/dependency-injection/tree/v6.4.9" + "source": "https://github.com/symfony/dependency-injection/tree/v6.4.10" }, "funding": [ { @@ -16033,7 +16067,7 @@ "type": "tidelift" } ], - "time": "2024-06-19T10:45:28+00:00" + "time": "2024-07-26T07:32:07+00:00" }, { "name": "symfony/deprecation-contracts", @@ -16104,16 +16138,16 @@ }, { "name": "symfony/error-handler", - "version": "v6.4.9", + "version": "v6.4.10", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "c9b7cc075b3ab484239855622ca05cb0b99c13ec" + "reference": "231f1b2ee80f72daa1972f7340297d67439224f0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/c9b7cc075b3ab484239855622ca05cb0b99c13ec", - "reference": "c9b7cc075b3ab484239855622ca05cb0b99c13ec", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/231f1b2ee80f72daa1972f7340297d67439224f0", + "reference": "231f1b2ee80f72daa1972f7340297d67439224f0", "shasum": "" }, "require": { @@ -16159,7 +16193,7 @@ "description": "Provides tools to manage errors and ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/error-handler/tree/v6.4.9" + "source": "https://github.com/symfony/error-handler/tree/v6.4.10" }, "funding": [ { @@ -16175,7 +16209,7 @@ "type": "tidelift" } ], - "time": "2024-06-21T16:04:15+00:00" + "time": "2024-07-26T12:30:32+00:00" }, { "name": "symfony/event-dispatcher", @@ -16401,16 +16435,16 @@ }, { "name": "symfony/finder", - "version": "v6.4.8", + "version": "v6.4.10", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "3ef977a43883215d560a2cecb82ec8e62131471c" + "reference": "af29198d87112bebdd397bd7735fbd115997824c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/3ef977a43883215d560a2cecb82ec8e62131471c", - "reference": "3ef977a43883215d560a2cecb82ec8e62131471c", + "url": "https://api.github.com/repos/symfony/finder/zipball/af29198d87112bebdd397bd7735fbd115997824c", + "reference": "af29198d87112bebdd397bd7735fbd115997824c", "shasum": "" }, "require": { @@ -16445,7 +16479,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v6.4.8" + "source": "https://github.com/symfony/finder/tree/v6.4.10" }, "funding": [ { @@ -16461,20 +16495,20 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:49:08+00:00" + "time": "2024-07-24T07:06:38+00:00" }, { "name": "symfony/http-foundation", - "version": "v6.4.8", + "version": "v6.4.10", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "27de8cc95e11db7a50b027e71caaab9024545947" + "reference": "117f1f20a7ade7bcea28b861fb79160a21a1e37b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/27de8cc95e11db7a50b027e71caaab9024545947", - "reference": "27de8cc95e11db7a50b027e71caaab9024545947", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/117f1f20a7ade7bcea28b861fb79160a21a1e37b", + "reference": "117f1f20a7ade7bcea28b861fb79160a21a1e37b", "shasum": "" }, "require": { @@ -16522,7 +16556,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v6.4.8" + "source": "https://github.com/symfony/http-foundation/tree/v6.4.10" }, "funding": [ { @@ -16538,20 +16572,20 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:49:08+00:00" + "time": "2024-07-26T12:36:27+00:00" }, { "name": "symfony/http-kernel", - "version": "v6.4.9", + "version": "v6.4.10", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "cc4a9bec6e1bdd2405f40277a68a6ed1bb393005" + "reference": "147e0daf618d7575b5007055340d09aece5cf068" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/cc4a9bec6e1bdd2405f40277a68a6ed1bb393005", - "reference": "cc4a9bec6e1bdd2405f40277a68a6ed1bb393005", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/147e0daf618d7575b5007055340d09aece5cf068", + "reference": "147e0daf618d7575b5007055340d09aece5cf068", "shasum": "" }, "require": { @@ -16636,7 +16670,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v6.4.9" + "source": "https://github.com/symfony/http-kernel/tree/v6.4.10" }, "funding": [ { @@ -16652,7 +16686,7 @@ "type": "tidelift" } ], - "time": "2024-06-28T11:48:06+00:00" + "time": "2024-07-26T14:52:04+00:00" }, { "name": "symfony/mailer", @@ -17691,16 +17725,16 @@ }, { "name": "symfony/psr-http-message-bridge", - "version": "v6.4.8", + "version": "v6.4.10", "source": { "type": "git", "url": "https://github.com/symfony/psr-http-message-bridge.git", - "reference": "23a162bd446b93948a2c2f6909d80ad06195be10" + "reference": "89a24648d73e4eee30893b0da16abc454a65c53b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/psr-http-message-bridge/zipball/23a162bd446b93948a2c2f6909d80ad06195be10", - "reference": "23a162bd446b93948a2c2f6909d80ad06195be10", + "url": "https://api.github.com/repos/symfony/psr-http-message-bridge/zipball/89a24648d73e4eee30893b0da16abc454a65c53b", + "reference": "89a24648d73e4eee30893b0da16abc454a65c53b", "shasum": "" }, "require": { @@ -17754,7 +17788,7 @@ "psr-7" ], "support": { - "source": "https://github.com/symfony/psr-http-message-bridge/tree/v6.4.8" + "source": "https://github.com/symfony/psr-http-message-bridge/tree/v6.4.10" }, "funding": [ { @@ -17770,20 +17804,20 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:51:39+00:00" + "time": "2024-07-15T09:36:38+00:00" }, { "name": "symfony/routing", - "version": "v6.4.8", + "version": "v6.4.10", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "8a40d0f9b01f0fbb80885d3ce0ad6714fb603a58" + "reference": "aad19fe10753ba842f0d653a8db819c4b3affa87" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/8a40d0f9b01f0fbb80885d3ce0ad6714fb603a58", - "reference": "8a40d0f9b01f0fbb80885d3ce0ad6714fb603a58", + "url": "https://api.github.com/repos/symfony/routing/zipball/aad19fe10753ba842f0d653a8db819c4b3affa87", + "reference": "aad19fe10753ba842f0d653a8db819c4b3affa87", "shasum": "" }, "require": { @@ -17837,7 +17871,7 @@ "url" ], "support": { - "source": "https://github.com/symfony/routing/tree/v6.4.8" + "source": "https://github.com/symfony/routing/tree/v6.4.10" }, "funding": [ { @@ -17853,20 +17887,20 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:49:08+00:00" + "time": "2024-07-15T09:26:24+00:00" }, { "name": "symfony/serializer", - "version": "v6.4.9", + "version": "v6.4.10", "source": { "type": "git", "url": "https://github.com/symfony/serializer.git", - "reference": "56ce31d19127e79647ac53387c7555bdcd5730ce" + "reference": "9a67fcf320561e96f94d62bbe0e169ac534a5718" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/serializer/zipball/56ce31d19127e79647ac53387c7555bdcd5730ce", - "reference": "56ce31d19127e79647ac53387c7555bdcd5730ce", + "url": "https://api.github.com/repos/symfony/serializer/zipball/9a67fcf320561e96f94d62bbe0e169ac534a5718", + "reference": "9a67fcf320561e96f94d62bbe0e169ac534a5718", "shasum": "" }, "require": { @@ -17935,7 +17969,7 @@ "description": "Handles serializing and deserializing data structures, including object graphs, into array structures or other formats like XML and JSON.", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/serializer/tree/v6.4.9" + "source": "https://github.com/symfony/serializer/tree/v6.4.10" }, "funding": [ { @@ -17951,7 +17985,7 @@ "type": "tidelift" } ], - "time": "2024-06-28T07:59:05+00:00" + "time": "2024-07-26T13:13:26+00:00" }, { "name": "symfony/service-contracts", @@ -18037,16 +18071,16 @@ }, { "name": "symfony/string", - "version": "v6.4.9", + "version": "v6.4.10", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "76792dbd99690a5ebef8050d9206c60c59e681d7" + "reference": "ccf9b30251719567bfd46494138327522b9a9446" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/76792dbd99690a5ebef8050d9206c60c59e681d7", - "reference": "76792dbd99690a5ebef8050d9206c60c59e681d7", + "url": "https://api.github.com/repos/symfony/string/zipball/ccf9b30251719567bfd46494138327522b9a9446", + "reference": "ccf9b30251719567bfd46494138327522b9a9446", "shasum": "" }, "require": { @@ -18103,7 +18137,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.4.9" + "source": "https://github.com/symfony/string/tree/v6.4.10" }, "funding": [ { @@ -18119,7 +18153,7 @@ "type": "tidelift" } ], - "time": "2024-06-28T09:25:38+00:00" + "time": "2024-07-22T10:21:14+00:00" }, { "name": "symfony/translation-contracts", @@ -18310,16 +18344,16 @@ }, { "name": "symfony/validator", - "version": "v6.4.9", + "version": "v6.4.10", "source": { "type": "git", "url": "https://github.com/symfony/validator.git", - "reference": "ee0a4d6a327a963aee094f730da238f7ea18cb01" + "reference": "bcf939a9d1acd7d2912e9474c0c3d7840a03cbcd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/validator/zipball/ee0a4d6a327a963aee094f730da238f7ea18cb01", - "reference": "ee0a4d6a327a963aee094f730da238f7ea18cb01", + "url": "https://api.github.com/repos/symfony/validator/zipball/bcf939a9d1acd7d2912e9474c0c3d7840a03cbcd", + "reference": "bcf939a9d1acd7d2912e9474c0c3d7840a03cbcd", "shasum": "" }, "require": { @@ -18387,7 +18421,7 @@ "description": "Provides tools to validate values", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/validator/tree/v6.4.9" + "source": "https://github.com/symfony/validator/tree/v6.4.10" }, "funding": [ { @@ -18403,20 +18437,20 @@ "type": "tidelift" } ], - "time": "2024-06-22T07:42:41+00:00" + "time": "2024-07-26T12:30:32+00:00" }, { "name": "symfony/var-dumper", - "version": "v6.4.9", + "version": "v6.4.10", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "c31566e4ca944271cc8d8ac6887cbf31b8c6a172" + "reference": "a71cc3374f5fb9759da1961d28c452373b343dd4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/c31566e4ca944271cc8d8ac6887cbf31b8c6a172", - "reference": "c31566e4ca944271cc8d8ac6887cbf31b8c6a172", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/a71cc3374f5fb9759da1961d28c452373b343dd4", + "reference": "a71cc3374f5fb9759da1961d28c452373b343dd4", "shasum": "" }, "require": { @@ -18472,7 +18506,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v6.4.9" + "source": "https://github.com/symfony/var-dumper/tree/v6.4.10" }, "funding": [ { @@ -18488,7 +18522,7 @@ "type": "tidelift" } ], - "time": "2024-06-27T13:23:14+00:00" + "time": "2024-07-26T12:30:32+00:00" }, { "name": "symfony/var-exporter", @@ -24630,16 +24664,16 @@ }, { "name": "symfony/cache", - "version": "v6.4.8", + "version": "v6.4.10", "source": { "type": "git", "url": "https://github.com/symfony/cache.git", - "reference": "287142df5579ce223c485b3872df3efae8390984" + "reference": "6702d2d777260e6ff3451fee2d7d78ab5f715cdc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/cache/zipball/287142df5579ce223c485b3872df3efae8390984", - "reference": "287142df5579ce223c485b3872df3efae8390984", + "url": "https://api.github.com/repos/symfony/cache/zipball/6702d2d777260e6ff3451fee2d7d78ab5f715cdc", + "reference": "6702d2d777260e6ff3451fee2d7d78ab5f715cdc", "shasum": "" }, "require": { @@ -24706,7 +24740,7 @@ "psr6" ], "support": { - "source": "https://github.com/symfony/cache/tree/v6.4.8" + "source": "https://github.com/symfony/cache/tree/v6.4.10" }, "funding": [ { @@ -24722,7 +24756,7 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:49:08+00:00" + "time": "2024-07-17T06:05:49+00:00" }, { "name": "symfony/cache-contracts", @@ -25013,16 +25047,16 @@ }, { "name": "symfony/phpunit-bridge", - "version": "v6.4.9", + "version": "v6.4.10", "source": { "type": "git", "url": "https://github.com/symfony/phpunit-bridge.git", - "reference": "6e03e4db9696e0cfcda6537177c2c03dc49c45c8" + "reference": "ad510515b11ba5291fdd59b25d70227bfac2d7ab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/phpunit-bridge/zipball/6e03e4db9696e0cfcda6537177c2c03dc49c45c8", - "reference": "6e03e4db9696e0cfcda6537177c2c03dc49c45c8", + "url": "https://api.github.com/repos/symfony/phpunit-bridge/zipball/ad510515b11ba5291fdd59b25d70227bfac2d7ab", + "reference": "ad510515b11ba5291fdd59b25d70227bfac2d7ab", "shasum": "" }, "require": { @@ -25075,7 +25109,7 @@ "description": "Provides utilities for PHPUnit, especially user deprecation notices management", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/phpunit-bridge/tree/v6.4.9" + "source": "https://github.com/symfony/phpunit-bridge/tree/v6.4.10" }, "funding": [ { @@ -25091,7 +25125,7 @@ "type": "tidelift" } ], - "time": "2024-06-21T16:04:15+00:00" + "time": "2024-07-26T12:30:32+00:00" }, { "name": "symfony/polyfill-php73", @@ -25435,6 +25469,7 @@ "drupal/maxlength": 5, "drupal/menu_position": 10, "drupal/node_revision_delete": 5, + "drupal/rabbit_hole": 20, "drupal/selective_better_exposed_filters": 10, "drupal/shortcut_menu": 10, "drupal/spamspan": 10, From 5bfab452fa2aa770d465e54c4a9606b2743bc6aa Mon Sep 17 00:00:00 2001 From: Marc Berger Date: Tue, 30 Jul 2024 16:26:17 -0700 Subject: [PATCH 09/11] fix(SHS-5629): Fix dialog too low on screen issue (clear browser cache to fix) --- composer.json | 3 ++- composer.lock | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 80b6c35e0c..3276299e5c 100644 --- a/composer.json +++ b/composer.json @@ -241,7 +241,8 @@ "views form null fix": "patches/core-views.patch", "CKEditor 5 headings plugin paragraph label change": "patches/ckeditor5-paragraph-rename.patch", "Allow hs group blocks in layout_builder": "patches/layout_builder-allow-hs-blocks.patch", - "Allow media items to be edited in a modal when using the field widget https://www.drupal.org/project/drupal/issues/2985168": "https://www.drupal.org/files/issues/2023-12-18/2985168-172.patch" + "Allow media items to be edited in a modal when using the field widget https://www.drupal.org/project/drupal/issues/2985168": "https://www.drupal.org/files/issues/2023-12-18/2985168-172.patch", + "Cannot read properties of undefined (reading 'settings') with dialog.position.js https://www.drupal.org/project/drupal/issues/3356667": "https://git.drupalcode.org/project/drupal/-/merge_requests/8892.patch" }, "drupal/entity_reference_exposed_filters": { "https://www.drupal.org/project/entity_reference_exposed_filters/issues/3189025": "https://www.drupal.org/files/issues/2023-10-17/entity_reference_exposed_filters-empty_target-3189025-4.patch" diff --git a/composer.lock b/composer.lock index 3bfa194bbc..f18abc980c 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "3eb76080c7b200950000dd08d2c8eb6a", + "content-hash": "551d80cbeff8c0940c6cb5b7c7392f7f", "packages": [ { "name": "acquia/blt", From 3ee7364f612caae98317aac9cd2d38f6ee0948fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20D=C3=ADaz=20Soto?= Date: Fri, 9 Aug 2024 14:16:06 -0600 Subject: [PATCH 10/11] fix(shs-5629): remove unnecesary change --- .../humsci/hs_paragraph_types/hs_paragraph_types.install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docroot/modules/humsci/hs_paragraph_types/hs_paragraph_types.install b/docroot/modules/humsci/hs_paragraph_types/hs_paragraph_types.install index b3b20dfbff..542b57c584 100644 --- a/docroot/modules/humsci/hs_paragraph_types/hs_paragraph_types.install +++ b/docroot/modules/humsci/hs_paragraph_types/hs_paragraph_types.install @@ -5,8 +5,8 @@ * Update functions for hs_paragraph_types module. */ -use Drupal\Core\Config\FileStorage; use Drupal\Core\Site\Settings; +use Drupal\Core\Config\FileStorage; use Drupal\field\Entity\FieldConfig; use Drupal\field\Entity\FieldStorageConfig; use Drupal\filter\Entity\FilterFormat; From 3c414aa6538cfa51717793e3cbbd7c6985fc5d7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20D=C3=ADaz=20Soto?= Date: Fri, 9 Aug 2024 15:16:23 -0600 Subject: [PATCH 11/11] fix(shs-5629): update patch --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 361f19af6e..06b4c9caca 100644 --- a/composer.json +++ b/composer.json @@ -243,7 +243,7 @@ "CKEditor 5 headings plugin paragraph label change": "patches/ckeditor5-paragraph-rename.patch", "Allow hs group blocks in layout_builder": "patches/layout_builder-allow-hs-blocks.patch", "Allow media items to be edited in a modal when using the field widget https://www.drupal.org/project/drupal/issues/2985168": "https://www.drupal.org/files/issues/2023-12-18/2985168-172.patch", - "Cannot read properties of undefined (reading 'settings') with dialog.position.js https://www.drupal.org/project/drupal/issues/3356667": "https://git.drupalcode.org/project/drupal/-/merge_requests/8892.patch" + "Cannot read properties of undefined (reading 'settings') with dialog.position.js https://www.drupal.org/project/drupal/issues/3356667": "https://www.drupal.org/files/issues/2024-08-09/3356667-undefined-settings-dialog-position-51.patch" }, "drupal/entity_reference_exposed_filters": { "https://www.drupal.org/project/entity_reference_exposed_filters/issues/3189025": "https://www.drupal.org/files/issues/2023-10-17/entity_reference_exposed_filters-empty_target-3189025-4.patch"