From 2255d4890a39986def8c53e956dd0707f4dd92e8 Mon Sep 17 00:00:00 2001 From: 22Alexandra Date: Fri, 23 Aug 2024 12:00:10 +0300 Subject: [PATCH 1/3] EWPP-4689: Update to ECL 4.6.1. --- package.json | 100 +++++++++--------- ...+twig-component-content-block+4.6.1.patch} | 0 ...h => @ecl+twig-component-file+4.6.1.patch} | 0 ...h => @ecl+twig-component-tabs+4.6.1.patch} | 0 sass/components/_global.scss | 2 +- 5 files changed, 51 insertions(+), 51 deletions(-) rename patches/{@ecl+twig-component-content-block+4.6.0.patch => @ecl+twig-component-content-block+4.6.1.patch} (100%) rename patches/{@ecl+twig-component-file+4.6.0.patch => @ecl+twig-component-file+4.6.1.patch} (100%) rename patches/{@ecl+twig-component-tabs+4.6.0.patch => @ecl+twig-component-tabs+4.6.1.patch} (100%) diff --git a/package.json b/package.json index 1e4e591e9..435ff7d95 100644 --- a/package.json +++ b/package.json @@ -14,57 +14,57 @@ "prepare": "patch-package" }, "dependencies": { - "@ecl/builder": "4.6.0", - "@ecl/preset-ec": "4.6.0", - "@ecl/preset-eu": "4.6.0", - "@ecl/preset-reset": "4.6.0", + "@ecl/builder": "4.6.1", + "@ecl/preset-ec": "4.6.1", + "@ecl/preset-eu": "4.6.1", + "@ecl/preset-reset": "4.6.1", "@ecl/stylelint-config": "0.2.1", - "@ecl/theme-ec": "4.6.0", - "@ecl/theme-eu": "4.6.0", - "@ecl/twig-component-accordion": "4.6.0", - "@ecl/twig-component-banner": "4.6.0", - "@ecl/twig-component-blockquote": "4.6.0", - "@ecl/twig-component-breadcrumb": "4.6.0", - "@ecl/twig-component-button": "4.6.0", - "@ecl/twig-component-card": "4.6.0", - "@ecl/twig-component-carousel": "4.6.0", - "@ecl/twig-component-content-item": "4.6.0", - "@ecl/twig-component-datepicker": "4.6.0", - "@ecl/twig-component-description-list": "4.6.0", - "@ecl/twig-component-expandable": "4.6.0", - "@ecl/twig-component-fact-figures": "4.6.0", - "@ecl/twig-component-featured-item": "4.6.0", - "@ecl/twig-component-file": "4.6.0", - "@ecl/twig-component-gallery": "4.6.0", - "@ecl/twig-component-icon": "4.6.0", - "@ecl/twig-component-inpage-navigation": "4.6.0", - "@ecl/twig-component-label": "4.6.0", - "@ecl/twig-component-link": "4.6.0", - "@ecl/twig-component-list-illustration": "4.6.0", - "@ecl/twig-component-media-container": "4.6.0", - "@ecl/twig-component-mega-menu": "4.6.0", - "@ecl/twig-component-menu": "4.6.0", - "@ecl/twig-component-navigation-list": "4.6.0", - "@ecl/twig-component-news-ticker": "4.6.0", - "@ecl/twig-component-notification": "4.6.0", - "@ecl/twig-component-page-header": "4.6.0", - "@ecl/twig-component-pagination": "4.6.0", - "@ecl/twig-component-radio": "4.6.0", - "@ecl/twig-component-search-form": "4.6.0", - "@ecl/twig-component-select": "4.6.0", - "@ecl/twig-component-site-footer": "4.6.0", - "@ecl/twig-component-site-header": "4.6.0", - "@ecl/twig-component-skip-link": "4.6.0", - "@ecl/twig-component-social-media-follow": "4.6.0", - "@ecl/twig-component-social-media-share": "4.6.0", - "@ecl/twig-component-splash-page": "4.6.0", - "@ecl/twig-component-table": "4.6.0", - "@ecl/twig-component-tabs": "4.6.0", - "@ecl/twig-component-tag": "4.6.0", - "@ecl/twig-component-text-input": "4.6.0", - "@ecl/twig-component-timeline": "4.6.0", - "@ecl/vanilla-utility-background": "4.6.0", - "@ecl/vanilla-utility-border": "4.6.0", + "@ecl/theme-ec": "4.6.1", + "@ecl/theme-eu": "4.6.1", + "@ecl/twig-component-accordion": "4.6.1", + "@ecl/twig-component-banner": "4.6.1", + "@ecl/twig-component-blockquote": "4.6.1", + "@ecl/twig-component-breadcrumb": "4.6.1", + "@ecl/twig-component-button": "4.6.1", + "@ecl/twig-component-card": "4.6.1", + "@ecl/twig-component-carousel": "4.6.1", + "@ecl/twig-component-content-item": "4.6.1", + "@ecl/twig-component-datepicker": "4.6.1", + "@ecl/twig-component-description-list": "4.6.1", + "@ecl/twig-component-expandable": "4.6.1", + "@ecl/twig-component-fact-figures": "4.6.1", + "@ecl/twig-component-featured-item": "4.6.1", + "@ecl/twig-component-file": "4.6.1", + "@ecl/twig-component-gallery": "4.6.1", + "@ecl/twig-component-icon": "4.6.1", + "@ecl/twig-component-inpage-navigation": "4.6.1", + "@ecl/twig-component-label": "4.6.1", + "@ecl/twig-component-link": "4.6.1", + "@ecl/twig-component-list-illustration": "4.6.1", + "@ecl/twig-component-media-container": "4.6.1", + "@ecl/twig-component-mega-menu": "4.6.1", + "@ecl/twig-component-menu": "4.6.1", + "@ecl/twig-component-navigation-list": "4.6.1", + "@ecl/twig-component-news-ticker": "4.6.1", + "@ecl/twig-component-notification": "4.6.1", + "@ecl/twig-component-page-header": "4.6.1", + "@ecl/twig-component-pagination": "4.6.1", + "@ecl/twig-component-radio": "4.6.1", + "@ecl/twig-component-search-form": "4.6.1", + "@ecl/twig-component-select": "4.6.1", + "@ecl/twig-component-site-footer": "4.6.1", + "@ecl/twig-component-site-header": "4.6.1", + "@ecl/twig-component-skip-link": "4.6.1", + "@ecl/twig-component-social-media-follow": "4.6.1", + "@ecl/twig-component-social-media-share": "4.6.1", + "@ecl/twig-component-splash-page": "4.6.1", + "@ecl/twig-component-table": "4.6.1", + "@ecl/twig-component-tabs": "4.6.1", + "@ecl/twig-component-tag": "4.6.1", + "@ecl/twig-component-text-input": "4.6.1", + "@ecl/twig-component-timeline": "4.6.1", + "@ecl/vanilla-utility-background": "4.6.1", + "@ecl/vanilla-utility-border": "4.6.1", "chokidar-cli": "3.0.0", "grunt": "1.6.1", "grunt-contrib-copy": "1.0.0", diff --git a/patches/@ecl+twig-component-content-block+4.6.0.patch b/patches/@ecl+twig-component-content-block+4.6.1.patch similarity index 100% rename from patches/@ecl+twig-component-content-block+4.6.0.patch rename to patches/@ecl+twig-component-content-block+4.6.1.patch diff --git a/patches/@ecl+twig-component-file+4.6.0.patch b/patches/@ecl+twig-component-file+4.6.1.patch similarity index 100% rename from patches/@ecl+twig-component-file+4.6.0.patch rename to patches/@ecl+twig-component-file+4.6.1.patch diff --git a/patches/@ecl+twig-component-tabs+4.6.0.patch b/patches/@ecl+twig-component-tabs+4.6.1.patch similarity index 100% rename from patches/@ecl+twig-component-tabs+4.6.0.patch rename to patches/@ecl+twig-component-tabs+4.6.1.patch diff --git a/sass/components/_global.scss b/sass/components/_global.scss index d1a7ee941..99a34181a 100644 --- a/sass/components/_global.scss +++ b/sass/components/_global.scss @@ -10,11 +10,11 @@ body { a { text-decoration: none; + color: var(--ecl-color-primary-100); &:hover, &:focus { text-decoration: underline; } - color: var(--ecl-color-primary-100); } .ecl { From 4cef5aa5f788c833be856e46db865fbc16a4b88a Mon Sep 17 00:00:00 2001 From: 22Alexandra Date: Fri, 23 Aug 2024 13:42:12 +0300 Subject: [PATCH 2/3] EWPP-4689: Fix banner credit selector. --- tests/src/Kernel/fixtures/rendering.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/tests/src/Kernel/fixtures/rendering.yml b/tests/src/Kernel/fixtures/rendering.yml index c728b3ecb..103d70351 100644 --- a/tests/src/Kernel/fixtures/rendering.yml +++ b/tests/src/Kernel/fixtures/rendering.yml @@ -236,12 +236,12 @@ 'svg.ecl-icon.ecl-icon--xs.ecl-icon--rotate-90.ecl-link__icon': 1 'picture.ecl-picture.ecl-banner__picture img.ecl-banner__image[src="http://via.placeholder.com/150x150"]': 1 '.ecl-banner--full-width': 0 - 'footer.ecl-banner__credit small': 1 + 'footer.ecl-banner__credit div.ecl-container': 1 equals: 'div.ecl-container div.ecl-banner__container div.ecl-banner__content div.ecl-banner__title span.ecl-banner__title-text': Banner title 'div.ecl-container div.ecl-banner__container div.ecl-banner__content p.ecl-banner__description span.ecl-banner__description-text': Banner description 'a.ecl-link.ecl-link--cta.ecl-link--icon.ecl-banner__link-cta[href="http://example.com"] span.ecl-link__label': Subscribe - 'footer.ecl-banner__credit small': © Copyright or credit + 'footer.ecl-banner__credit div.ecl-container': © Copyright or credit - array: '#type': pattern '#id': banner @@ -268,7 +268,7 @@ 'div.ecl-container div.ecl-banner__container div.ecl-banner__content div.ecl-banner__title span.ecl-banner__title-text a.ecl-link.ecl-link--icon.ecl-banner__title-link[data-name="data value"]': 1 'svg.ecl-icon.ecl-icon--xs.ecl-icon--rotate-90.ecl-link__icon': 1 'picture.ecl-picture.ecl-banner__picture img.ecl-banner__image[src="http://via.placeholder.com/150x150"]': 1 - 'footer.ecl-banner__credit small': 1 + 'footer.ecl-banner__credit div.ecl-container': 1 equals: 'div.ecl-container div.ecl-banner__container div.ecl-banner__content div.ecl-banner__title span.ecl-banner__title-text a[href="http://example.com"] span.ecl-link__label': Banner title 'div.ecl-container div.ecl-banner__container div.ecl-banner__content p.ecl-banner__description span.ecl-banner__description-text': Banner description @@ -298,7 +298,7 @@ 'svg.ecl-icon.ecl-icon--xs.ecl-icon--rotate-90.ecl-link__icon': 1 'picture.ecl-picture.ecl-banner__picture img.ecl-banner__image[src="http://via.placeholder.com/150x150"]': 1 '.ecl-banner--full-width': 0 - 'footer.ecl-banner__credit small': 0 + 'footer.ecl-banner__credit div.ecl-container': 0 equals: 'div.ecl-container div.ecl-banner__container div.ecl-banner__content p.ecl-banner__description span.ecl-banner__description-text a[href="http://example.com"] span.ecl-link__label': Banner description - array: @@ -324,7 +324,7 @@ 'picture.ecl-picture.ecl-banner__picture img.ecl-banner__image[src="http://via.placeholder.com/150x150"]': 1 'picture source': 0 '.ecl-banner--full-width': 0 - 'footer.ecl-banner__credit small': 0 + 'footer.ecl-banner__credit div.ecl-container': 0 equals: 'div.ecl-container div.ecl-banner__container div.ecl-banner__content div.ecl-banner__title span.ecl-banner__title-text': Banner title 'div.ecl-container div.ecl-banner__container div.ecl-banner__content p.ecl-banner__description span.ecl-banner__description-text': Banner description @@ -368,12 +368,12 @@ 'picture source[srcset="https://picsum.photos/seed/picsum/996/996"][media="(max-width: 996px)"]': 1 'picture source[srcset="https://loremflickr.com/1140/380/brazil"][media="(max-width: 1140px)"]': 1 'picture source[srcset="https://inno-ecl.s3.amazonaws.com/media/examples/example-image.jpg"][media="(min-width: 1140px)"]': 1 - 'footer.ecl-banner__credit small': 1 + 'footer.ecl-banner__credit div.ecl-container': 1 equals: 'div.ecl-container div.ecl-banner__container div.ecl-banner__content div.ecl-banner__title span.ecl-banner__title-text': Banner title 'div.ecl-container div.ecl-banner__container div.ecl-banner__content p.ecl-banner__description span.ecl-banner__description-text': Banner description 'a.ecl-link.ecl-link--cta.ecl-link--icon.ecl-banner__link-cta[href="http://example.com"] span.ecl-link__label': Example - 'footer.ecl-banner__credit small': © Copyright or credit + 'footer.ecl-banner__credit div.ecl-container': © Copyright or credit - array: '#type': pattern '#id': banner @@ -393,7 +393,7 @@ 'div.ecl-banner__content div.ecl-banner__cta a.ecl-link.ecl-link--cta.ecl-link--icon.ecl-banner__link-cta[href="http://example.com"]': 1 'svg.ecl-icon.ecl-icon--xs.ecl-icon--rotate-90.ecl-link__icon': 1 'picture.ecl-picture.ecl-banner__picture img.ecl-banner__image[src="http://via.placeholder.com/150x150"]': 1 - 'footer.ecl-banner__credit small': 1 + 'footer.ecl-banner__credit div.ecl-container': 1 equals: 'div.ecl-container div.ecl-banner__container div.ecl-banner__content div.ecl-banner__title span.ecl-banner__title-text': Banner title 'div.ecl-container div.ecl-banner__container div.ecl-banner__content p.ecl-banner__description span.ecl-banner__description-text': Banner description @@ -425,7 +425,7 @@ 'div.ecl-banner__content div.ecl-banner__cta a.ecl-link.ecl-link--cta.ecl-link--icon.ecl-banner__link-cta[data-name="data value"]': 1 'svg.ecl-icon.ecl-icon--xs.ecl-icon--rotate-90.ecl-link__icon': 1 'picture.ecl-picture.ecl-banner__picture img.ecl-banner__image[src="http://via.placeholder.com/150x150"]': 1 - 'footer.ecl-banner__credit small': 1 + 'footer.ecl-banner__credit div.ecl-container': 1 equals: 'div.ecl-container div.ecl-banner__container div.ecl-banner__content div.ecl-banner__title span.ecl-banner__title-text': Banner title 'div.ecl-container div.ecl-banner__container div.ecl-banner__content p.ecl-banner__description span.ecl-banner__description-text': Banner description @@ -459,7 +459,7 @@ 'div.ecl-banner__content div.ecl-banner__cta a.ecl-link.ecl-link--cta.ecl-link--icon.ecl-banner__link-cta[data-name="data value"]': 1 'svg.ecl-icon.ecl-icon--xs.ecl-icon--rotate-90.ecl-link__icon': 1 'picture.ecl-picture.ecl-banner__picture img.ecl-banner__image[src="http://via.placeholder.com/150x150"]': 1 - 'footer.ecl-banner__credit small': 1 + 'footer.ecl-banner__credit div.ecl-container': 1 equals: 'div.ecl-container div.ecl-banner__container div.ecl-banner__content div.ecl-banner__title span.ecl-banner__title-text': Banner title 'div.ecl-container div.ecl-banner__container div.ecl-banner__content p.ecl-banner__description span.ecl-banner__description-text': Banner description @@ -4148,7 +4148,7 @@ div.ecl-carousel__slide section.ecl-banner--text-box.ecl-banner--m:not(.ecl-banner--h-center) div.ecl-banner__content div.ecl-banner__title .ecl-banner__title-text: 'Lorem ipsum dolor sit amet' div.ecl-carousel__slide section.ecl-banner--text-box.ecl-banner--m:not(.ecl-banner--h-center) div.ecl-banner__content p.ecl-banner__description .ecl-banner__description-text: 'Nullam sollicitudin suscipit diam, ac blandit ipsum tempor consectetur' div.ecl-carousel__slide section.ecl-banner--text-box.ecl-banner--m:not(.ecl-banner--h-center) div.ecl-banner__content div.ecl-banner__cta a[href="https://example.com"] span.ecl-link__label: 'CTA 1' - div.ecl-carousel__slide section.ecl-banner--text-box.ecl-banner--m:not(.ecl-banner--h-center) footer.ecl-banner__credit small: '© Copyright first item' + div.ecl-carousel__slide section.ecl-banner--text-box.ecl-banner--m:not(.ecl-banner--h-center) footer.ecl-banner__credit div.ecl-container: '© Copyright first item' div.ecl-carousel__slide section.ecl-banner.ecl-banner--text-overlay.ecl-banner--h-center div.ecl-banner__title .ecl-banner__title-text: 'Duis vitae pulvinar turpis' div.ecl-carousel__slide section.ecl-banner.ecl-banner--text-overlay.ecl-banner--h-center p.ecl-banner__description .ecl-banner__description-text: 'Integer quis lorem tellus. Nullam sollicitudin suscipit diam, ac blandit ipsum tempor consectetur' div.ecl-carousel__slide section.ecl-banner.ecl-banner--text-overlay.ecl-banner--h-center div.ecl-banner__cta a[href="https://example.com"] span.ecl-link__label: 'CTA 2' From 9b792aeaab783a91bcddb147c0af42e714be4ebc Mon Sep 17 00:00:00 2001 From: 22Alexandra Date: Fri, 23 Aug 2024 14:24:18 +0300 Subject: [PATCH 3/3] EWPP-4689: Fix default variant of navigation_menu to use button instead of link for openning the menu. --- .../navigation_menu/pattern-navigation-menu.html.twig | 5 +---- tests/src/Functional/SiteHeaderTest.php | 4 ++-- tests/src/Kernel/fixtures/rendering.yml | 6 +++--- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/templates/patterns/navigation_menu/pattern-navigation-menu.html.twig b/templates/patterns/navigation_menu/pattern-navigation-menu.html.twig index c66559358..e9d35a691 100644 --- a/templates/patterns/navigation_menu/pattern-navigation-menu.html.twig +++ b/templates/patterns/navigation_menu/pattern-navigation-menu.html.twig @@ -63,10 +63,7 @@ {% include '@ecl-twig/menu' with { title: label|default('Menu'|t), toggle: { - link: { - label: label|default('Menu'|t), - hide_label: true - }, + label: label|default('Menu'|t), icon: { path: ecl_icon_path, name: 'hamburger', diff --git a/tests/src/Functional/SiteHeaderTest.php b/tests/src/Functional/SiteHeaderTest.php index 2f7cda6c3..a62a8b232 100644 --- a/tests/src/Functional/SiteHeaderTest.php +++ b/tests/src/Functional/SiteHeaderTest.php @@ -246,9 +246,9 @@ public function testSiteHeader(): void { // Assert the menu container. $menu_container = $assert->elementExists('css', 'nav div.ecl-container.ecl-menu__container', $main_menu); - $this->assertStringContainsString('Menu', $menu_container->find('css', "a.ecl-link.ecl-link--standalone.ecl-menu__open[href][data-ecl-menu-open] span.ecl-link__label") + $this->assertStringContainsString('Menu', $menu_container->find('css', "button.ecl-button--tertiary.ecl-menu__open.ecl-button--icon-only[data-ecl-menu-open] span.ecl-button__label") ->getText()); - $icon = $menu_container->find('css', "a.ecl-menu__open svg.ecl-icon.ecl-icon--m[focusable='false'][aria-hidden='true']"); + $icon = $menu_container->find('css', "button.ecl-menu__open svg.ecl-icon.ecl-icon--m[focusable='false'][aria-hidden='true']"); $this->assertEquals('', $icon->getHtml()); $assert->elementExists('css', "section.ecl-menu__inner[data-ecl-menu-inner]", $menu_container); $assert->elementExists('css', 'section header.ecl-menu__inner-header', $menu_container); diff --git a/tests/src/Kernel/fixtures/rendering.yml b/tests/src/Kernel/fixtures/rendering.yml index 103d70351..aa023ef3f 100644 --- a/tests/src/Kernel/fixtures/rendering.yml +++ b/tests/src/Kernel/fixtures/rendering.yml @@ -3433,9 +3433,9 @@ "li.ecl-menu__item:nth-child(1) button[aria-label=\"Access item's children\"]": 1 "li.ecl-menu__item:nth-child(2) button[aria-label=\"Access item's children\"]": 1 "div.ecl-container.ecl-menu__container section.ecl-menu__inner[data-ecl-menu-inner]": 1 - "a.ecl-link--standalone.ecl-button.ecl-button--tertiary.ecl-menu__open.ecl-link--icon-only": 1 + "button.ecl-button--tertiary.ecl-menu__open.ecl-button--icon-only": 1 equals: - 'a.ecl-menu__open.ecl-link--icon-only span.ecl-link__label': 'Menu' + 'button.ecl-menu__open.ecl-button--icon-only span.ecl-button__label': 'Menu' '.ecl-menu__inner-header button.ecl-menu__close[data-ecl-menu-close] span.ecl-button__label': "Close" '.ecl-menu__inner-header button.ecl-menu__back[data-ecl-menu-back] .ecl-button__label': "Back" 'li.ecl-menu__item.ecl-menu__item--has-children:nth-child(1) a.ecl-menu__link': "Parent 1" @@ -3485,7 +3485,7 @@ "nav.ecl-menu[data-ecl-menu][data-ecl-menu-max-lines=\"3\"][data-ecl-auto-init=\"Menu\"][aria-expanded=\"false\"][role=\"navigation\"][aria-label=\"Site navigation\"]": 1 "li.ecl-menu__item:nth-child(1) button[aria-label=\"Access item's children\"]": 1 equals: - '.ecl-menu__open .ecl-link__label': "Custom Menu" + 'button.ecl-menu__open span.ecl-button__label': "Custom Menu" '.ecl-menu__inner-header button.ecl-menu__close[data-ecl-menu-close] span.ecl-button__label': "Close" '.ecl-menu__inner-header button.ecl-menu__back[data-ecl-menu-back] .ecl-button__label': "Back" 'li.ecl-menu__item:nth-child(1) a.ecl-menu__link': "Parent 1"