From ccff5e23d5cba93bc016e09f0bd78a5fcea9a9d0 Mon Sep 17 00:00:00 2001 From: Richard Gaunt Date: Tue, 1 Oct 2024 08:59:15 +1000 Subject: [PATCH 01/17] Revert uikit tag to main branch for dev. --- web/themes/contrib/civictheme/package-lock.json | 4 ++-- web/themes/contrib/civictheme/package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/web/themes/contrib/civictheme/package-lock.json b/web/themes/contrib/civictheme/package-lock.json index 9183389ed..c0dbe543b 100644 --- a/web/themes/contrib/civictheme/package-lock.json +++ b/web/themes/contrib/civictheme/package-lock.json @@ -10,7 +10,7 @@ "hasInstallScript": true, "license": "GPL-2.0-or-later", "dependencies": { - "@civictheme/uikit": "github:civictheme/uikit#v1.8.2" + "@civictheme/uikit": "github:civictheme/uikit#main" }, "devDependencies": { "@alexskrypnyk/scss-variables-extractor": "^0.1.1", @@ -24418,7 +24418,7 @@ }, "@civictheme/uikit": { "version": "git+ssh://git@github.com/civictheme/uikit.git#343d1ff984bebd811d65b6c0ff6ab3637efc8d2a", - "from": "@civictheme/uikit@github:civictheme/uikit#v1.8.2", + "from": "@civictheme/uikit@github:civictheme/uikit#main", "requires": { "@popperjs/core": "^2.11.8", "breakpoint-sass": "^3.0.0", diff --git a/web/themes/contrib/civictheme/package.json b/web/themes/contrib/civictheme/package.json index 9d4137bfa..67e9b9b6e 100644 --- a/web/themes/contrib/civictheme/package.json +++ b/web/themes/contrib/civictheme/package.json @@ -25,7 +25,7 @@ "uikit-install": "rm -Rf lib/uikit > /dev/null 2>&1 && mkdir -p lib/uikit && cp -R node_modules/@civictheme/uikit lib && rm -Rf lib/uikit/dist lib/uikit/storybook-static > /dev/null 2>&1" }, "dependencies": { - "@civictheme/uikit": "github:civictheme/uikit#v1.8.2" + "@civictheme/uikit": "github:civictheme/uikit#main" }, "devDependencies": { "@alexskrypnyk/scss-variables-extractor": "^0.1.1", From 4723b0641549d141d036d650fb38553f7a2a4200 Mon Sep 17 00:00:00 2001 From: Joshua Fernandes <83997348+joshua-salsadigital@users.noreply.github.com> Date: Wed, 2 Oct 2024 16:06:31 +0530 Subject: [PATCH 02/17] Issue #3460512 by joshua1234511, richardgaunt, fionamorrison23, alexskrypnyk, alancole: Add ellipsis to truncated card summary. (#1307) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Joshua Fernandes <“joshua.1234511@yahoo.in”> --- .../civictheme/includes/paragraphs.inc | 21 +++++++++++++++++-- .../contrib/civictheme/includes/utilities.inc | 4 +++- .../civictheme/src/CivicthemeConstants.php | 5 +++++ 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/web/themes/contrib/civictheme/includes/paragraphs.inc b/web/themes/contrib/civictheme/includes/paragraphs.inc index c08f441d8..349f08740 100644 --- a/web/themes/contrib/civictheme/includes/paragraphs.inc +++ b/web/themes/contrib/civictheme/includes/paragraphs.inc @@ -13,6 +13,7 @@ declare(strict_types=1); use Drupal\civictheme\CivicthemeConstants; +use Drupal\Component\Utility\Unicode; /** * Pre-process for With background paragraph field. @@ -210,6 +211,8 @@ function _civictheme_preprocess_paragraph__paragraph_field__links(array &$variab /** * Pre-process for Summary paragraph field. + * + * @SuppressWarnings(PHPMD.StaticAccess) */ function _civictheme_preprocess_paragraph__paragraph_field__summary(array &$variables): void { $summary = civictheme_get_field_value($variables['paragraph'], 'field_c_p_summary', TRUE); @@ -221,12 +224,20 @@ function _civictheme_preprocess_paragraph__paragraph_field__summary(array &$vari $length = civictheme_get_theme_config_manager()->loadForComponent($component_name, 'summary_length', CivicthemeConstants::COMPONENT_SUMMARY_DEFAULT_LENGTH); } - $variables['summary'] = text_summary($summary, NULL, $length); + $summary_trimmed = text_summary($summary); + + if (!_civictheme_feature_is_optedout('process', CivicthemeConstants::OPTOUT_SUMMARY_HIDE_ELLIPSIS)) { + $summary_trimmed = Unicode::truncate($summary_trimmed, $length, TRUE, TRUE); + } + + $variables['summary'] = $summary_trimmed; } } /** * Pre-process for Summary node field. + * + * @SuppressWarnings(PHPMD.StaticAccess) */ function _civictheme_preprocess_paragraph__node_field__summary(array &$variables, string $bundle = NULL): void { $node = $variables['node'] ?? civictheme_get_field_value($variables['paragraph'], 'field_c_p_reference', TRUE); @@ -240,7 +251,13 @@ function _civictheme_preprocess_paragraph__node_field__summary(array &$variables $length = civictheme_get_theme_config_manager()->loadForComponent($component_name, 'summary_length', CivicthemeConstants::COMPONENT_SUMMARY_DEFAULT_LENGTH); } - $variables['summary'] = text_summary($summary, NULL, $length); + $summary_trimmed = text_summary($summary); + + if (!_civictheme_feature_is_optedout('process', CivicthemeConstants::OPTOUT_SUMMARY_HIDE_ELLIPSIS)) { + $summary_trimmed = Unicode::truncate($summary_trimmed, $length, TRUE, TRUE); + } + + $variables['summary'] = $summary_trimmed; } } } diff --git a/web/themes/contrib/civictheme/includes/utilities.inc b/web/themes/contrib/civictheme/includes/utilities.inc index f1b40965f..5e527f70e 100644 --- a/web/themes/contrib/civictheme/includes/utilities.inc +++ b/web/themes/contrib/civictheme/includes/utilities.inc @@ -888,8 +888,10 @@ function _civictheme_feature_is_optedout(string $type, string $name, mixed $cont * Array of opt-out flags. */ function _civictheme_feature_optout_flags(): array { - return [ + $flags = [ 'components.link' => t('Links processing'), 'components.link.email' => t('Email links processing'), ]; + $flags[CivicthemeConstants::OPTOUT_SUMMARY_HIDE_ELLIPSIS] = t('Hide card summary ellipsis'); + return $flags; } diff --git a/web/themes/contrib/civictheme/src/CivicthemeConstants.php b/web/themes/contrib/civictheme/src/CivicthemeConstants.php index 68c1ba28d..72488337e 100644 --- a/web/themes/contrib/civictheme/src/CivicthemeConstants.php +++ b/web/themes/contrib/civictheme/src/CivicthemeConstants.php @@ -186,4 +186,9 @@ final class CivicthemeConstants { */ const OPTOUT_VIEWS_STYLE_TABLE = 'CivicThemeOptoutViewsStyleTable'; + /** + * Defines an optout string for card summary ellipsis. + */ + const OPTOUT_SUMMARY_HIDE_ELLIPSIS = 'CivicThemeOptoutSummaryHideEllipsis'; + } From 132e3191ed095adb3d4ce21b07e580a3e68751c7 Mon Sep 17 00:00:00 2001 From: Joshua Fernandes <83997348+joshua-salsadigital@users.noreply.github.com> Date: Fri, 4 Oct 2024 11:50:37 +0530 Subject: [PATCH 03/17] Added tbachert/spi to allow-plugins. (#1310) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Joshua Fernandes <“joshua.1234511@yahoo.in”> --- web/themes/contrib/civictheme/composer.dev.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/themes/contrib/civictheme/composer.dev.json b/web/themes/contrib/civictheme/composer.dev.json index 84ae2445a..6aeaa88b7 100644 --- a/web/themes/contrib/civictheme/composer.dev.json +++ b/web/themes/contrib/civictheme/composer.dev.json @@ -13,7 +13,8 @@ "config": { "allow-plugins": { "dealerdirect/phpcodesniffer-composer-installer": true, - "phpstan/extension-installer": true + "phpstan/extension-installer": true, + "tbachert/spi": true } }, "extra": { From 202a155d036d32259ddc8efe0be6a700c7d54483 Mon Sep 17 00:00:00 2001 From: Alan Date: Mon, 7 Oct 2024 11:26:42 +1100 Subject: [PATCH 04/17] Issue #3476889 - Fixed useEffect only running on load due to blank deps. (#1309) Co-authored-by: Alex Skrypnyk (AlexSkrypnyk) Joshua Fernandes <83997348+joshua-salsadigital@users.noreply.github.com> --- web/themes/contrib/civictheme/.storybook/preview.js | 2 +- .../civictheme/civictheme_starter_kit/.storybook/preview.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/web/themes/contrib/civictheme/.storybook/preview.js b/web/themes/contrib/civictheme/.storybook/preview.js index 963867a5f..8c3f4a1ea 100644 --- a/web/themes/contrib/civictheme/.storybook/preview.js +++ b/web/themes/contrib/civictheme/.storybook/preview.js @@ -12,7 +12,7 @@ import { decoratorDocs } from '../components/00-base/storybook/storybook.docs.ut // Call attaching of behaviours. addDecorator((storyFn) => { - useEffect(() => Drupal.attachBehaviors(), []); + useEffect(() => Drupal.attachBehaviors()); return storyFn(); }); diff --git a/web/themes/contrib/civictheme/civictheme_starter_kit/.storybook/preview.js b/web/themes/contrib/civictheme/civictheme_starter_kit/.storybook/preview.js index f375d75e8..7537da721 100644 --- a/web/themes/contrib/civictheme/civictheme_starter_kit/.storybook/preview.js +++ b/web/themes/contrib/civictheme/civictheme_starter_kit/.storybook/preview.js @@ -12,7 +12,7 @@ import { decoratorDocs } from '../components_combined/00-base/storybook/storyboo // Call attaching of behaviours. addDecorator((storyFn) => { - useEffect(() => Drupal.attachBehaviors(), []); + useEffect(() => Drupal.attachBehaviors()); return storyFn(); }); From 3060e31bc488acb3147aa9d8b5aa30bd439f0ccf Mon Sep 17 00:00:00 2001 From: Alan Date: Mon, 7 Oct 2024 13:36:35 +1100 Subject: [PATCH 05/17] Issue #3476600: Adding a layout setting for controlling space around the layout. (#1305) Co-authored-by: Richard Gaunt Co-authored-by: richardgaunt <57734756+richardgaunt@users.noreply.github.com> --- web/themes/contrib/civictheme/civictheme.theme | 1 + .../contrib/civictheme/includes/layout.inc | 16 ++++++++++++++++ .../src/Plugin/Layout/ThreeColumnsLayout.php | 14 ++++++++++++++ .../layout/layout--three-columns.html.twig | 3 +-- 4 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 web/themes/contrib/civictheme/includes/layout.inc diff --git a/web/themes/contrib/civictheme/civictheme.theme b/web/themes/contrib/civictheme/civictheme.theme index fef1ef8fa..080911fdb 100644 --- a/web/themes/contrib/civictheme/civictheme.theme +++ b/web/themes/contrib/civictheme/civictheme.theme @@ -27,6 +27,7 @@ require_once __DIR__ . '/includes/iframe.inc'; require_once __DIR__ . '/includes/image.inc'; require_once __DIR__ . '/includes/link.inc'; require_once __DIR__ . '/includes/automated_list.inc'; +require_once __DIR__ . '/includes/layout.inc'; require_once __DIR__ . '/includes/local_tasks.inc'; require_once __DIR__ . '/includes/libraries.inc'; require_once __DIR__ . '/includes/map.inc'; diff --git a/web/themes/contrib/civictheme/includes/layout.inc b/web/themes/contrib/civictheme/includes/layout.inc new file mode 100644 index 000000000..b21a002ec --- /dev/null +++ b/web/themes/contrib/civictheme/includes/layout.inc @@ -0,0 +1,16 @@ + $this->t('Check if the layout elements should be contained. Leave unchecked for edge-to-edge width. If sidebar regions are present - the layout will be contained regardless of this setting.'), ]; + $form['vertical_spacing'] = [ + '#type' => 'select', + '#title' => $this->t('Vertical spacing'), + '#default_value' => $this->configuration['vertical_spacing'], + '#options' => [ + 'none' => $this->t('None'), + 'top' => $this->t('Top'), + 'bottom' => $this->t('Bottom'), + 'both' => $this->t('Both'), + 'auto' => $this->t('Automatic'), + ], + ]; + return parent::buildConfigurationForm($form, $form_state); } @@ -37,6 +50,7 @@ public function buildConfigurationForm(array $form, FormStateInterface $form_sta public function submitConfigurationForm(array &$form, FormStateInterface $form_state) { parent::submitConfigurationForm($form, $form_state); $this->configuration['is_contained'] = $form_state->getValue('is_contained'); + $this->configuration['vertical_spacing'] = $form_state->getValue('vertical_spacing'); } } diff --git a/web/themes/contrib/civictheme/templates/layout/layout--three-columns.html.twig b/web/themes/contrib/civictheme/templates/layout/layout--three-columns.html.twig index 7b5217aba..f6f414016 100644 --- a/web/themes/contrib/civictheme/templates/layout/layout--three-columns.html.twig +++ b/web/themes/contrib/civictheme/templates/layout/layout--three-columns.html.twig @@ -28,10 +28,9 @@ {% set has_sidebar_left = (content.sidebar_top_left is not empty or content.sidebar_bottom_left is not empty) and not hide_sidebar_left|default(false) %} {% set has_sidebar_right = (content.sidebar_top_right is not empty or content.sidebar_bottom_right is not empty) and not hide_sidebar_right|default(false) %} -{% set is_contained = settings.is_contained %} {% set is_contained = is_contained or has_sidebar_left or has_sidebar_right %} -{% set vertical_spacing = has_sidebar_left or has_sidebar_right ? 'top' : vertical_spacing %} +{% set vertical_spacing = vertical_spacing != 'auto' ? vertical_spacing : has_sidebar_left or has_sidebar_right ? 'top' : '' %} {% set no_sidebar_left_class = hide_sidebar_left ? 'ct-layout--no-sidebar-left' : '' %} {% set no_sidebar_right_class = hide_sidebar_right ? 'ct-layout--no-sidebar-right' : '' %} From e618cf33998cace1b2cd0d2844be84025a9bc882 Mon Sep 17 00:00:00 2001 From: Alan Date: Tue, 8 Oct 2024 10:26:02 +1100 Subject: [PATCH 06/17] [CIVIC-1937] Add page level styles into Drupal theme. (#1308) Implements #392 in uikit within drupal --- .../contrib/civictheme/assets/sass/page/_page.scss | 12 ++++++++++++ web/themes/contrib/civictheme/assets/sass/theme.scss | 1 + .../assets/sass/page/_page.scss | 12 ++++++++++++ .../civictheme_starter_kit/assets/sass/theme.scss | 1 + 4 files changed, 26 insertions(+) create mode 100644 web/themes/contrib/civictheme/assets/sass/page/_page.scss create mode 100644 web/themes/contrib/civictheme/civictheme_starter_kit/assets/sass/page/_page.scss diff --git a/web/themes/contrib/civictheme/assets/sass/page/_page.scss b/web/themes/contrib/civictheme/assets/sass/page/_page.scss new file mode 100644 index 000000000..296d12b15 --- /dev/null +++ b/web/themes/contrib/civictheme/assets/sass/page/_page.scss @@ -0,0 +1,12 @@ +// +// Page level configuration. +// + +html { + // stylelint-disable property-no-vendor-prefix + -webkit-text-size-adjust: 100%; +} + +body { + margin: 0; +} diff --git a/web/themes/contrib/civictheme/assets/sass/theme.scss b/web/themes/contrib/civictheme/assets/sass/theme.scss index 99dfc9ecf..b15ff323c 100644 --- a/web/themes/contrib/civictheme/assets/sass/theme.scss +++ b/web/themes/contrib/civictheme/assets/sass/theme.scss @@ -5,4 +5,5 @@ // components. // // These overrides will not be visible in the Storybook. +@import 'page/page'; @import 'header/header'; diff --git a/web/themes/contrib/civictheme/civictheme_starter_kit/assets/sass/page/_page.scss b/web/themes/contrib/civictheme/civictheme_starter_kit/assets/sass/page/_page.scss new file mode 100644 index 000000000..296d12b15 --- /dev/null +++ b/web/themes/contrib/civictheme/civictheme_starter_kit/assets/sass/page/_page.scss @@ -0,0 +1,12 @@ +// +// Page level configuration. +// + +html { + // stylelint-disable property-no-vendor-prefix + -webkit-text-size-adjust: 100%; +} + +body { + margin: 0; +} diff --git a/web/themes/contrib/civictheme/civictheme_starter_kit/assets/sass/theme.scss b/web/themes/contrib/civictheme/civictheme_starter_kit/assets/sass/theme.scss index 200ac2e9e..9165ca22f 100644 --- a/web/themes/contrib/civictheme/civictheme_starter_kit/assets/sass/theme.scss +++ b/web/themes/contrib/civictheme/civictheme_starter_kit/assets/sass/theme.scss @@ -6,4 +6,5 @@ // // These overrides will not be visible in the Storybook. // @todo Refactor webpack config to use direct import from the CivicTheme theme. +@import 'page/page'; @import 'block/local-tasks'; From e4d7c0abeb066886f8105989e4a34d75b9b58df9 Mon Sep 17 00:00:00 2001 From: Richard Gaunt Date: Tue, 8 Oct 2024 19:05:21 +1100 Subject: [PATCH 07/17] Update uikit to #main. --- .../contrib/civictheme/package-lock.json | 90 ++++++++++--------- 1 file changed, 49 insertions(+), 41 deletions(-) diff --git a/web/themes/contrib/civictheme/package-lock.json b/web/themes/contrib/civictheme/package-lock.json index c0dbe543b..5ca7967ca 100644 --- a/web/themes/contrib/civictheme/package-lock.json +++ b/web/themes/contrib/civictheme/package-lock.json @@ -2240,14 +2240,12 @@ } }, "node_modules/@civictheme/uikit": { - "version": "1.8.1", - "resolved": "git+ssh://git@github.com/civictheme/uikit.git#343d1ff984bebd811d65b6c0ff6ab3637efc8d2a", + "version": "1.8.2", + "resolved": "git+ssh://git@github.com/civictheme/uikit.git#d3cd6214c03792dd044368bf258837d575823711", "hasInstallScript": true, "license": "GPL-2.0-or-later", "dependencies": { - "@popperjs/core": "^2.11.8", - "breakpoint-sass": "^3.0.0", - "normalize.css": "^8.0.1" + "@popperjs/core": "^2.11.8" }, "engines": { "node": ">=18.14" @@ -5561,6 +5559,7 @@ "version": "3.1.3", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, "dependencies": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" @@ -6726,6 +6725,7 @@ "version": "2.3.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "dev": true, "engines": { "node": ">=8" }, @@ -6882,6 +6882,7 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, "dependencies": { "fill-range": "^7.1.1" }, @@ -6889,14 +6890,6 @@ "node": ">=8" } }, - "node_modules/breakpoint-sass": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/breakpoint-sass/-/breakpoint-sass-3.0.0.tgz", - "integrity": "sha512-qxJqSfTaOHI+RCGzvKWVRwwC2hMIaS0KV1b+asqWUFxdLv/yKNADF7AtT1uNnkt2VxSMZ2csM22CSc+Hez+EIg==", - "peerDependencies": { - "sass": "^1.25" - } - }, "node_modules/brorand": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", @@ -7460,6 +7453,7 @@ "version": "3.6.0", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dev": true, "dependencies": { "anymatch": "~3.1.2", "braces": "~3.0.2", @@ -11084,6 +11078,7 @@ "version": "7.1.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, "dependencies": { "to-regex-range": "^5.0.1" }, @@ -11615,6 +11610,7 @@ "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, "hasInstallScript": true, "optional": true, "os": [ @@ -11829,6 +11825,7 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, "dependencies": { "is-glob": "^4.0.1" }, @@ -12675,7 +12672,8 @@ "node_modules/immutable": { "version": "4.3.6", "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.6.tgz", - "integrity": "sha512-Ju0+lEMyzMVZarkTn/gqRpdqd5dOPaz1mCZ0SH3JV6iFw81PldE/PEB1hWVEA288HPt4WXW8O7AWxB10M+03QQ==" + "integrity": "sha512-Ju0+lEMyzMVZarkTn/gqRpdqd5dOPaz1mCZ0SH3JV6iFw81PldE/PEB1hWVEA288HPt4WXW8O7AWxB10M+03QQ==", + "dev": true }, "node_modules/import-fresh": { "version": "3.3.0", @@ -13009,6 +13007,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, "dependencies": { "binary-extensions": "^2.0.0" }, @@ -13200,6 +13199,7 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, "engines": { "node": ">=0.10.0" } @@ -13265,6 +13265,7 @@ "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, "dependencies": { "is-extglob": "^2.1.1" }, @@ -13319,6 +13320,7 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, "engines": { "node": ">=0.12.0" } @@ -15233,6 +15235,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, "engines": { "node": ">=0.10.0" } @@ -15246,11 +15249,6 @@ "node": ">=0.10.0" } }, - "node_modules/normalize.css": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/normalize.css/-/normalize.css-8.0.1.tgz", - "integrity": "sha512-qizSNPO93t1YUuUhP22btGOo3chcvDFqFaj2TRybP0DMxkHOCTYwp3n34fel4a31ORXy4m1Xq0Gyqpb5m33qIg==" - }, "node_modules/npm-run-path": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", @@ -16192,6 +16190,7 @@ "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, "engines": { "node": ">=8.6" }, @@ -17290,6 +17289,7 @@ "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, "dependencies": { "picomatch": "^2.2.1" }, @@ -18279,6 +18279,7 @@ "version": "1.77.6", "resolved": "https://registry.npmjs.org/sass/-/sass-1.77.6.tgz", "integrity": "sha512-ByXE1oLD79GVq9Ht1PeHWCPMPB8XHpBuz1r85oByKHjZY6qV6rWnQovQzXJXuQ/XyE1Oj3iPk3lo28uzaRA2/Q==", + "dev": true, "dependencies": { "chokidar": ">=3.0.0 <4.0.0", "immutable": "^4.0.0", @@ -18866,6 +18867,7 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", + "dev": true, "engines": { "node": ">=0.10.0" } @@ -20692,6 +20694,7 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, "dependencies": { "is-number": "^7.0.0" }, @@ -24417,12 +24420,10 @@ } }, "@civictheme/uikit": { - "version": "git+ssh://git@github.com/civictheme/uikit.git#343d1ff984bebd811d65b6c0ff6ab3637efc8d2a", + "version": "git+ssh://git@github.com/civictheme/uikit.git#d3cd6214c03792dd044368bf258837d575823711", "from": "@civictheme/uikit@github:civictheme/uikit#main", "requires": { - "@popperjs/core": "^2.11.8", - "breakpoint-sass": "^3.0.0", - "normalize.css": "^8.0.1" + "@popperjs/core": "^2.11.8" } }, "@cnakazawa/watch": { @@ -26934,6 +26935,7 @@ "version": "3.1.3", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, "requires": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" @@ -27854,7 +27856,8 @@ "binary-extensions": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", - "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==" + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "dev": true }, "bindings": { "version": "1.5.0", @@ -27984,16 +27987,11 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, "requires": { "fill-range": "^7.1.1" } }, - "breakpoint-sass": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/breakpoint-sass/-/breakpoint-sass-3.0.0.tgz", - "integrity": "sha512-qxJqSfTaOHI+RCGzvKWVRwwC2hMIaS0KV1b+asqWUFxdLv/yKNADF7AtT1uNnkt2VxSMZ2csM22CSc+Hez+EIg==", - "requires": {} - }, "brorand": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", @@ -28444,6 +28442,7 @@ "version": "3.6.0", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dev": true, "requires": { "anymatch": "~3.1.2", "braces": "~3.0.2", @@ -31317,6 +31316,7 @@ "version": "7.1.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, "requires": { "to-regex-range": "^5.0.1" } @@ -31760,6 +31760,7 @@ "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, "optional": true }, "function-bind": { @@ -31910,6 +31911,7 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, "requires": { "is-glob": "^4.0.1" } @@ -32538,7 +32540,8 @@ "immutable": { "version": "4.3.6", "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.6.tgz", - "integrity": "sha512-Ju0+lEMyzMVZarkTn/gqRpdqd5dOPaz1mCZ0SH3JV6iFw81PldE/PEB1hWVEA288HPt4WXW8O7AWxB10M+03QQ==" + "integrity": "sha512-Ju0+lEMyzMVZarkTn/gqRpdqd5dOPaz1mCZ0SH3JV6iFw81PldE/PEB1hWVEA288HPt4WXW8O7AWxB10M+03QQ==", + "dev": true }, "import-fresh": { "version": "3.3.0", @@ -32786,6 +32789,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, "requires": { "binary-extensions": "^2.0.0" } @@ -32901,7 +32905,8 @@ "is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==" + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true }, "is-finalizationregistry": { "version": "1.0.2", @@ -32946,6 +32951,7 @@ "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, "requires": { "is-extglob": "^2.1.1" } @@ -32980,7 +32986,8 @@ "is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true }, "is-number-object": { "version": "1.0.7", @@ -34489,7 +34496,8 @@ "normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true }, "normalize-range": { "version": "0.1.2", @@ -34497,11 +34505,6 @@ "integrity": "sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==", "dev": true }, - "normalize.css": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/normalize.css/-/normalize.css-8.0.1.tgz", - "integrity": "sha512-qizSNPO93t1YUuUhP22btGOo3chcvDFqFaj2TRybP0DMxkHOCTYwp3n34fel4a31ORXy4m1Xq0Gyqpb5m33qIg==" - }, "npm-run-path": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", @@ -35225,7 +35228,8 @@ "picomatch": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==" + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true }, "pify": { "version": "4.0.1", @@ -36073,6 +36077,7 @@ "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, "requires": { "picomatch": "^2.2.1" } @@ -36835,6 +36840,7 @@ "version": "1.77.6", "resolved": "https://registry.npmjs.org/sass/-/sass-1.77.6.tgz", "integrity": "sha512-ByXE1oLD79GVq9Ht1PeHWCPMPB8XHpBuz1r85oByKHjZY6qV6rWnQovQzXJXuQ/XyE1Oj3iPk3lo28uzaRA2/Q==", + "dev": true, "requires": { "chokidar": ">=3.0.0 <4.0.0", "immutable": "^4.0.0", @@ -37303,7 +37309,8 @@ "source-map-js": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", - "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==" + "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", + "dev": true }, "source-map-resolve": { "version": "0.5.3", @@ -38729,6 +38736,7 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, "requires": { "is-number": "^7.0.0" } From 4c4afb9a1c1dcbb59712e4deac0f68b8f9370f38 Mon Sep 17 00:00:00 2001 From: Joshua Fernandes <83997348+joshua-salsadigital@users.noreply.github.com> Date: Tue, 22 Oct 2024 17:04:32 +0530 Subject: [PATCH 08/17] Issue #3415664 by sime, joshua1234511, richardgaunt, alexskrypnyk, fionamorrison23: Contextual links are broken (#1311) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Joshua Fernandes <“joshua.1234511@yahoo.in”> Co-authored-by: richardgaunt <57734756+richardgaunt@users.noreply.github.com> Co-authored-by: Richard Gaunt --- .../sass/layout_builder/_layout_builder.scss | 13 --------- .../contrib/civictheme/includes/layout.inc | 7 +++++ .../civictheme/templates/misc/links.html.twig | 28 +++++++++++++++++++ 3 files changed, 35 insertions(+), 13 deletions(-) create mode 100644 web/themes/contrib/civictheme/templates/misc/links.html.twig diff --git a/web/themes/contrib/civictheme/assets/sass/layout_builder/_layout_builder.scss b/web/themes/contrib/civictheme/assets/sass/layout_builder/_layout_builder.scss index a685b51a9..3f86977a3 100644 --- a/web/themes/contrib/civictheme/assets/sass/layout_builder/_layout_builder.scss +++ b/web/themes/contrib/civictheme/assets/sass/layout_builder/_layout_builder.scss @@ -34,19 +34,6 @@ cursor: move; background-color: #fff; position: relative; - - div.contextual { - display: contents; - - ul { - border: 1px solid; - - li { - list-style: none; - display: list-item; - } - } - } } .block.block-layout-builder [tabindex='-1'] { diff --git a/web/themes/contrib/civictheme/includes/layout.inc b/web/themes/contrib/civictheme/includes/layout.inc index b21a002ec..aff8ff344 100644 --- a/web/themes/contrib/civictheme/includes/layout.inc +++ b/web/themes/contrib/civictheme/includes/layout.inc @@ -14,3 +14,10 @@ function civictheme_preprocess_layout__three_columns(array &$variables): void { $variables['is_contained'] = $variables['settings']['is_contained'] ?? FALSE; $variables['vertical_spacing'] = $variables['settings']['vertical_spacing'] ?? 'auto'; } + +/** + * Implements hook_preprocess_HOOK(). + */ +function civictheme_preprocess_block__layout_builder(array &$variables): void { + $variables['modifier_class'] = FALSE; +} diff --git a/web/themes/contrib/civictheme/templates/misc/links.html.twig b/web/themes/contrib/civictheme/templates/misc/links.html.twig new file mode 100644 index 000000000..0e14cb1b2 --- /dev/null +++ b/web/themes/contrib/civictheme/templates/misc/links.html.twig @@ -0,0 +1,28 @@ +{# +/** + * @file + * CivicTheme templete override implementation for a set of links. + */ +#} +{% if links -%} + {%- if heading -%} + {%- if heading.level -%} + <{{ heading.level }}{{ heading.attributes }}>{{ heading.text }} + {%- else -%} + {{ heading.text }} + {%- endif -%} + {%- endif -%} + + {%- for item in links -%} + + {%- if item.link -%} + {{ item.link }} + {%- elseif item.text_attributes -%} + {{ item.text }} + {%- else -%} + {{ item.text }} + {%- endif -%} + + {%- endfor -%} + +{%- endif %} From 7f08556f9624dc9c4960cb3a81f665176b9a2618 Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Tue, 22 Oct 2024 23:05:00 +1100 Subject: [PATCH 09/17] Fixed multiple checkboxes mistakenly marked as required if a Field is marked as required. (#1312) Co-authored-by: richardgaunt <57734756+richardgaunt@users.noreply.github.com> --- web/themes/contrib/civictheme/includes/form_element.inc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/web/themes/contrib/civictheme/includes/form_element.inc b/web/themes/contrib/civictheme/includes/form_element.inc index 159e9ef2d..e39cf88fb 100644 --- a/web/themes/contrib/civictheme/includes/form_element.inc +++ b/web/themes/contrib/civictheme/includes/form_element.inc @@ -191,6 +191,8 @@ function civictheme_preprocess_fieldset__form_element__civictheme_field__checkbo 'id' => Html::cleanCssIdentifier($element['#id'] . '-' . $value), 'is_checked' => is_array($element['#default_value']) ? in_array($value, $element['#default_value']) : $element['#default_value'] == $value, 'is_disabled' => isset($element['#attributes']['disabled']), + // Checkboxes controls with a group cannot be required by definition. + 'is_required' => FALSE, 'attributes' => $attributes, 'modifier_class' => $modifier_class, ]; From b86df8b8299f96bb6fcd223764f108cf8b9890d6 Mon Sep 17 00:00:00 2001 From: Richard Gaunt Date: Thu, 7 Nov 2024 10:28:56 +1100 Subject: [PATCH 10/17] Remove example username, password to pass security scanning checks. --- web/themes/contrib/civictheme/phpunit.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/web/themes/contrib/civictheme/phpunit.xml b/web/themes/contrib/civictheme/phpunit.xml index 02e8e4445..4b75bced0 100644 --- a/web/themes/contrib/civictheme/phpunit.xml +++ b/web/themes/contrib/civictheme/phpunit.xml @@ -22,7 +22,6 @@ - - + circle\.yml diff --git a/phpstan.neon b/phpstan.neon index 3f71bce93..05e9d203c 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -72,6 +72,3 @@ parameters: message: '#Parameter \#1 \$callback of function call_user_func expects callable.*#' paths: - web/modules/custom/cs_generated_content/src/CsGeneratedContentCivicthemeTrait.php - - # Skip deprecation until upgrade to 10.3. - # @see https://www.drupal.org/node/3426517 - message: '#Fetching deprecated class constant EXISTS_REPLACE#' diff --git a/tests/behat/bootstrap/FeatureContext.php b/tests/behat/bootstrap/FeatureContext.php index e74877da0..596756bdf 100644 --- a/tests/behat/bootstrap/FeatureContext.php +++ b/tests/behat/bootstrap/FeatureContext.php @@ -21,7 +21,6 @@ use DrevOps\BehatSteps\LinkTrait; use DrevOps\BehatSteps\MediaTrait; use DrevOps\BehatSteps\MenuTrait; -use DrevOps\BehatSteps\OverrideTrait; use DrevOps\BehatSteps\ParagraphsTrait; use DrevOps\BehatSteps\PathTrait; use DrevOps\BehatSteps\SelectTrait; @@ -54,7 +53,6 @@ class FeatureContext extends DrupalContext { use LinkTrait; use MediaTrait; use MenuTrait; - use OverrideTrait; use PathTrait; use ParagraphsTrait; use SelectTrait; @@ -253,7 +251,7 @@ public function iScrollToElementWithId(string $id): void { * * @todo Remove with next behat-steps release. */ - public function linkAssertTextHrefNotExists(string $text, string $href, string $locator = NULL): void { + public function linkAssertTextHrefNotExists(string $text, string $href, ?string $locator = NULL): void { /** @var \Behat\Mink\Element\DocumentElement $page */ $page = $this->getSession()->getPage(); @@ -357,7 +355,7 @@ public function setThemeAsDefault(string $name): void { * * @SuppressWarnings(PHPMD.StaticAccess) */ - public function themeVisitSettings(string $name = NULL): void { + public function themeVisitSettings(?string $name = NULL): void { if (!$name || $name === 'current') { $name = \Drupal::theme()->getActiveTheme()->getName(); } diff --git a/tests/behat/features/content_type.civictheme_alert.access.feature b/tests/behat/features/content_type.civictheme_alert.access.feature index 0c63e2f5a..8d60db931 100644 --- a/tests/behat/features/content_type.civictheme_alert.access.feature +++ b/tests/behat/features/content_type.civictheme_alert.access.feature @@ -28,8 +28,26 @@ Feature: CivicTheme Alert content type access Examples: | role | view | view_unpublished | add | edit | delete | - | anonymous user | 200 | 403 | 403 | 403 | 403 | | authenticated user | 200 | 403 | 403 | 403 | 403 | | civictheme_content_author | 200 | 200 | 200 | 200 | 200 | | civictheme_content_approver | 200 | 200 | 403 | 403 | 403 | | civictheme_site_administrator | 200 | 200 | 200 | 200 | 200 | + + @api + Scenario: CivicTheme alert content type access anonymous user + Given I am an anonymous user + When I go to "node/add/civictheme_alert" + Then the response status code should be 403 + + When I visit civictheme_alert "[TEST] Test Published CivicTheme Alert 1" + Then I should get a 200 HTTP response + + When I visit civictheme_alert "[TEST] Test Unpublished CivicTheme Alert 1" + Then I should get a 403 HTTP response + + When I edit civictheme_alert "[TEST] Test Published CivicTheme Alert 1" + Then the response status code should be 403 + + When I delete civictheme_alert "[TEST] Test Published CivicTheme Alert 1" + And I should get a 403 HTTP response + diff --git a/tests/behat/features/content_type.civictheme_event.access.feature b/tests/behat/features/content_type.civictheme_event.access.feature index 63c5e875a..f4e10ffd3 100644 --- a/tests/behat/features/content_type.civictheme_event.access.feature +++ b/tests/behat/features/content_type.civictheme_event.access.feature @@ -28,8 +28,27 @@ Feature: CivicTheme Event content type access Examples: | role | view | view_unpublished | add | edit | delete | - | anonymous user | 200 | 403 | 403 | 403 | 403 | | authenticated user | 200 | 403 | 403 | 403 | 403 | | civictheme_content_author | 200 | 200 | 200 | 200 | 200 | | civictheme_content_approver | 200 | 200 | 403 | 403 | 403 | | civictheme_site_administrator | 200 | 200 | 200 | 200 | 200 | + + @api + Scenario: CivicTheme event content type access anonymous user + Given I am an anonymous user + When I go to "node/add/civictheme_event" + Then the response status code should be 403 + + When I visit civictheme_event "[TEST] Test Published CivicTheme Event 1" + Then I should get a 200 HTTP response + + When I visit civictheme_event "[TEST] Test Unpublished CivicTheme Event 1" + Then I should get a 403 HTTP response + + When I edit civictheme_event "[TEST] Test Published CivicTheme Event 1" + Then the response status code should be 403 + + When I delete civictheme_event "[TEST] Test Published CivicTheme Event 1" + And I should get a 403 HTTP response + + diff --git a/tests/behat/features/content_type.civictheme_page.access.feature b/tests/behat/features/content_type.civictheme_page.access.feature index 3b10d73df..415230588 100644 --- a/tests/behat/features/content_type.civictheme_page.access.feature +++ b/tests/behat/features/content_type.civictheme_page.access.feature @@ -28,8 +28,25 @@ Feature: CivicTheme Page content type access Examples: | role | view | view_unpublished | add | edit | delete | - | anonymous user | 200 | 403 | 403 | 403 | 403 | | authenticated user | 200 | 403 | 403 | 403 | 403 | | civictheme_content_author | 200 | 200 | 200 | 200 | 200 | | civictheme_content_approver | 200 | 200 | 403 | 403 | 403 | | civictheme_site_administrator | 200 | 200 | 200 | 200 | 200 | + + @api + Scenario: CivicTheme page content type access anonymous user + Given I am an anonymous user + When I go to "node/add/civictheme_page" + Then the response status code should be 403 + + When I visit civictheme_page "[TEST] Test Published CivicTheme Page 1" + Then I should get a 200 HTTP response + + When I visit civictheme_page "[TEST] Test Unpublished CivicTheme Page 1" + Then I should get a 403 HTTP response + + When I edit civictheme_page "[TEST] Test Published CivicTheme Page 1" + Then the response status code should be 403 + + When I delete civictheme_page "[TEST] Test Published CivicTheme Page 1" + And I should get a 403 HTTP response diff --git a/tests/phpunit/CircleCiConfigTest.php b/tests/phpunit/CircleCiConfigTest.php index 6afd2ed9b..9a8f11e54 100644 --- a/tests/phpunit/CircleCiConfigTest.php +++ b/tests/phpunit/CircleCiConfigTest.php @@ -2,8 +2,8 @@ declare(strict_types=1); -use Drupal\Core\Serialization\Yaml; use PHPUnit\Framework\TestCase; +use Symfony\Component\Yaml\Yaml; /** * Class CircleCiConfigTest. @@ -35,7 +35,7 @@ protected function setUp(): void { if (!$file) { throw new \RuntimeException('Unable to read CircleCI config file.'); } - $this->config = Yaml::decode($file); + $this->config = Yaml::parse($file); } /** diff --git a/tests/phpunit/ScriptUnitTestBase.php b/tests/phpunit/ScriptUnitTestBase.php index 24373e0ad..1bb585bfe 100644 --- a/tests/phpunit/ScriptUnitTestBase.php +++ b/tests/phpunit/ScriptUnitTestBase.php @@ -104,7 +104,7 @@ protected function fixtureFile(string $filename): string { /** * Path to a temporary file. */ - protected function toTmpPath(string $filename, string $prefix = NULL): string { + protected function toTmpPath(string $filename, ?string $prefix = NULL): string { return $prefix ? $this->tmpDir . DIRECTORY_SEPARATOR . $prefix . DIRECTORY_SEPARATOR . $filename : $this->tmpDir . DIRECTORY_SEPARATOR . $filename; } @@ -122,7 +122,7 @@ protected function printTempDir(): void { /** * Create a random unique temporary directory. */ - protected function tempdir(string $dir = NULL, string $prefix = 'tmp_', int $mode = 0700, int $max_attempts = 1000): string { + protected function tempdir(?string $dir = NULL, string $prefix = 'tmp_', int $mode = 0700, int $max_attempts = 1000): string { if (is_null($dir)) { $dir = sys_get_temp_dir(); } @@ -180,7 +180,7 @@ protected function arrayReplaceValue(array $array, callable|array $cb): array { * - key: (string) Source path (the key from $file_structure). * - value: (string) Path to a fixture file to use. */ - protected function createTmpFilesFromFixtures(array $fixture_map, string $prefix = NULL): array { + protected function createTmpFilesFromFixtures(array $fixture_map, ?string $prefix = NULL): array { $files = []; foreach ($fixture_map as $path => $fixture_file) { $tmp_path = $this->toTmpPath($path, $prefix); @@ -229,7 +229,7 @@ protected function createTmpFilesFromFixtures(array $fixture_map, string $prefix * * @SuppressWarnings(PHPMD.ElseExpression) */ - protected function replaceFixturePaths(array $fixture_map, string $prefix = NULL): array { + protected function replaceFixturePaths(array $fixture_map, ?string $prefix = NULL): array { foreach ($fixture_map as $k => $v) { if (is_array($v)) { $fixture_map[$k] = $this->replaceFixturePaths($v, $prefix); diff --git a/web/modules/custom/civictheme_content/civictheme_content.install b/web/modules/custom/civictheme_content/civictheme_content.install index 703427514..e4aae1d1f 100644 --- a/web/modules/custom/civictheme_content/civictheme_content.install +++ b/web/modules/custom/civictheme_content/civictheme_content.install @@ -19,9 +19,9 @@ declare(strict_types=1); +use Drupal\Core\Installer\Exception\InstallerException; use Drupal\civictheme\CivicthemeConfigImporter; use Drupal\civictheme_content\Helper; -use Drupal\Core\Installer\Exception\InstallerException; /** * Implements hook_install(). diff --git a/web/modules/custom/civictheme_content/modules/civictheme_content_corporate/civictheme_content_corporate.post_update.php b/web/modules/custom/civictheme_content/modules/civictheme_content_corporate/civictheme_content_corporate.post_update.php index 96d4ee42d..6f7ad4f05 100644 --- a/web/modules/custom/civictheme_content/modules/civictheme_content_corporate/civictheme_content_corporate.post_update.php +++ b/web/modules/custom/civictheme_content/modules/civictheme_content_corporate/civictheme_content_corporate.post_update.php @@ -7,8 +7,8 @@ declare(strict_types=1); -use Drupal\civictheme_content\Helper; use Drupal\Core\Utility\UpdateException; +use Drupal\civictheme_content\Helper; /** * Common updates. diff --git a/web/modules/custom/civictheme_content/modules/civictheme_content_default/civictheme_content_default.post_update.php b/web/modules/custom/civictheme_content/modules/civictheme_content_default/civictheme_content_default.post_update.php index b2c19088d..5ee4d8b4c 100644 --- a/web/modules/custom/civictheme_content/modules/civictheme_content_default/civictheme_content_default.post_update.php +++ b/web/modules/custom/civictheme_content/modules/civictheme_content_default/civictheme_content_default.post_update.php @@ -7,8 +7,8 @@ declare(strict_types=1); -use Drupal\civictheme_content\Helper; use Drupal\Core\Utility\UpdateException; +use Drupal\civictheme_content\Helper; /** * Common updates. diff --git a/web/modules/custom/civictheme_content/modules/civictheme_content_government/civictheme_content_government.post_update.php b/web/modules/custom/civictheme_content/modules/civictheme_content_government/civictheme_content_government.post_update.php index 262253b56..0170e614e 100644 --- a/web/modules/custom/civictheme_content/modules/civictheme_content_government/civictheme_content_government.post_update.php +++ b/web/modules/custom/civictheme_content/modules/civictheme_content_government/civictheme_content_government.post_update.php @@ -7,8 +7,8 @@ declare(strict_types=1); -use Drupal\civictheme_content\Helper; use Drupal\Core\Utility\UpdateException; +use Drupal\civictheme_content\Helper; /** * Common updates. diff --git a/web/modules/custom/civictheme_content/modules/civictheme_content_highereducation/civictheme_content_highereducation.post_update.php b/web/modules/custom/civictheme_content/modules/civictheme_content_highereducation/civictheme_content_highereducation.post_update.php index e6b30836e..ee9665040 100644 --- a/web/modules/custom/civictheme_content/modules/civictheme_content_highereducation/civictheme_content_highereducation.post_update.php +++ b/web/modules/custom/civictheme_content/modules/civictheme_content_highereducation/civictheme_content_highereducation.post_update.php @@ -7,8 +7,8 @@ declare(strict_types=1); -use Drupal\civictheme_content\Helper; use Drupal\Core\Utility\UpdateException; +use Drupal\civictheme_content\Helper; /** * Common updates. diff --git a/web/modules/custom/civictheme_content/src/Helper.php b/web/modules/custom/civictheme_content/src/Helper.php index e64a4f369..ef6b313b1 100644 --- a/web/modules/custom/civictheme_content/src/Helper.php +++ b/web/modules/custom/civictheme_content/src/Helper.php @@ -57,7 +57,7 @@ public static function log(string|\Stringable $message): void { * * @SuppressWarnings(PHPMD.StaticAccess) */ - public static function loadNodeByTitle(string $title, string $type = NULL): ?Node { + public static function loadNodeByTitle(string $title, ?string $type = NULL): ?Node { $query = \Drupal::entityQuery('node')->accessCheck(FALSE); $query->condition('title', $title); if ($type) { diff --git a/web/modules/custom/civictheme_dev/civictheme_dev.module b/web/modules/custom/civictheme_dev/civictheme_dev.module index 1bda0f600..e7575d996 100644 --- a/web/modules/custom/civictheme_dev/civictheme_dev.module +++ b/web/modules/custom/civictheme_dev/civictheme_dev.module @@ -7,9 +7,9 @@ declare(strict_types=1); +use Drupal\Core\Site\Settings; use Drupal\civictheme\CivicthemeConstants; use Drupal\civictheme\CivicthemeVersionManager; -use Drupal\Core\Site\Settings; use Drupal\views\ViewExecutable; require_once __DIR__ . '/styleguide.inc'; diff --git a/web/modules/custom/civictheme_dev/civictheme_dev.post_update.php b/web/modules/custom/civictheme_dev/civictheme_dev.post_update.php index e2cdc255a..814e33ce5 100644 --- a/web/modules/custom/civictheme_dev/civictheme_dev.post_update.php +++ b/web/modules/custom/civictheme_dev/civictheme_dev.post_update.php @@ -7,8 +7,8 @@ declare(strict_types=1); -use Drupal\block\Entity\Block; use Drupal\Core\Utility\UpdateException; +use Drupal\block\Entity\Block; use Drupal\redirect\Entity\Redirect; use Drupal\user\Entity\User; diff --git a/web/modules/custom/civictheme_dev/src/EventSubscriber/CivicthemeDevConfigDevelSubscriber.php b/web/modules/custom/civictheme_dev/src/EventSubscriber/CivicthemeDevConfigDevelSubscriber.php index e748cf16e..fc1d8af8e 100644 --- a/web/modules/custom/civictheme_dev/src/EventSubscriber/CivicthemeDevConfigDevelSubscriber.php +++ b/web/modules/custom/civictheme_dev/src/EventSubscriber/CivicthemeDevConfigDevelSubscriber.php @@ -4,12 +4,12 @@ namespace Drupal\civictheme_dev\EventSubscriber; +use Drupal\Core\Config\ConfigFactoryInterface; +use Drupal\Core\Config\ConfigManagerInterface; use Drupal\config_devel\Event\ConfigDevelEvents; use Drupal\config_devel\Event\ConfigDevelSaveEvent; use Drupal\config_devel\EventSubscriber\ConfigDevelSubscriberBase; use Drupal\config_filter\Plugin\ConfigFilterPluginManager; -use Drupal\Core\Config\ConfigFactoryInterface; -use Drupal\Core\Config\ConfigManagerInterface; use Symfony\Component\EventDispatcher\EventSubscriberInterface; /** diff --git a/web/modules/custom/civictheme_dev/src/Form/CoreFormElementsForm.php b/web/modules/custom/civictheme_dev/src/Form/CoreFormElementsForm.php index 5415b3c67..055b9bd54 100644 --- a/web/modules/custom/civictheme_dev/src/Form/CoreFormElementsForm.php +++ b/web/modules/custom/civictheme_dev/src/Form/CoreFormElementsForm.php @@ -9,7 +9,7 @@ use Drupal\Core\Extension\ThemeHandlerInterface; use Drupal\Core\Form\FormBase; use Drupal\Core\Form\FormStateInterface; -use Drupal\Core\Render\Element\FormElement; +use Drupal\Core\Render\Element\FormElementBase; use Drupal\Core\Render\ElementInfoManager; use Drupal\Core\Url; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -85,7 +85,7 @@ public function buildForm(array $form, FormStateInterface $form_state): array { continue; } $element = $plugin_manager->createInstance($form_element_id); - if (!$element instanceof FormElement) { + if (!$element instanceof FormElementBase) { continue; } $form[$group_id][$form_element_id] = $this->createFormElement($form_element_id, $element); @@ -116,7 +116,7 @@ public function buildForm(array $form, FormStateInterface $form_state): array { * * @param string $id * Element id. - * @param \Drupal\Core\Render\Element\FormElement $element + * @param \Drupal\Core\Render\Element\FormElementBase $element * Actual element. * * @return array @@ -124,7 +124,7 @@ public function buildForm(array $form, FormStateInterface $form_state): array { * * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ - protected function createFormElement(string $id, FormElement $element): array { + protected function createFormElement(string $id, FormElementBase $element): array { $form_element = [ '#type' => $id, '#title' => ucwords(str_replace('_', ' ', $id)) . ' (' . $id . ')', @@ -184,7 +184,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) { * * @param array $form_element * Form element. - * @param \Drupal\Core\Render\Element\FormElement $element + * @param \Drupal\Core\Render\Element\FormElementBase $element * Form element. * * @return array @@ -192,7 +192,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) { * * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - protected function createEntityAutoCompleteFormElement(array $form_element, FormElement $element): array { + protected function createEntityAutoCompleteFormElement(array $form_element, FormElementBase $element): array { $form_element['#type'] = 'entity_autocomplete'; $form_element['#target_type'] = 'node'; $form_element['#selection_settings'] = [ @@ -207,7 +207,7 @@ protected function createEntityAutoCompleteFormElement(array $form_element, Form * * @param array $form_element * Form element. - * @param \Drupal\Core\Render\Element\FormElement $element + * @param \Drupal\Core\Render\Element\FormElementBase $element * Form element. * * @return array @@ -215,7 +215,7 @@ protected function createEntityAutoCompleteFormElement(array $form_element, Form * * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - protected function createOptionsFormElement(array $form_element, FormElement $element): array { + protected function createOptionsFormElement(array $form_element, FormElementBase $element): array { $form_element['#options'] = [ 'option1' => 'Option 1', 'option2' => 'Option 2', @@ -230,7 +230,7 @@ protected function createOptionsFormElement(array $form_element, FormElement $el * * @param array $form_element * Form element. - * @param \Drupal\Core\Render\Element\FormElement $element + * @param \Drupal\Core\Render\Element\FormElementBase $element * Form element. * * @return array @@ -238,7 +238,7 @@ protected function createOptionsFormElement(array $form_element, FormElement $el * * @SuppressWarnings(PHPMD.ElseExpression) */ - protected function createTableFormElement(array $form_element, FormElement $element): array { + protected function createTableFormElement(array $form_element, FormElementBase $element): array { $form_element['#header'] = ['Header 1', 'Header 2', 'Header 3']; if ($element->getPluginId() === 'tableselect') { $form_element['#options'] = [ @@ -265,7 +265,7 @@ protected function createTableFormElement(array $form_element, FormElement $elem * * @param array $form_element * Form element. - * @param \Drupal\Core\Render\Element\FormElement $element + * @param \Drupal\Core\Render\Element\FormElementBase $element * Form element. * * @return array @@ -273,7 +273,7 @@ protected function createTableFormElement(array $form_element, FormElement $elem * * @phpstan-ignore-next-line */ - protected function createImageButton(array $form_element, FormElement $element): array { + protected function createImageButton(array $form_element, FormElementBase $element): array { $theme_path = $this->themeHandler->getTheme('civictheme')->getPath(); $icon_path = '/' . $theme_path . '/assets/icons/download.svg'; $form_element['#src'] = $icon_path; @@ -286,7 +286,7 @@ protected function createImageButton(array $form_element, FormElement $element): * * @param array $form_element * Form element. - * @param \Drupal\Core\Render\Element\FormElement $element + * @param \Drupal\Core\Render\Element\FormElementBase $element * Form element. * * @return array @@ -295,7 +295,7 @@ protected function createImageButton(array $form_element, FormElement $element): * @phpstan-ignore-next-line * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - protected function createButton(array $form_element, FormElement $element): array { + protected function createButton(array $form_element, FormElementBase $element): array { $form_element['#value'] = $form_element['#title']; return [ diff --git a/web/modules/custom/cs_generated_content/src/CsGeneratedContentCivicthemeTrait.php b/web/modules/custom/cs_generated_content/src/CsGeneratedContentCivicthemeTrait.php index c13bb3fc7..b685ce061 100644 --- a/web/modules/custom/cs_generated_content/src/CsGeneratedContentCivicthemeTrait.php +++ b/web/modules/custom/cs_generated_content/src/CsGeneratedContentCivicthemeTrait.php @@ -215,7 +215,7 @@ public static function civicthemeSizeLarge(): string { * @return array * Array of topics. */ - public static function civicthemeStaticTopics(int $count = NULL): array { + public static function civicthemeStaticTopics(?int $count = NULL): array { return static::staticTerms('civictheme_topics', $count); } @@ -257,7 +257,7 @@ public static function civicThemeExposeMultipleFilters(): array { * @return array * Array of site sections. */ - public static function civicthemeStaticSiteSections(int $count = NULL): array { + public static function civicthemeStaticSiteSections(?int $count = NULL): array { return static::staticTerms('civictheme_site_sections', $count); } diff --git a/web/modules/custom/cs_generated_content/src/CsGeneratedContentHelper.php b/web/modules/custom/cs_generated_content/src/CsGeneratedContentHelper.php index 758d1d5a8..d98fd2ba5 100644 --- a/web/modules/custom/cs_generated_content/src/CsGeneratedContentHelper.php +++ b/web/modules/custom/cs_generated_content/src/CsGeneratedContentHelper.php @@ -39,7 +39,7 @@ public static function randomRealWebform(): ?EntityInterface { * @return string * URL with a path. */ - public static function staticUrl(string $domain = NULL): string { + public static function staticUrl(?string $domain = NULL): string { $parts = []; $parts[] = 'https://'; $parts[] = $domain ? rtrim($domain, '/') : 'www.example.com'; diff --git a/web/sites/default/default.services.yml b/web/sites/default/default.services.yml index c4b964fc2..dacb3f7e9 100644 --- a/web/sites/default/default.services.yml +++ b/web/sites/default/default.services.yml @@ -1,4 +1,8 @@ parameters: + # Toggles the super user access policy. If your website has at least one user + # with the Administrator role, it is advised to set this to false. This allows + # you to make user 1 a regular user, strengthening the security of your site. + security.enable_super_user: true session.storage.options: # Default ini options for sessions. # @@ -60,6 +64,11 @@ parameters: # \Drupal\Core\Session\SessionConfiguration::__construct() # @default 6 sid_bits_per_character: 6 + # By default, Drupal generates a session cookie name based on the full + # domain name. Set the name_suffix to a short random string to ensure this + # session cookie name is unique on different installations on the same + # domain and path (for example, when migrating from Drupal 7). + name_suffix: '' twig.config: # Twig debugging: # diff --git a/web/sites/default/default.settings.php b/web/sites/default/default.settings.php index 8819d6431..264597b16 100644 --- a/web/sites/default/default.settings.php +++ b/web/sites/default/default.settings.php @@ -77,7 +77,7 @@ * * @code * $databases['default']['default'] = [ - * 'database' => 'databasename', + * 'database' => 'database_name', * 'username' => 'sql_username', * 'password' => 'sql_password', * 'host' => 'localhost', @@ -193,7 +193,7 @@ * @code * $databases['default']['default'] = [ * 'driver' => 'pgsql', - * 'database' => 'databasename', + * 'database' => 'database_name', * 'username' => 'sql_username', * 'password' => 'sql_password', * 'host' => 'localhost', @@ -215,7 +215,7 @@ * 'driver' => 'my_driver', * 'namespace' => 'Drupal\my_module\Driver\Database\my_driver', * 'autoload' => 'modules/my_module/src/Driver/Database/my_driver/', - * 'database' => 'databasename', + * 'database' => 'database_name', * 'username' => 'sql_username', * 'password' => 'sql_password', * 'host' => 'localhost', @@ -230,7 +230,7 @@ * 'driver' => 'my_driver', * 'namespace' => 'Drupal\my_module\Driver\Database\my_driver', * 'autoload' => 'modules/my_module/src/Driver/Database/my_driver/', - * 'database' => 'databasename', + * 'database' => 'database_name', * 'username' => 'sql_username', * 'password' => 'sql_password', * 'host' => 'localhost', @@ -355,14 +355,13 @@ * security, or encryption benefits. In an environment where Drupal * is behind a reverse proxy, the real IP address of the client should * be determined such that the correct client IP address is available - * to Drupal's logging, statistics, and access management systems. In - * the most simple scenario, the proxy server will add an - * X-Forwarded-For header to the request that contains the client IP - * address. However, HTTP headers are vulnerable to spoofing, where a - * malicious client could bypass restrictions by setting the - * X-Forwarded-For header directly. Therefore, Drupal's proxy - * configuration requires the IP addresses of all remote proxies to be - * specified in $settings['reverse_proxy_addresses'] to work correctly. + * to Drupal's logging and access management systems. In the most simple + * scenario, the proxy server will add an X-Forwarded-For header to the request + * that contains the client IP address. However, HTTP headers are vulnerable to + * spoofing, where a malicious client could bypass restrictions by setting the + * X-Forwarded-For header directly. Therefore, Drupal's proxy configuration + * requires the IP addresses of all remote proxies to be specified in + * $settings['reverse_proxy_addresses'] to work correctly. * * Enable this setting to get Drupal to determine the client IP from the * X-Forwarded-For header. If you are unsure about this setting, do not have a @@ -808,6 +807,16 @@ */ $settings['entity_update_backup'] = TRUE; +/** + * State caching. + * + * State caching uses the cache collector pattern to cache all requested keys + * from the state API in a single cache entry, which can greatly reduce the + * amount of database queries. However, some sites may use state with a + * lot of dynamic keys which could result in a very large cache. + */ +$settings['state_cache'] = TRUE; + /** * Node migration type. * diff --git a/web/themes/contrib/civictheme/civictheme.layouts.yml b/web/themes/contrib/civictheme/civictheme.layouts.yml index 0d01a6a9a..3578b396f 100644 --- a/web/themes/contrib/civictheme/civictheme.layouts.yml +++ b/web/themes/contrib/civictheme/civictheme.layouts.yml @@ -5,7 +5,7 @@ civictheme_three_columns: library: civictheme/layouts category: 'CivicTheme Layouts' class: '\Drupal\civictheme\Plugin\Layout\ThreeColumnsLayout' - default_region: content + default_region: main icon_map: - [first_above, main, second_above] - [first_below, main, second_below] diff --git a/web/themes/contrib/civictheme/civictheme.post_update.php b/web/themes/contrib/civictheme/civictheme.post_update.php index da6d6b285..81ee2040d 100644 --- a/web/themes/contrib/civictheme/civictheme.post_update.php +++ b/web/themes/contrib/civictheme/civictheme.post_update.php @@ -290,7 +290,7 @@ function civictheme_post_update_rename_event_date_field(array &$sandbox): ?strin 'field_c_n_date_range' => [ 'type' => 'daterange_default', 'weight' => 13, - 'region' => 'content', + 'region' => 'main', 'settings' => [], 'third_party_settings' => [], ], diff --git a/web/themes/contrib/civictheme/civictheme_starter_kit/composer.json b/web/themes/contrib/civictheme/civictheme_starter_kit/composer.json index dd7632d74..9327d1e59 100644 --- a/web/themes/contrib/civictheme/civictheme_starter_kit/composer.json +++ b/web/themes/contrib/civictheme/civictheme_starter_kit/composer.json @@ -4,6 +4,6 @@ "type": "drupal-theme", "license": "proprietary", "require": { - "php": ">=8.2" + "php": ">=8.3" } } diff --git a/web/themes/contrib/civictheme/config/install/core.entity_view_display.node.civictheme_alert.default.yml b/web/themes/contrib/civictheme/config/install/core.entity_view_display.node.civictheme_alert.default.yml index f6a953dd4..ec383aaab 100644 --- a/web/themes/contrib/civictheme/config/install/core.entity_view_display.node.civictheme_alert.default.yml +++ b/web/themes/contrib/civictheme/config/install/core.entity_view_display.node.civictheme_alert.default.yml @@ -45,6 +45,7 @@ content: timezone_override: '' format_type: medium separator: '-' + from_to: both third_party_settings: { } weight: 2 region: content diff --git a/web/themes/contrib/civictheme/config/install/core.entity_view_display.node.civictheme_event.default.yml b/web/themes/contrib/civictheme/config/install/core.entity_view_display.node.civictheme_event.default.yml index 389759f9a..315b5fe67 100644 --- a/web/themes/contrib/civictheme/config/install/core.entity_view_display.node.civictheme_event.default.yml +++ b/web/themes/contrib/civictheme/config/install/core.entity_view_display.node.civictheme_event.default.yml @@ -109,6 +109,25 @@ third_party_settings: third_party_settings: { } weight: 3 additional: { } + 634c10b6-05e3-46e7-98af-534e416fa822: + uuid: 634c10b6-05e3-46e7-98af-534e416fa822 + region: content + configuration: + label_display: '0' + context_mapping: + entity: layout_builder.entity + id: 'field_block:node:civictheme_event:field_c_n_date_range' + formatter: + type: daterange_default + label: above + settings: + timezone_override: '' + format_type: medium + separator: '-' + from_to: both + third_party_settings: { } + weight: 0 + additional: { } third_party_settings: { } layout_builder_restrictions: allowed_block_categories: { } @@ -141,6 +160,7 @@ content: timezone_override: '' format_type: medium separator: '-' + from_to: both third_party_settings: { } weight: 0 region: content diff --git a/web/themes/contrib/civictheme/config/install/core.entity_view_display.paragraph.civictheme_event_card.default.yml b/web/themes/contrib/civictheme/config/install/core.entity_view_display.paragraph.civictheme_event_card.default.yml index 5f963b9d7..380268cc6 100644 --- a/web/themes/contrib/civictheme/config/install/core.entity_view_display.paragraph.civictheme_event_card.default.yml +++ b/web/themes/contrib/civictheme/config/install/core.entity_view_display.paragraph.civictheme_event_card.default.yml @@ -27,6 +27,7 @@ content: timezone_override: '' format_type: medium separator: '-' + from_to: both third_party_settings: { } weight: 9 region: content diff --git a/web/themes/contrib/civictheme/config/install/editor.editor.civictheme_rich_text.yml b/web/themes/contrib/civictheme/config/install/editor.editor.civictheme_rich_text.yml index 4f59051d0..d78af9afd 100644 --- a/web/themes/contrib/civictheme/config/install/editor.editor.civictheme_rich_text.yml +++ b/web/themes/contrib/civictheme/config/install/editor.editor.civictheme_rich_text.yml @@ -107,9 +107,3 @@ settings: allow_view_mode_override: false image_upload: status: false - scheme: public - directory: inline-images - max_size: '' - max_dimensions: - width: null - height: null diff --git a/web/themes/contrib/civictheme/config/install/node.type.civictheme_alert.yml b/web/themes/contrib/civictheme/config/install/node.type.civictheme_alert.yml index 040935c4d..f6588cb82 100644 --- a/web/themes/contrib/civictheme/config/install/node.type.civictheme_alert.yml +++ b/web/themes/contrib/civictheme/config/install/node.type.civictheme_alert.yml @@ -10,7 +10,7 @@ third_party_settings: name: Alert type: civictheme_alert description: 'CivicTheme. Use alerts to provide information for site users using a status bar.' -help: '' +help: null new_revision: true preview_mode: 1 display_submitted: false diff --git a/web/themes/contrib/civictheme/config/install/node.type.civictheme_event.yml b/web/themes/contrib/civictheme/config/install/node.type.civictheme_event.yml index 0798d0c1b..83ac09281 100644 --- a/web/themes/contrib/civictheme/config/install/node.type.civictheme_event.yml +++ b/web/themes/contrib/civictheme/config/install/node.type.civictheme_event.yml @@ -11,7 +11,7 @@ third_party_settings: name: Event type: civictheme_event description: 'CivicTheme. Use Event pages to describe event information.' -help: '' +help: null new_revision: true preview_mode: 1 display_submitted: false diff --git a/web/themes/contrib/civictheme/config/install/node.type.civictheme_page.yml b/web/themes/contrib/civictheme/config/install/node.type.civictheme_page.yml index fd4b4ced4..be10fb301 100644 --- a/web/themes/contrib/civictheme/config/install/node.type.civictheme_page.yml +++ b/web/themes/contrib/civictheme/config/install/node.type.civictheme_page.yml @@ -11,7 +11,7 @@ third_party_settings: name: Page type: civictheme_page description: "CivicTheme. Use pages for your static content such as an 'About us' page or other informational pages that will always be accessible on the site. These can be simple content pages or pages with a complex layout." -help: '' +help: null new_revision: true preview_mode: 1 display_submitted: false diff --git a/web/themes/contrib/civictheme/config/install/taxonomy.vocabulary.civictheme_media_tags.yml b/web/themes/contrib/civictheme/config/install/taxonomy.vocabulary.civictheme_media_tags.yml index 9aad8c22b..7fe346bd4 100644 --- a/web/themes/contrib/civictheme/config/install/taxonomy.vocabulary.civictheme_media_tags.yml +++ b/web/themes/contrib/civictheme/config/install/taxonomy.vocabulary.civictheme_media_tags.yml @@ -3,5 +3,6 @@ status: true dependencies: { } name: 'Media tags' vid: civictheme_media_tags -description: '' +description: null weight: 0 +new_revision: false diff --git a/web/themes/contrib/civictheme/config/install/taxonomy.vocabulary.civictheme_site_sections.yml b/web/themes/contrib/civictheme/config/install/taxonomy.vocabulary.civictheme_site_sections.yml index a046e8682..8a7ca1140 100644 --- a/web/themes/contrib/civictheme/config/install/taxonomy.vocabulary.civictheme_site_sections.yml +++ b/web/themes/contrib/civictheme/config/install/taxonomy.vocabulary.civictheme_site_sections.yml @@ -5,3 +5,4 @@ name: 'Site sections' vid: civictheme_site_sections description: 'Site sections used to group content.' weight: 0 +new_revision: false diff --git a/web/themes/contrib/civictheme/config/install/taxonomy.vocabulary.civictheme_topics.yml b/web/themes/contrib/civictheme/config/install/taxonomy.vocabulary.civictheme_topics.yml index 4b06156d5..bf715d3d3 100644 --- a/web/themes/contrib/civictheme/config/install/taxonomy.vocabulary.civictheme_topics.yml +++ b/web/themes/contrib/civictheme/config/install/taxonomy.vocabulary.civictheme_topics.yml @@ -3,5 +3,6 @@ status: true dependencies: { } name: Topics vid: civictheme_topics -description: '' +description: null weight: 0 +new_revision: false diff --git a/web/themes/contrib/civictheme/config/install/views.view.civictheme_alerts.yml b/web/themes/contrib/civictheme/config/install/views.view.civictheme_alerts.yml index 26ef8e44d..d12775402 100644 --- a/web/themes/contrib/civictheme/config/install/views.view.civictheme_alerts.yml +++ b/web/themes/contrib/civictheme/config/install/views.view.civictheme_alerts.yml @@ -220,6 +220,7 @@ display: items_per_page_options_all_label: '- All -' offset: false offset_label: Offset + pagination_heading_level: h4 exposed_form: type: basic options: diff --git a/web/themes/contrib/civictheme/config/install/views.view.civictheme_automated_list.yml b/web/themes/contrib/civictheme/config/install/views.view.civictheme_automated_list.yml index b2bb5169d..475e24e42 100644 --- a/web/themes/contrib/civictheme/config/install/views.view.civictheme_automated_list.yml +++ b/web/themes/contrib/civictheme/config/install/views.view.civictheme_automated_list.yml @@ -92,6 +92,7 @@ display: offset: false offset_label: Offset quantity: 5 + pagination_heading_level: h4 exposed_form: type: basic options: diff --git a/web/themes/contrib/civictheme/config/install/views.view.civictheme_media.yml b/web/themes/contrib/civictheme/config/install/views.view.civictheme_media.yml index 60c22e5ec..8d81c3d27 100644 --- a/web/themes/contrib/civictheme/config/install/views.view.civictheme_media.yml +++ b/web/themes/contrib/civictheme/config/install/views.view.civictheme_media.yml @@ -521,6 +521,7 @@ display: type: full options: offset: 0 + pagination_heading_level: h4 items_per_page: 50 total_pages: null id: 0 diff --git a/web/themes/contrib/civictheme/config/install/views.view.civictheme_moderated_content.yml b/web/themes/contrib/civictheme/config/install/views.view.civictheme_moderated_content.yml index 9e889d205..90ca4a2e4 100644 --- a/web/themes/contrib/civictheme/config/install/views.view.civictheme_moderated_content.yml +++ b/web/themes/contrib/civictheme/config/install/views.view.civictheme_moderated_content.yml @@ -432,6 +432,7 @@ display: offset: false offset_label: Offset quantity: 9 + pagination_heading_level: h4 exposed_form: type: basic options: diff --git a/web/themes/contrib/civictheme/config/optional/views.view.civictheme_search.yml b/web/themes/contrib/civictheme/config/optional/views.view.civictheme_search.yml index 0626d936c..bb2a43e0c 100644 --- a/web/themes/contrib/civictheme/config/optional/views.view.civictheme_search.yml +++ b/web/themes/contrib/civictheme/config/optional/views.view.civictheme_search.yml @@ -93,6 +93,7 @@ display: offset: false offset_label: Offset quantity: 9 + pagination_heading_level: h4 exposed_form: type: basic options: @@ -107,7 +108,7 @@ display: type: none options: { } cache: - type: none + type: search_api_none options: { } empty: result: diff --git a/web/themes/contrib/civictheme/phpcs.xml b/web/themes/contrib/civictheme/phpcs.xml index dd15cdb18..6832ccb10 100644 --- a/web/themes/contrib/civictheme/phpcs.xml +++ b/web/themes/contrib/civictheme/phpcs.xml @@ -16,7 +16,7 @@ - + circle\.yml diff --git a/web/themes/contrib/civictheme/phpstan.neon b/web/themes/contrib/civictheme/phpstan.neon index 570fd3a71..f7bd05891 100644 --- a/web/themes/contrib/civictheme/phpstan.neon +++ b/web/themes/contrib/civictheme/phpstan.neon @@ -40,6 +40,3 @@ parameters: reportUnmatched: false - # Allow using Drupal::service() in Drush commands. message: '#\Drupal calls should be avoided in classes, use dependency injection instead#' - - # Skip deprecation until upgrade to 10.3. - # @see https://www.drupal.org/node/3426517 - message: '#Fetching deprecated class constant EXISTS_REPLACE#' diff --git a/web/themes/contrib/civictheme/src/CivicthemeStylesheetGenerator.php b/web/themes/contrib/civictheme/src/CivicthemeStylesheetGenerator.php index 63b3c97e4..4a672dbf8 100644 --- a/web/themes/contrib/civictheme/src/CivicthemeStylesheetGenerator.php +++ b/web/themes/contrib/civictheme/src/CivicthemeStylesheetGenerator.php @@ -5,6 +5,7 @@ namespace Drupal\civictheme; use Drupal\Core\DependencyInjection\ContainerInjectionInterface; +use Drupal\Core\File\FileExists; use Drupal\Core\File\FileSystemInterface; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -171,7 +172,7 @@ protected function generateStylesheet(array $variables, array $parent_selectors protected function saveStylesheet($data): ?string { $filepath = $this->getStylesheetUri(); try { - $this->fileSystem->saveData($data, $filepath, FileSystemInterface::EXISTS_REPLACE); + $this->fileSystem->saveData($data, $filepath, FileExists::Replace); $this->fileSystem->chmod($filepath); } catch (\Exception) { diff --git a/web/themes/contrib/civictheme/src/Settings/CivicthemeSettingsFormSectionBase.php b/web/themes/contrib/civictheme/src/Settings/CivicthemeSettingsFormSectionBase.php index b2cae7afd..cb50ccea1 100644 --- a/web/themes/contrib/civictheme/src/Settings/CivicthemeSettingsFormSectionBase.php +++ b/web/themes/contrib/civictheme/src/Settings/CivicthemeSettingsFormSectionBase.php @@ -9,6 +9,7 @@ use Drupal\Core\Config\ConfigManager; use Drupal\Core\DependencyInjection\ContainerInjectionInterface; use Drupal\Core\Extension\ThemeExtensionList; +use Drupal\Core\File\FileExists; use Drupal\Core\File\FileSystemInterface; use Drupal\Core\File\FileUrlGenerator; use Drupal\Core\Form\FormStateInterface; @@ -143,7 +144,7 @@ protected function validateFileUpload(array &$form, FormStateInterface $form_sta $upload_element = NestedArray::getValue($form, $upload_field_name_key); if ($upload_element) { - $file = _file_save_upload_from_form($upload_element, $form_state, 0, FileSystemInterface::EXISTS_REPLACE); + $file = _file_save_upload_from_form($upload_element, $form_state, 0, FileExists::Replace); if ($file) { $form_state->setValue($upload_field_name_key, $file); // Do not validate the path as it will be re-written in the submit diff --git a/web/themes/contrib/civictheme/theme-settings.provision.inc b/web/themes/contrib/civictheme/theme-settings.provision.inc index e684d3376..ec79edd48 100644 --- a/web/themes/contrib/civictheme/theme-settings.provision.inc +++ b/web/themes/contrib/civictheme/theme-settings.provision.inc @@ -21,7 +21,7 @@ use Drupal\civictheme\CivicthemeConfigImporter; use Drupal\civictheme\CivicthemeConfigManager; use Drupal\civictheme\CivicthemeConstants; use Drupal\Core\Config\FileStorage; -use Drupal\Core\File\FileSystemInterface; +use Drupal\Core\File\FileExists; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Url; use Drupal\media\Entity\Media; @@ -572,7 +572,7 @@ function civictheme_provision__files(): void { $default_file_scheme = \Drupal::config('system.file')->get('default_scheme') . '://'; foreach ($filepaths as $filepath) { if (file_exists($filepath)) { - $file_repository->writeData((string) file_get_contents($filepath), $default_file_scheme . basename($filepath), FileSystemInterface::EXISTS_REPLACE); + $file_repository->writeData((string) file_get_contents($filepath), $default_file_scheme . basename($filepath), FileExists::Replace); continue; } From 0bcef79932ce85b3ea8f20c4d863291c7f69f73c Mon Sep 17 00:00:00 2001 From: Richard Gaunt Date: Mon, 2 Dec 2024 15:48:12 +1100 Subject: [PATCH 14/17] Bump civictheme-uikit version. --- web/themes/contrib/civictheme/package-lock.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/themes/contrib/civictheme/package-lock.json b/web/themes/contrib/civictheme/package-lock.json index 5ca7967ca..6cfec33af 100644 --- a/web/themes/contrib/civictheme/package-lock.json +++ b/web/themes/contrib/civictheme/package-lock.json @@ -2241,7 +2241,7 @@ }, "node_modules/@civictheme/uikit": { "version": "1.8.2", - "resolved": "git+ssh://git@github.com/civictheme/uikit.git#d3cd6214c03792dd044368bf258837d575823711", + "resolved": "git+ssh://git@github.com/civictheme/uikit.git#f64bac1bfbec9e4117a0e480b71a298d7f922ddd", "hasInstallScript": true, "license": "GPL-2.0-or-later", "dependencies": { @@ -24420,7 +24420,7 @@ } }, "@civictheme/uikit": { - "version": "git+ssh://git@github.com/civictheme/uikit.git#d3cd6214c03792dd044368bf258837d575823711", + "version": "git+ssh://git@github.com/civictheme/uikit.git#f64bac1bfbec9e4117a0e480b71a298d7f922ddd", "from": "@civictheme/uikit@github:civictheme/uikit#main", "requires": { "@popperjs/core": "^2.11.8" From ffe8615a9ca4092dff84533fd45c606b9a4d5442 Mon Sep 17 00:00:00 2001 From: Richard Gaunt Date: Mon, 2 Dec 2024 22:01:58 +1100 Subject: [PATCH 15/17] Remove lint rule. --- web/themes/contrib/civictheme/.stylelintrc.json | 1 + 1 file changed, 1 insertion(+) diff --git a/web/themes/contrib/civictheme/.stylelintrc.json b/web/themes/contrib/civictheme/.stylelintrc.json index 646df9cd8..07cf6d321 100644 --- a/web/themes/contrib/civictheme/.stylelintrc.json +++ b/web/themes/contrib/civictheme/.stylelintrc.json @@ -33,6 +33,7 @@ "declaration-block-no-redundant-longhand-properties": null, "max-line-length": null, "no-descending-specificity": null, + "no-duplicate-selectors": null, "scss/at-mixin-argumentless-call-parentheses": "always", "scss/at-mixin-pattern": "^_?ct-[a-z0-9\\-]+$", "scss/at-else-closing-brace-newline-after": null, From b68cc2f1b3dee31f402d5b397de8b8e6a685b4be Mon Sep 17 00:00:00 2001 From: Richard Gaunt Date: Tue, 3 Dec 2024 08:40:43 +1100 Subject: [PATCH 16/17] Update checkboxes test for change in uikit. --- .../styleguide.field.checkboxes.feature | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/behat/features/styleguide.field.checkboxes.feature b/tests/behat/features/styleguide.field.checkboxes.feature index ddf37f17d..2b8f647c4 100644 --- a/tests/behat/features/styleguide.field.checkboxes.feature +++ b/tests/behat/features/styleguide.field.checkboxes.feature @@ -19,7 +19,7 @@ Feature: Field, Checkboxes And I should see a ".ct-field.js-form-item-test-checkboxes-1 input[id='edit-test-checkboxes-1-option-3']" element And I should see a ".ct-field.js-form-item-test-checkboxes-1 input[id='edit-test-checkboxes-1-option-4']" element And I should see a ".ct-field.js-form-item-test-checkboxes-1 input[id='edit-test-checkboxes-1-option-5']" element - And I should not see a ".ct-field.js-form-item-test-checkboxes-1 input[required]" element + And I should not see a ".ct-field.js-form-item-test-checkboxes-1.ct-field--required input" element And I should not see a ".ct-field.js-form-item-test-checkboxes-1 input[disabled]" element # Validate: Checkboxes, Title visible, default value, no description, no error, required, with attributes @@ -49,8 +49,8 @@ Feature: Field, Checkboxes And I should see a ".ct-field.js-form-item-test-checkboxes-2 input[id='edit-test-checkboxes-2-option-5']" element And I should see a ".ct-field.js-form-item-test-checkboxes-2 input[id='edit-test-checkboxes-2-option-5'][data-test='test-attribute-value']" element And I should see a ".ct-field.js-form-item-test-checkboxes-2 input[id='edit-test-checkboxes-2-option-5'].test-class" element - And I should see a ".ct-field.js-form-item-test-checkboxes-2 input[required]" element - And I should not see a ".ct-field.js-form-item-test-checkboxes-2 input[disabled]" element + And I should see a ".ct-field.js-form-item-test-checkboxes-2.ct-field--required input" element + And I should not see a ".ct-field.js-form-item-test-checkboxes-2.ct-field--disabled input[disabled]" element # Validate: Checkboxes, Title visually hidden, default value, description, no error And I should see an ".ct-field.js-form-item-test-checkboxes-3" element @@ -64,8 +64,8 @@ Feature: Field, Checkboxes And I should see a ".ct-field.js-form-item-test-checkboxes-3 input[id='edit-test-checkboxes-3-option-3']" element And I should see a ".ct-field.js-form-item-test-checkboxes-3 input[id='edit-test-checkboxes-3-option-4']" element And I should see a ".ct-field.js-form-item-test-checkboxes-3 input[id='edit-test-checkboxes-3-option-5']" element - And I should not see a ".ct-field.js-form-item-test-checkboxes-3 input[required]" element - And I should not see a ".ct-field.js-form-item-test-checkboxes-3 input[disabled]" element + And I should not see a ".ct-field.js-form-item-test-checkboxes-3.ct-field--required input" element + And I should not see a ".ct-field.js-form-item-test-checkboxes-3.ct-field--disabled input[disabled]" element # Validate: Checkboxes, Title hidden, no default value, description, required, error And I should see an ".ct-field.js-form-item-test-checkboxes-4" element @@ -78,8 +78,8 @@ Feature: Field, Checkboxes And I should see a ".ct-field.js-form-item-test-checkboxes-4 input[id='edit-test-checkboxes-4-option-3']" element And I should see a ".ct-field.js-form-item-test-checkboxes-4 input[id='edit-test-checkboxes-4-option-4']" element And I should see a ".ct-field.js-form-item-test-checkboxes-4 input[id='edit-test-checkboxes-4-option-5']" element - And I should see a ".ct-field.js-form-item-test-checkboxes-4 input[required]" element - And I should not see a ".ct-field.js-form-item-test-checkboxes-4 input[disabled]" element + And I should see a ".ct-field.js-form-item-test-checkboxes-4.ct-field--required input" element + And I should not see a ".ct-field.js-form-item-test-checkboxes-4.ct-field--disabled input[disabled]" element And I should see a ".ct-field.js-form-item-test-checkboxes-4 .ct-field-message:contains('This is an error message')" element # Validate: Checkboxes, Title visible, default value, no description, disabled @@ -94,5 +94,5 @@ Feature: Field, Checkboxes And I should see a ".ct-field.js-form-item-test-checkboxes-5 input[id='edit-test-checkboxes-5-option-3']" element And I should see a ".ct-field.js-form-item-test-checkboxes-5 input[id='edit-test-checkboxes-5-option-4']" element And I should see a ".ct-field.js-form-item-test-checkboxes-5 input[id='edit-test-checkboxes-5-option-5']" element - And I should not see a ".ct-field.js-form-item-test-checkboxes-5 input[required]" element - And I should see a ".ct-field.js-form-item-test-checkboxes-5 input[disabled]" element + And I should not see a ".ct-field.js-form-item-test-checkboxes-5.ct-field--required input" element + And I should see a ".ct-field.js-form-item-test-checkboxes-5.ct-field--disabled input[disabled]" element From 48deff52066fd0875f39576dc4ddab0e22b93df9 Mon Sep 17 00:00:00 2001 From: Richard Gaunt Date: Wed, 4 Dec 2024 09:17:47 +1100 Subject: [PATCH 17/17] Updated tag of uikit for release. --- web/themes/contrib/civictheme/package-lock.json | 10 +++++----- web/themes/contrib/civictheme/package.json | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/web/themes/contrib/civictheme/package-lock.json b/web/themes/contrib/civictheme/package-lock.json index 6cfec33af..adb3da93f 100644 --- a/web/themes/contrib/civictheme/package-lock.json +++ b/web/themes/contrib/civictheme/package-lock.json @@ -10,7 +10,7 @@ "hasInstallScript": true, "license": "GPL-2.0-or-later", "dependencies": { - "@civictheme/uikit": "github:civictheme/uikit#main" + "@civictheme/uikit": "github:civictheme/uikit#v1.9.0" }, "devDependencies": { "@alexskrypnyk/scss-variables-extractor": "^0.1.1", @@ -2240,8 +2240,8 @@ } }, "node_modules/@civictheme/uikit": { - "version": "1.8.2", - "resolved": "git+ssh://git@github.com/civictheme/uikit.git#f64bac1bfbec9e4117a0e480b71a298d7f922ddd", + "version": "1.9.0", + "resolved": "git+ssh://git@github.com/civictheme/uikit.git#2217e3fdf1c9c53e4ea21067eea9e7bae01c6805", "hasInstallScript": true, "license": "GPL-2.0-or-later", "dependencies": { @@ -24420,8 +24420,8 @@ } }, "@civictheme/uikit": { - "version": "git+ssh://git@github.com/civictheme/uikit.git#f64bac1bfbec9e4117a0e480b71a298d7f922ddd", - "from": "@civictheme/uikit@github:civictheme/uikit#main", + "version": "git+ssh://git@github.com/civictheme/uikit.git#2217e3fdf1c9c53e4ea21067eea9e7bae01c6805", + "from": "@civictheme/uikit@github:civictheme/uikit#v1.9.0", "requires": { "@popperjs/core": "^2.11.8" } diff --git a/web/themes/contrib/civictheme/package.json b/web/themes/contrib/civictheme/package.json index 67e9b9b6e..42dab0c34 100644 --- a/web/themes/contrib/civictheme/package.json +++ b/web/themes/contrib/civictheme/package.json @@ -25,7 +25,7 @@ "uikit-install": "rm -Rf lib/uikit > /dev/null 2>&1 && mkdir -p lib/uikit && cp -R node_modules/@civictheme/uikit lib && rm -Rf lib/uikit/dist lib/uikit/storybook-static > /dev/null 2>&1" }, "dependencies": { - "@civictheme/uikit": "github:civictheme/uikit#main" + "@civictheme/uikit": "github:civictheme/uikit#v1.9.0" }, "devDependencies": { "@alexskrypnyk/scss-variables-extractor": "^0.1.1",