From 9dbf7b4ffdd78ae42a20e46a57590a3a6e3fefaa Mon Sep 17 00:00:00 2001
From: Francesco Sardara <francesco@tdgwebservices.com>
Date: Fri, 22 Apr 2022 23:50:38 +0200
Subject: [PATCH 01/54] OEL-1452: Add missing text formats in description list
 paragraph test.

---
 .../Kernel/Paragraphs/DescriptionListTest.php | 69 ++++++++++++++-----
 1 file changed, 50 insertions(+), 19 deletions(-)

diff --git a/modules/oe_whitelabel_paragraphs/tests/src/Kernel/Paragraphs/DescriptionListTest.php b/modules/oe_whitelabel_paragraphs/tests/src/Kernel/Paragraphs/DescriptionListTest.php
index d96781b1..b1b1280a 100644
--- a/modules/oe_whitelabel_paragraphs/tests/src/Kernel/Paragraphs/DescriptionListTest.php
+++ b/modules/oe_whitelabel_paragraphs/tests/src/Kernel/Paragraphs/DescriptionListTest.php
@@ -4,6 +4,7 @@ declare(strict_types = 1);
 
 namespace Drupal\Tests\oe_whitelabel_paragraphs\Kernel\Paragraphs;
 
+use Drupal\filter\Entity\FilterFormat;
 use Drupal\paragraphs\Entity\Paragraph;
 use Symfony\Component\DomCrawler\Crawler;
 
@@ -12,6 +13,34 @@ use Symfony\Component\DomCrawler\Crawler;
  */
 class DescriptionListTest extends ParagraphsTestBase {
 
+  /**
+   * {@inheritdoc}
+   */
+  protected function setUp(): void {
+    parent::setUp();
+
+    FilterFormat::create([
+      'format' => 'full_html',
+      'name' => 'Full HTML',
+      'weight' => 0,
+      'filters' => [],
+    ])->save();
+
+    FilterFormat::create([
+      'format' => 'filtered_html',
+      'name' => 'Filtered HTML',
+      'weight' => 1,
+      'filters' => [
+        'filter_html' => [
+          'status' => 1,
+          'settings' => [
+            'allowed_html' => '<em>',
+          ],
+        ],
+      ],
+    ])->save();
+  }
+
   /**
    * Tests the rendering of the paragraph type.
    */
@@ -22,13 +51,15 @@ class DescriptionListTest extends ParagraphsTestBase {
       'field_oe_title' => 'Description list paragraph',
       'oe_w_orientation' => 'horizontal',
       'field_oe_description_list_items' => [
-        0 => [
+        [
           'term' => 'Aliquam ultricies',
-          'description' => 'Donec et leo ac velit posuere tempor mattis ac mi. Vivamus nec dictum lectus. Aliquam ultricies placerat eros, vitae ornare sem.',
+          'description' => 'Donec et leo ac velit posuere tempor <em>mattis</em> ac mi. Vivamus nec <strong>dictum</strong> lectus. Aliquam ultricies placerat eros, vitae ornare sem.',
+          'format' => 'full_html',
         ],
-        1 => [
-          'term' => 'Etiam lacinia',
-          'description' => 'Quisque tempor sollicitudin lacinia. Morbi imperdiet nulla et nunc aliquet, vel lobortis nunc cursus. Mauris vitae hendrerit felis.',
+        [
+          'term' => 'Etiam <em>lacinia</em>',
+          'description' => 'Quisque tempor sollicitudin <em>lacinia</em>. Morbi imperdiet nulla et nunc <strong>aliquet</strong>, vel lobortis nunc cursus. Mauris vitae hendrerit felis.',
+          'format' => 'filtered_html',
         ],
       ],
     ]);
@@ -47,19 +78,19 @@ class DescriptionListTest extends ParagraphsTestBase {
     $this->assertEquals('Description list paragraph', $title->text());
 
     $term_1 = $crawler->filter('dl > div:nth-child(1) > dt');
-    $this->assertEquals('Aliquam ultricies', $term_1->text());
-    $description_1 = $crawler->filter('dl > div:nth-child(1) + dd');
+    $this->assertEquals('Aliquam ultricies', $term_1->html());
+    $description_1 = $crawler->filter('dl > div:nth-child(1) + dd > div');
     $this->assertEquals(
-      'Donec et leo ac velit posuere tempor mattis ac mi. Vivamus nec dictum lectus. Aliquam ultricies placerat eros, vitae ornare sem.',
-      $description_1->text()
+      'Donec et leo ac velit posuere tempor <em>mattis</em> ac mi. Vivamus nec <strong>dictum</strong> lectus. Aliquam ultricies placerat eros, vitae ornare sem.',
+      $description_1->html()
     );
 
     $term_2 = $crawler->filter('dl > div:nth-child(3) > dt');
-    $this->assertEquals('Etiam lacinia', $term_2->text());
-    $description_2 = $crawler->filter('dl > div:nth-child(3) + dd');
+    $this->assertEquals('Etiam &lt;em&gt;lacinia&lt;/em&gt;', $term_2->html());
+    $description_2 = $crawler->filter('dl > div:nth-child(3) + dd > div');
     $this->assertEquals(
-      'Quisque tempor sollicitudin lacinia. Morbi imperdiet nulla et nunc aliquet, vel lobortis nunc cursus. Mauris vitae hendrerit felis.',
-      $description_2->text()
+      'Quisque tempor sollicitudin <em>lacinia</em>. Morbi imperdiet nulla et nunc aliquet, vel lobortis nunc cursus. Mauris vitae hendrerit felis.',
+      $description_2->html()
     );
 
     // Testing: Description list paragraph with vertical variant.
@@ -73,19 +104,19 @@ class DescriptionListTest extends ParagraphsTestBase {
     $this->assertEquals('Description list paragraph', $title->text());
 
     $term_1 = $crawler->filter('dl > dt:nth-child(1)');
-    $this->assertEquals('Aliquam ultricies', $term_1->text());
+    $this->assertEquals('Aliquam ultricies', $term_1->html());
     $description_1 = $crawler->filter('dl > dt:nth-child(1) + dd');
     $this->assertEquals(
-      'Donec et leo ac velit posuere tempor mattis ac mi. Vivamus nec dictum lectus. Aliquam ultricies placerat eros, vitae ornare sem.',
-      $description_1->text()
+      'Donec et leo ac velit posuere tempor <em>mattis</em> ac mi. Vivamus nec <strong>dictum</strong> lectus. Aliquam ultricies placerat eros, vitae ornare sem.',
+      $description_1->html()
     );
 
     $term_2 = $crawler->filter('dl > dt:nth-child(3)');
-    $this->assertEquals('Etiam lacinia', $term_2->text());
+    $this->assertEquals('Etiam &lt;em&gt;lacinia&lt;/em&gt;', $term_2->html());
     $description_2 = $crawler->filter('dl > dt:nth-child(3) + dd');
     $this->assertEquals(
-      'Quisque tempor sollicitudin lacinia. Morbi imperdiet nulla et nunc aliquet, vel lobortis nunc cursus. Mauris vitae hendrerit felis.',
-      $description_2->text()
+      'Quisque tempor sollicitudin <em>lacinia</em>. Morbi imperdiet nulla et nunc aliquet, vel lobortis nunc cursus. Mauris vitae hendrerit felis.',
+      $description_2->html()
     );
   }
 
-- 
GitLab


From b550e3793f57386f33e546173872a2026dcf9c63 Mon Sep 17 00:00:00 2001
From: Francesco Sardara <francesco@tdgwebservices.com>
Date: Fri, 22 Apr 2022 23:55:57 +0200
Subject: [PATCH 02/54] OEL-1452: Make sure the text format is passed together
 with the data to render.

---
 .../oe_whitelabel_paragraphs.module              | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/modules/oe_whitelabel_paragraphs/oe_whitelabel_paragraphs.module b/modules/oe_whitelabel_paragraphs/oe_whitelabel_paragraphs.module
index 822085a3..143bea03 100644
--- a/modules/oe_whitelabel_paragraphs/oe_whitelabel_paragraphs.module
+++ b/modules/oe_whitelabel_paragraphs/oe_whitelabel_paragraphs.module
@@ -404,10 +404,20 @@ function oe_whitelabel_preprocess_paragraph__oe_description_list(array &$variabl
   $variables['title'] = $paragraph->get('field_oe_title')->value ?? '';
   $variables['orientation'] = $paragraph->get('oe_w_orientation')->value;
 
-  foreach ($paragraph->get('field_oe_description_list_items') as $item) {
+  // Reuse the output of the description list formatter, where the correct
+  // text format is specified for the items.
+  // The description list formatter doesn't wrap its output with field template
+  // rendering, so we are forced to process the data here.
+  foreach ($variables['content']['field_oe_description_list_items']['#items'] ?? [] as $item) {
+    // The term and definition are render arrays, so we need to use the verbose
+    // syntax for the description list pattern items.
     $variables['items'][] = [
-      'term' => $item->term,
-      'definition' => $item->description,
+      'term' => [
+        ['label' => $item['term']],
+      ],
+      'definition' => [
+        ['label' => $item['description']],
+      ],
     ];
   }
 }
-- 
GitLab


From 5ea099bd33d03272fc46bd4d7c392f0da05903ff Mon Sep 17 00:00:00 2001
From: Andreas Hennings <andreas@dqxtech.net>
Date: Tue, 22 Mar 2022 11:31:10 +0100
Subject: [PATCH 03/54] OEL-1357: Move composer-artifacts to 'require' in
 composer.json.

We do this here so that the README is more accurate.
---
 composer.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/composer.json b/composer.json
index 7a9c0425..d5ec0d32 100644
--- a/composer.json
+++ b/composer.json
@@ -10,6 +10,7 @@
         "cweagans/composer-patches": "^1.7",
         "drupal/core": "^9.2",
         "drupal/twig_field_value": "^2.0",
+        "openeuropa/composer-artifacts": "^1.0.0-alpha1",
         "openeuropa/oe_bootstrap_theme": "0.1.202204221756"
     },
     "require-dev": {
@@ -32,7 +33,6 @@
         "league/csv": "^9.1",
         "nikic/php-parser": "^4.13",
         "openeuropa/code-review": "^1.7 || ^2.0",
-        "openeuropa/composer-artifacts": "^1.0.0-alpha1",
         "openeuropa/oe_authentication": "^1.4",
         "openeuropa/oe_contact_forms": "~1.1",
         "openeuropa/oe_content": "^2.8.0",
-- 
GitLab


From 33f3be9a2f9ae0c484bdb03e4f0a5eddd98a7025 Mon Sep 17 00:00:00 2001
From: Andreas Hennings <andreas@dqxtech.net>
Date: Mon, 21 Mar 2022 20:29:38 +0100
Subject: [PATCH 04/54] OEL-1283: Remove instructions for LAMP stack.

---
 README.md | 45 ++-------------------------------------------
 1 file changed, 2 insertions(+), 43 deletions(-)

diff --git a/README.md b/README.md
index b354238d..be4eb39c 100644
--- a/README.md
+++ b/README.md
@@ -40,50 +40,9 @@ In order to have full working integration with paragraphs in your project, you m
 
 ## Development setup
 
-OpenEuropa Whitelabel theme uses [Webpack](https://webpack.js.org) to compile and bundle SASS and JS.
+### Using LAMP stack or similar
 
-Make sure you have Node and npm installed.
-
-You can read a guide on how to install node here: https://docs.npmjs.com/getting-started/installing-node
-
-If you prefer to use [Yarn](https://yarnpkg.com) instead of npm, install Yarn by following the guide [here](https://yarnpkg.com/docs/install).
-
-To install required Node.js dependencies run:
-
-
-`npm install` or `yarn install`.
-
-To build the final artifacts run:
-
-```bash
-npm run build
-```
-
-This will compile all SASS and JavaScript files into self-contained assets that are exposed as [Drupal libraries][11].
-
-In order to download all required PHP code run:
-
-```bash
-composer install
-```
-
-This will build a fully functional Drupal site in the `./build` directory that can be used to develop and showcase the
-theme.
-
-Before setting up and installing the site make sure to customize default configuration values by copying [runner.yml.dist](runner.yml.dist)
-to `./runner.yml` and override relevant properties.
-
-To set up the project run:
-
-```bash
-./vendor/bin/run drupal:site-setup
-```
-
-A post command hook (`drupal:site-setup`) is triggered automatically after `composer install`.
-It will make sure that the necessary symlinks are properly setup in the development site.
-It will also perform token substitution in development configuration files such as `phpunit.xml.dist`.
-
-The development site web root should be available in the `build` directory.
+This is not officially supported. You are on your own.
 
 ### Using Docker Compose
 
-- 
GitLab


From 510104a223dfb68bdd64f6ae6f7b81fb9713b6cb Mon Sep 17 00:00:00 2001
From: Andreas Hennings <andreas@dqxtech.net>
Date: Mon, 21 Mar 2022 20:35:35 +0100
Subject: [PATCH 05/54] OEL-1283: Restructure installation instructions when
 used in a website project.

---
 README.md | 61 +++++++++++++++++++++++++++++++++++++++++++++----------
 1 file changed, 50 insertions(+), 11 deletions(-)

diff --git a/README.md b/README.md
index be4eb39c..764b827f 100644
--- a/README.md
+++ b/README.md
@@ -12,31 +12,70 @@ Some paragraphs are considered "internal", and only meant to be used inside othe
 - Listing item: To be used as item paragraph within 'Listing item block'.
 - Fact: To be used as item paragraph within 'Facts and figures'.
 
-## Requirements
+## Usage as a dependency in another project
 
-This depends on the following software:
+Website projects can use `oe_whitelabel` either as an active theme, or they can create a custom theme using `oe_whitelabel` as a base theme.
 
-* [PHP 7.3](http://php.net/)
+### Requirements
 
-## Installation
+The package is meant for projects that manage their dependencies via [Composer](https://www.drupal.org/docs/develop/using-composer/using-composer-to-manage-drupal-site-dependencies#managing-contributed).
 
-The recommended way of installing the OpenEuropa Whitelabel Theme is via [Composer](https://www.drupal.org/docs/develop/using-composer/using-composer-to-manage-drupal-site-dependencies#managing-contributed).
+Ideally this project should be managed with [Docker](https://www.docker.com/get-docker) and
+[Docker Compose](https://docs.docker.com/compose/), but this is not a hard requirement.
+
+Check the [composer.json](composer.json) for required PHP version and other dependencies.
+
+
+### Installation (composer)
+
+Add this manually in composer.json, or combine with existing entries:
+
+```
+    "extra": {
+        "artifacts": {
+            "openeuropa/oe_bootstrap_theme": {
+                "dist": {
+                    "url": "https://github.com/{name}/releases/download/{pretty-version}/{project-name}-{pretty-version}.zip",
+                    "type": "zip"
+                }
+            },
+            "openeuropa/oe_whitelabel": {
+                "dist": {
+                    "url": "https://github.com/{name}/releases/download/{pretty-version}/{project-name}-{pretty-version}.zip",
+                    "type": "zip"
+                }
+            }
+        }
+    }
+```
+
+Require with composer:
 
 ```bash
 composer require openeuropa/oe_whitelabel
 ```
 
-### Enable the theme
+### Enable and configure
+
+Enable required and optional submodules:
 
-In order to enable the theme in your project perform the following steps:
+```bash
+# Always required.
+./vendor/bin/drush en oe_whitelabel_helper
 
-- Enable the OpenEuropa Whitelabel Theme and set it as default ```./vendor/bin/drush config-set system.theme default oe_whitelabel_theme```
+# Required, if you use oe_paragraphs module, or if you copied any paragraph
+# types from that module.
+./vendor/bin/drush en oe_whitelabel_paragraphs
 
-### Integration with oe_paragraphs
+# Other submodules are optional - check the /modules/ folder.
+./vendor/bin/drush en <modulename>
+```
 
-In order to have full working integration with paragraphs in your project, you must enable oe_whitelabel_paragraphs module:
+Enable the theme and set as default:
 
-```./vendor/bin/drush en oe_whitelabel_paragraphs```
+```bash
+./vendor/bin/drush config-set system.theme default oe_bootstrap_theme
+```
 
 ## Development setup
 
-- 
GitLab


From f51d3389522961863fac33df5bd7a639e79d3b72 Mon Sep 17 00:00:00 2001
From: Andreas Hennings <andreas@dqxtech.net>
Date: Tue, 12 Apr 2022 22:10:09 +0200
Subject: [PATCH 06/54] OEL-1357: Prepare a top section for 'Features'.

---
 README.md | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 764b827f..ce5d889c 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,8 @@
 # The OpenEuropa Whitelabel theme
 
-## Paragraphs
+## Features
+
+### Paragraphs
 
 The paragraphs below are not yet themed therefore not recommended for usage:
 
-- 
GitLab


From 59c4f5fd2e01e64616309968366d9a1406aa27f5 Mon Sep 17 00:00:00 2001
From: Andreas Hennings <andreas@dqxtech.net>
Date: Tue, 12 Apr 2022 23:02:04 +0200
Subject: [PATCH 07/54] OEL-1357: Add a short intro text.

---
 README.md | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/README.md b/README.md
index ce5d889c..f7f59254 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,7 @@
 # The OpenEuropa Whitelabel theme
 
+Sub-theme of [OpenEuropa Bootstrap base theme](https://github.com/openeuropa/bootstrap-component-library), with integration for many of the Drupal modules from the OpenEuropa ecosystem.
+
 ## Features
 
 ### Paragraphs
-- 
GitLab


From cbc73acc4d51b688b42ce384d6c556a6079eff1d Mon Sep 17 00:00:00 2001
From: Andreas Hennings <andreas@dqxtech.net>
Date: Tue, 12 Apr 2022 23:03:26 +0200
Subject: [PATCH 08/54] OEL-1357: Add sub-section titles.

---
 README.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/README.md b/README.md
index f7f59254..1edd8932 100644
--- a/README.md
+++ b/README.md
@@ -110,7 +110,7 @@ If a service is defined in both files, Docker Compose merges the configurations.
 
 Find more information on Docker Compose extension mechanism on [the official Docker Compose documentation](https://docs.docker.com/compose/extends/).
 
-#### Usage
+#### Start the container
 
 To start, run:
 
@@ -125,7 +125,7 @@ However, if you'd like to daemonize it, you have to add the flag `-d`:
 docker-compose up -d
 ```
 
-Then:
+#### Installing the package
 
 ```bash
 docker-compose exec -u node node npm install
-- 
GitLab


From 69792b6e1e9cfc9fd23d5390aa7f1143e7d43c6a Mon Sep 17 00:00:00 2001
From: Andreas Hennings <andreas@dqxtech.net>
Date: Tue, 12 Apr 2022 23:03:46 +0200
Subject: [PATCH 09/54] OEL-1357: Mention how to stop other containers.

---
 README.md | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/README.md b/README.md
index 1edd8932..cde62087 100644
--- a/README.md
+++ b/README.md
@@ -112,6 +112,12 @@ Find more information on Docker Compose extension mechanism on [the official Doc
 
 #### Start the container
 
+If you have other (demonized) containers running, you might want to stop them first:
+
+```bash
+docker stop $(docker ps -q)
+```
+
 To start, run:
 
 ```bash
-- 
GitLab


From 1f73feee21eccfd3738f220c619f378936ac7dc0 Mon Sep 17 00:00:00 2001
From: Andreas Hennings <andreas@dqxtech.net>
Date: Tue, 12 Apr 2022 23:04:36 +0200
Subject: [PATCH 10/54] OEL-1357: Document how to purge before re-install.

---
 README.md | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/README.md b/README.md
index cde62087..8971f701 100644
--- a/README.md
+++ b/README.md
@@ -131,6 +131,16 @@ However, if you'd like to daemonize it, you have to add the flag `-d`:
 docker-compose up -d
 ```
 
+#### Optionally purge existing installation
+
+If you already had the package installed, and want a clean start:
+
+```bash
+docker-compose exec web rm composer.lock
+docker-compose exec web rm -rf vendor/
+docker-compose exec web rm -rf build/
+```
+
 #### Installing the package
 
 ```bash
-- 
GitLab


From 363f088499ab5b10e243028d2b0aecb15d728efc Mon Sep 17 00:00:00 2001
From: Andreas Hennings <andreas@dqxtech.net>
Date: Tue, 12 Apr 2022 23:05:27 +0200
Subject: [PATCH 11/54] OEL-1357: Mention 'http://web:8080/build' as
 alternative url.

---
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 8971f701..acedf952 100644
--- a/README.md
+++ b/README.md
@@ -150,7 +150,7 @@ docker-compose exec web composer install
 docker-compose exec web ./vendor/bin/run drupal:site-install
 ```
 
-Using default configuration, the development site files should be available in the `build` directory and the development site should be available at: [http://127.0.0.1:8080/build](http://127.0.0.1:8080/build).
+Using default configuration, the development site files should be available in the `build` directory and the development site should be available at: [http://127.0.0.1:8080/build](http://127.0.0.1:8080/build) or [http://web:8080/build](http://web:8080/build).
 
 #### Running the tests
 
-- 
GitLab


From c78395bce0ebf1fbf800a8e8cbca4d2d6cec752a Mon Sep 17 00:00:00 2001
From: Andreas Hennings <andreas@dqxtech.net>
Date: Tue, 19 Apr 2022 16:12:46 +0200
Subject: [PATCH 12/54] OEL-1357: Replace 'demonize' -> 'daemonize'.

---
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.md b/README.md
index acedf952..04e7d755 100644
--- a/README.md
+++ b/README.md
@@ -112,7 +112,7 @@ Find more information on Docker Compose extension mechanism on [the official Doc
 
 #### Start the container
 
-If you have other (demonized) containers running, you might want to stop them first:
+If you have other (daemonized) containers running, you might want to stop them first:
 
 ```bash
 docker stop $(docker ps -q)
-- 
GitLab


From dc30a70d9a9acc87e37104832542d17ecbe884e8 Mon Sep 17 00:00:00 2001
From: Andreas Hennings <andreas@dqxtech.net>
Date: Thu, 21 Apr 2022 23:26:06 +0200
Subject: [PATCH 13/54] OEL-1357: Use simple verb form in most titles in
 README.

See https://developers.google.com/style/headings
(the verb form can be called "imperative" or "bare infinitive")
---
 README.md | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/README.md b/README.md
index 04e7d755..a3eba824 100644
--- a/README.md
+++ b/README.md
@@ -30,7 +30,7 @@ Ideally this project should be managed with [Docker](https://www.docker.com/get-
 Check the [composer.json](composer.json) for required PHP version and other dependencies.
 
 
-### Installation (composer)
+### Add the composer package
 
 Add this manually in composer.json, or combine with existing entries:
 
@@ -141,7 +141,7 @@ docker-compose exec web rm -rf vendor/
 docker-compose exec web rm -rf build/
 ```
 
-#### Installing the package
+#### Install the package
 
 ```bash
 docker-compose exec -u node node npm install
@@ -152,7 +152,7 @@ docker-compose exec web ./vendor/bin/run drupal:site-install
 
 Using default configuration, the development site files should be available in the `build` directory and the development site should be available at: [http://127.0.0.1:8080/build](http://127.0.0.1:8080/build) or [http://web:8080/build](http://web:8080/build).
 
-#### Running the tests
+#### Run the tests
 
 To run the grumphp checks:
 
-- 
GitLab


From 6c58e71ade253a3ffae23f15857a7f47c8283e1b Mon Sep 17 00:00:00 2001
From: Andreas Hennings <andreas@dqxtech.net>
Date: Thu, 21 Apr 2022 23:28:43 +0200
Subject: [PATCH 14/54] OEL-1357: No colon in hx.

---
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.md b/README.md
index a3eba824..84c67f0d 100644
--- a/README.md
+++ b/README.md
@@ -95,7 +95,7 @@ Alternatively, you can build a development site using [Docker](https://www.docke
 Docker provides the necessary services and tools such as a web server and a database server to get the site running,
 regardless of your local host configuration.
 
-#### Requirements:
+#### Requirements
 
 - [Docker](https://www.docker.com/get-docker)
 - [Docker Compose](https://docs.docker.com/compose/)
-- 
GitLab


From d3aa5273d78544730b8a8226dec2f3951bf8e165 Mon Sep 17 00:00:00 2001
From: Andreas Hennings <andreas@dqxtech.net>
Date: Thu, 21 Apr 2022 23:29:13 +0200
Subject: [PATCH 15/54] OEL-1357: How to require alpha version. Remove when
 stable is released.

---
 README.md | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/README.md b/README.md
index 84c67f0d..0ba42f42 100644
--- a/README.md
+++ b/README.md
@@ -53,12 +53,32 @@ Add this manually in composer.json, or combine with existing entries:
     }
 ```
 
+If your project is still in development, you may modify composer.json to allow alpha versions, while this package and some of its dependencies are still in their `alpha` phase.
+
+Review this again when the site goes into production.
+
+```
+    "minimum-stability": "alpha",
+```
+
 Require with composer:
 
 ```bash
 composer require openeuropa/oe_whitelabel
 ```
 
+If composer.json does not allow alpha versions, a version string needs to be appended to the package name in the require command, and other dependencies with alpha versions also need to be required with explicit version strings. The version string could be `:^1.0@alpha`, or a specific version like `:^1.0.0-alpha7`.
+
+```bash
+composer require openeuropa/oe_whitelabel:^1.0@alpha openeuropa/oe_bootstrap_theme:^1.0@alpha
+```
+
+Review the installed package versions. Make sure that oe_whitelabel and oe_bootstrap theme are using 1.x or higher.
+
+```bash
+composer show -i | grep oe_
+```
+
 ### Enable and configure
 
 Enable required and optional submodules:
-- 
GitLab


From bd13f7448eb4dfed3b449d216b719bb0f86d9b03 Mon Sep 17 00:00:00 2001
From: Andreas Hennings <andreas@dqxtech.net>
Date: Thu, 21 Apr 2022 23:38:57 +0200
Subject: [PATCH 16/54] OEL-1357: Mention that this is for Drupal projects.

---
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 0ba42f42..c77ee76d 100644
--- a/README.md
+++ b/README.md
@@ -22,7 +22,7 @@ Website projects can use `oe_whitelabel` either as an active theme, or they can
 
 ### Requirements
 
-The package is meant for projects that manage their dependencies via [Composer](https://www.drupal.org/docs/develop/using-composer/using-composer-to-manage-drupal-site-dependencies#managing-contributed).
+The package is meant for Drupal projects that manage their dependencies with [Composer](https://www.drupal.org/docs/develop/using-composer/using-composer-to-manage-drupal-site-dependencies#managing-contributed).
 
 Ideally this project should be managed with [Docker](https://www.docker.com/get-docker) and
 [Docker Compose](https://docs.docker.com/compose/), but this is not a hard requirement.
-- 
GitLab


From d05aabd1fa2855ada5e4d092ae05b03103111ea7 Mon Sep 17 00:00:00 2001
From: Andreas Hennings <andreas@dqxtech.net>
Date: Thu, 21 Apr 2022 23:39:10 +0200
Subject: [PATCH 17/54] OEL-1357: Standardize line breaks.

---
 README.md | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/README.md b/README.md
index c77ee76d..841e62d5 100644
--- a/README.md
+++ b/README.md
@@ -24,12 +24,10 @@ Website projects can use `oe_whitelabel` either as an active theme, or they can
 
 The package is meant for Drupal projects that manage their dependencies with [Composer](https://www.drupal.org/docs/develop/using-composer/using-composer-to-manage-drupal-site-dependencies#managing-contributed).
 
-Ideally this project should be managed with [Docker](https://www.docker.com/get-docker) and
-[Docker Compose](https://docs.docker.com/compose/), but this is not a hard requirement.
+Ideally this project should be managed with [Docker](https://www.docker.com/get-docker) and [Docker Compose](https://docs.docker.com/compose/), but this is not a hard requirement.
 
 Check the [composer.json](composer.json) for required PHP version and other dependencies.
 
-
 ### Add the composer package
 
 Add this manually in composer.json, or combine with existing entries:
-- 
GitLab


From 95b0bbdf0ee6575024d7c20c24f0d63670399c74 Mon Sep 17 00:00:00 2001
From: Andreas Hennings <andreas@dqxtech.net>
Date: Wed, 27 Apr 2022 23:50:34 +0200
Subject: [PATCH 18/54] OEL-1357: Rephrase intro, say 'theming' instead of
 'integration'.

---
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 841e62d5..7c9b619f 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
 # The OpenEuropa Whitelabel theme
 
-Sub-theme of [OpenEuropa Bootstrap base theme](https://github.com/openeuropa/bootstrap-component-library), with integration for many of the Drupal modules from the OpenEuropa ecosystem.
+Sub-theme of [OpenEuropa Bootstrap base theme](https://github.com/openeuropa/bootstrap-component-library), with theming for OpenEuropa library features.
 
 ## Features
 
-- 
GitLab


From 878c21ae7926fe9d9b9724406f52f47d397d3e16 Mon Sep 17 00:00:00 2001
From: Andreas Hennings <andreas@dqxtech.net>
Date: Wed, 27 Apr 2022 23:50:54 +0200
Subject: [PATCH 19/54] OEL-1357: Rephrase section title 'Usage as a
 dependency'.

---
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 7c9b619f..d78ad712 100644
--- a/README.md
+++ b/README.md
@@ -16,7 +16,7 @@ Some paragraphs are considered "internal", and only meant to be used inside othe
 - Listing item: To be used as item paragraph within 'Listing item block'.
 - Fact: To be used as item paragraph within 'Facts and figures'.
 
-## Usage as a dependency in another project
+## Usage as a dependency
 
 Website projects can use `oe_whitelabel` either as an active theme, or they can create a custom theme using `oe_whitelabel` as a base theme.
 
-- 
GitLab


From e0883cd407c49bf5171a95832d7ff772bbd97891 Mon Sep 17 00:00:00 2001
From: Andreas Hennings <andreas@dqxtech.net>
Date: Wed, 27 Apr 2022 23:51:29 +0200
Subject: [PATCH 20/54] OEL-1357: Rephrase the part about 'alpha' and
 'minimum-stability'.

---
 README.md | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)

diff --git a/README.md b/README.md
index d78ad712..c80d86eb 100644
--- a/README.md
+++ b/README.md
@@ -51,27 +51,25 @@ Add this manually in composer.json, or combine with existing entries:
     }
 ```
 
-If your project is still in development, you may modify composer.json to allow alpha versions, while this package and some of its dependencies are still in their `alpha` phase.
+While this package is still in its `alpha` phase, you need an extra step in composer, to avoid getting anything from the obsolete and unsupported `0.x` branch.
 
+One option is to set `minimum-stability` and require the `^1.0` version.
+You should also set `prefer-stable` to mitigate the impact on other dependencies.
 Review this again when the site goes into production.
 
-```
-    "minimum-stability": "alpha",
-```
-
-Require with composer:
-
 ```bash
-composer require openeuropa/oe_whitelabel
+composer config minimum-stability alpha
+composer config prefer-stable true
+composer require openeuropa/oe_whitelabel:^1.0
 ```
 
-If composer.json does not allow alpha versions, a version string needs to be appended to the package name in the require command, and other dependencies with alpha versions also need to be required with explicit version strings. The version string could be `:^1.0@alpha`, or a specific version like `:^1.0.0-alpha7`.
+Alternatively, if you don't want to set `minimum-stability`, you need to specify explicit versions for all dependencies with alpha versions:
 
 ```bash
 composer require openeuropa/oe_whitelabel:^1.0@alpha openeuropa/oe_bootstrap_theme:^1.0@alpha
 ```
 
-Review the installed package versions. Make sure that oe_whitelabel and oe_bootstrap theme are using 1.x or higher.
+Review the installed package versions.
 
 ```bash
 composer show -i | grep oe_
-- 
GitLab


From 41a39875453f486dede0389df5813868f3383e65 Mon Sep 17 00:00:00 2001
From: Andreas Hennings <andreas@dqxtech.net>
Date: Wed, 27 Apr 2022 23:51:51 +0200
Subject: [PATCH 21/54] OEL-1357: Fix command by replacing 'oe_bootstrap_theme'
 with 'oe_whitelabel'.

---
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.md b/README.md
index c80d86eb..1e3a4ecc 100644
--- a/README.md
+++ b/README.md
@@ -94,7 +94,7 @@ Enable required and optional submodules:
 Enable the theme and set as default:
 
 ```bash
-./vendor/bin/drush config-set system.theme default oe_bootstrap_theme
+./vendor/bin/drush config-set system.theme default oe_whitelabel
 ```
 
 ## Development setup
-- 
GitLab


From 23eafc92f4654d6c003b187e2293e47c5b599ba2 Mon Sep 17 00:00:00 2001
From: drishu <aszilagyi@live.com>
Date: Wed, 8 Dec 2021 15:37:33 +0200
Subject: [PATCH 22/54] OEL-486: Add exposed sort rendering test.

---
 .../src/Kernel/FloatEndSortWidgetTest.php     | 63 +++++++++++++++++++
 1 file changed, 63 insertions(+)
 create mode 100644 modules/oe_whitelabel_helper/tests/src/Kernel/FloatEndSortWidgetTest.php

diff --git a/modules/oe_whitelabel_helper/tests/src/Kernel/FloatEndSortWidgetTest.php b/modules/oe_whitelabel_helper/tests/src/Kernel/FloatEndSortWidgetTest.php
new file mode 100644
index 00000000..c3f9f358
--- /dev/null
+++ b/modules/oe_whitelabel_helper/tests/src/Kernel/FloatEndSortWidgetTest.php
@@ -0,0 +1,63 @@
+<?php
+
+declare(strict_types = 1);
+
+namespace Drupal\Tests\oe_whitelabel_helper\Kernel;
+
+use Drupal\Tests\better_exposed_filters\Kernel\BetterExposedFiltersKernelTestBase;
+use Drupal\views\Views;
+use Symfony\Component\DomCrawler\Crawler;
+
+/**
+ * Tests the FloatEndSort exposed form sort widget rendering.
+ */
+class FloatEndSortWidgetTest extends BetterExposedFiltersKernelTestBase {
+
+  /**
+   * {@inheritdoc}
+   */
+  public static $modules = [
+    'bef_test',
+    'better_exposed_filters',
+    'field',
+    'filter',
+    'node',
+    'oe_whitelabel_helper',
+    'options',
+    'system',
+    'taxonomy',
+    'text',
+    'user',
+    'views',
+  ];
+
+  /**
+   * {@inheritdoc}
+   */
+  public static $testViews = ['bef_test'];
+
+  /**
+   * Tests the rendering of the FloatEndSortWidget.
+   */
+  public function testFloatEndSortWidget() {
+    $view = Views::getView('bef_test');
+    $view->storage->getDisplay('default');
+
+    $this->setBetterExposedOptions($view, [
+      'sort' => [
+        'plugin_id' => 'oe_whitelabel_float_end_sort',
+      ],
+    ]);
+
+    // Render the exposed form.
+    $this->renderExposedForm($view);
+    $crawler = new Crawler($this->content->__toString());
+
+    $widget = $crawler->filter('form.bef-exposed-form');
+    $this->assertCount(1, $widget);
+    $this->assertStringContainsString('float-lg-end d-none d-md-flex align-items-baseline', $widget->attr('class'));
+
+    $view->destroy();
+  }
+
+}
-- 
GitLab


From 1f8e6bcbb5fa13da5769bbcd7aca998ebfdaa61a Mon Sep 17 00:00:00 2001
From: drishu <aszilagyi@live.com>
Date: Mon, 3 Jan 2022 15:51:33 +0200
Subject: [PATCH 23/54] OEL-486: Improve search block test.

---
 .../tests/src/Kernel/SearchBlockTest.php                    | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/modules/oe_whitelabel_search/tests/src/Kernel/SearchBlockTest.php b/modules/oe_whitelabel_search/tests/src/Kernel/SearchBlockTest.php
index fb2e0a85..cd3be37a 100644
--- a/modules/oe_whitelabel_search/tests/src/Kernel/SearchBlockTest.php
+++ b/modules/oe_whitelabel_search/tests/src/Kernel/SearchBlockTest.php
@@ -46,10 +46,8 @@ class SearchBlockTest extends KernelTestBase {
     parent::setUp();
 
     \Drupal::service('theme_installer')->install(['oe_whitelabel']);
-    $this->container->set('theme.registry', NULL);
 
-    \Drupal::configFactory()
-      ->getEditable('system.theme')
+    $this->config('system.theme')
       ->set('default', 'oe_whitelabel')
       ->save();
 
@@ -84,7 +82,7 @@ class SearchBlockTest extends KernelTestBase {
   }
 
   /**
-   * Tests the rendering of blocks.
+   * Tests the rendering of the whitelabel search block.
    */
   public function testBlockRendering(): void {
     $entity_type_manager = $this->container
-- 
GitLab


From eddf3d67d55f24f2c9ed3e3bea870d862bb04eef Mon Sep 17 00:00:00 2001
From: drishu <aszilagyi@live.com>
Date: Tue, 8 Mar 2022 12:11:20 +0200
Subject: [PATCH 24/54] OEL-486: Improve authentication block test.

---
 tests/src/Kernel/AuthenticationBlockTest.php | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/tests/src/Kernel/AuthenticationBlockTest.php b/tests/src/Kernel/AuthenticationBlockTest.php
index fe7f7325..cc7c8bba 100644
--- a/tests/src/Kernel/AuthenticationBlockTest.php
+++ b/tests/src/Kernel/AuthenticationBlockTest.php
@@ -32,17 +32,15 @@ class AuthenticationBlockTest extends KernelTestBase {
    */
   protected function setUp(): void {
     parent::setUp();
-    /** @var \Drupal\Core\Extension\ThemeInstallerInterface $theme_installer */
-    \Drupal::service('theme_installer')->install(['oe_whitelabel']);
 
-    \Drupal::configFactory()
-      ->getEditable('system.theme')
+    \Drupal::service('theme_installer')->install(['oe_whitelabel']);
+    $this->config('system.theme')
       ->set('default', 'oe_whitelabel')
       ->save();
   }
 
   /**
-   * Tests the rendering of blocks.
+   * Tests the rendering of the authentication block.
    */
   public function testBlockRendering(): void {
     $entity_type_manager = $this->container
-- 
GitLab


From 67d837e2c90be144212b7ba4e9f5a8a13e55c0ba Mon Sep 17 00:00:00 2001
From: drishu <aszilagyi@live.com>
Date: Tue, 8 Mar 2022 12:54:35 +0200
Subject: [PATCH 25/54] OEL-486: Add facets_form rendering test.

---
 composer.json                                 |   1 +
 .../tests/src/Kernel/FacetsFormTest.php       | 119 ++++++++++++++++++
 2 files changed, 120 insertions(+)
 create mode 100644 modules/oe_whitelabel_search/tests/src/Kernel/FacetsFormTest.php

diff --git a/composer.json b/composer.json
index d5ec0d32..28266bee 100644
--- a/composer.json
+++ b/composer.json
@@ -23,6 +23,7 @@
         "drupal/description_list_field": "^1.0@alpha",
         "drupal/drupal-extension": "~4.1",
         "drupal/file_link": "^2.0.6",
+        "drupal/facets_form": "1.0.0-alpha2",
         "drupal/pathauto": "^1.8",
         "drupal/search_api": "^1.21",
         "drupal/search_api_autocomplete": "^1.5",
diff --git a/modules/oe_whitelabel_search/tests/src/Kernel/FacetsFormTest.php b/modules/oe_whitelabel_search/tests/src/Kernel/FacetsFormTest.php
new file mode 100644
index 00000000..75523ed8
--- /dev/null
+++ b/modules/oe_whitelabel_search/tests/src/Kernel/FacetsFormTest.php
@@ -0,0 +1,119 @@
+<?php
+
+declare(strict_types = 1);
+
+namespace Drupal\Tests\oe_whitelabel_search\Kernel;
+
+use Drupal\KernelTests\KernelTestBase;
+use Symfony\Component\DomCrawler\Crawler;
+
+/**
+ * Tests the Facets Form rendering.
+ */
+class FacetsFormTest extends KernelTestBase {
+
+  /**
+   * {@inheritdoc}
+   */
+  public static $modules = [
+    'block',
+    'facets',
+    'facets_form',
+    'field',
+    'search_api',
+    'search_api_db',
+    'search_api_test_db',
+    'search_api_test_example_content',
+    'search_api_test_views',
+    'search_api_test',
+    'user',
+    'system',
+    'entity_test',
+    'text',
+    'ui_patterns',
+    'ui_patterns_library',
+    'ui_patterns_settings',
+    'views',
+    'rest',
+    'serialization',
+  ];
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function setUp(): void {
+    parent::setUp();
+
+    $this->installEntitySchema('entity_test_mulrev_changed');
+    $this->installEntitySchema('search_api_task');
+    $this->installConfig('search_api');
+
+    $this->installConfig([
+      'search_api_test_example_content',
+      'search_api_test_db',
+    ]);
+    $this->installConfig('search_api_test_views');
+
+    \Drupal::service('theme_installer')->install(['oe_whitelabel']);
+
+    $this->config('system.theme')
+      ->set('default', 'oe_whitelabel')
+      ->save();
+  }
+
+  /**
+   * Tests the rendering of the whitelabel search block.
+   */
+  public function testBlockRendering(): void {
+    $entity_type_manager = $this->container
+      ->get('entity_type.manager')
+      ->getStorage('block');
+    $entity = $entity_type_manager->create([
+      'id' => 'whitelabel_facets_form_block',
+      'theme' => 'oe_whitelabel',
+      'plugin' => 'facets_form:search_api:views_page__search_api_test_view__page_1',
+      'settings' => [
+        'id' => 'facets_form:search_api:views_page__search_api_test_view__page_1',
+        'label' => 'Facets form',
+        'provider' => 'facets_form',
+        'button' => [
+          'label' => [
+            'submit' => 'Search',
+            'reset' => 'Clear filters',
+          ],
+        ],
+        'facets' => [],
+      ],
+    ]);
+    $entity->save();
+
+    $builder = \Drupal::entityTypeManager()->getViewBuilder('block');
+    $build = $builder->view($entity, 'block');
+    $render = $this->container->get('renderer')->renderRoot($build);
+    $crawler = new Crawler($render->__toString());
+
+    $offcanvas = $crawler->filter('div#bcl-offcanvas');
+    $this->assertSame('bcl-offcanvas offcanvas offcanvas-start', $offcanvas->attr('class'));
+    $header = $offcanvas->filter('div.offcanvas-header.p-lg-0');
+    $this->assertCount(1, $header);
+    $title = $header->filter('h4.offcanvas-title.mb-lg-4');
+    $this->assertSame('Facets form', $title->text());
+    $button = $header->filter('button');
+    $this->assertSame('btn-close text-reset d-lg-none', $button->attr('class'));
+    $this->assertSame('offcanvas', $button->attr('data-bs-dismiss'));
+    $this->assertSame('button', $button->attr('type'));
+    $body = $offcanvas->filter('div.offcanvas-body.bcl-offcanvas.p-lg-0');
+    $this->assertCount(1, $body);
+    $form = $body->filter('form.facets-form');
+    $this->assertCount(1, $form);
+    $button = $crawler->filter('button.d-lg-none.w-100.mb-4.btn.btn-light.btn-md');
+    $this->assertSame('button', $button->attr('type'));
+    $this->assertSame('#bcl-offcanvas', $button->attr('data-bs-target'));
+    $this->assertSame('offcanvas', $button->attr('data-bs-toggle'));
+    $this->assertStringContainsString('Facets form', $button->text());
+    $icon = $button->filter('svg');
+    $this->assertSame('me-2-5 bi icon--fluid', $icon->attr('class'));
+    $this->assertStringContainsString('/assets/icons/bootstrap-icons.svg#filter', $icon->html());
+  }
+
+}
-- 
GitLab


From 9fbcf63b22aac981a5a0cbf6642e6768323f4e8e Mon Sep 17 00:00:00 2001
From: drishu <aszilagyi@live.com>
Date: Tue, 8 Mar 2022 18:04:13 +0200
Subject: [PATCH 26/54] OEL-486: Improve multilingual block test.

---
 tests/src/Kernel/MultilingualBlockTest.php | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/tests/src/Kernel/MultilingualBlockTest.php b/tests/src/Kernel/MultilingualBlockTest.php
index 2a313264..a87ba42d 100644
--- a/tests/src/Kernel/MultilingualBlockTest.php
+++ b/tests/src/Kernel/MultilingualBlockTest.php
@@ -39,11 +39,10 @@ class MultilingualBlockTest extends KernelTestBase {
    */
   protected function setUp(): void {
     parent::setUp();
-    /** @var \Drupal\Core\Extension\ThemeInstallerInterface $theme_installer */
+
     \Drupal::service('theme_installer')->install(['oe_whitelabel']);
 
-    \Drupal::configFactory()
-      ->getEditable('system.theme')
+    $this->config('system.theme')
       ->set('default', 'oe_whitelabel')
       ->save();
 
-- 
GitLab


From f9668503314feeef8de57238eb392312e3e74ff4 Mon Sep 17 00:00:00 2001
From: drishu <aszilagyi@live.com>
Date: Tue, 8 Mar 2022 18:52:49 +0200
Subject: [PATCH 27/54] OEL-486: Use bootstrap helper instead of components and
 sort module list.

---
 .../tests/src/Kernel/FacetsFormTest.php               | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/modules/oe_whitelabel_search/tests/src/Kernel/FacetsFormTest.php b/modules/oe_whitelabel_search/tests/src/Kernel/FacetsFormTest.php
index 75523ed8..403ba357 100644
--- a/modules/oe_whitelabel_search/tests/src/Kernel/FacetsFormTest.php
+++ b/modules/oe_whitelabel_search/tests/src/Kernel/FacetsFormTest.php
@@ -17,25 +17,26 @@ class FacetsFormTest extends KernelTestBase {
    */
   public static $modules = [
     'block',
+    'entity_test',
     'facets',
     'facets_form',
     'field',
+    'oe_bootstrap_theme_helper',
+    'rest',
     'search_api',
     'search_api_db',
+    'search_api_test',
     'search_api_test_db',
     'search_api_test_example_content',
     'search_api_test_views',
-    'search_api_test',
-    'user',
+    'serialization',
     'system',
-    'entity_test',
     'text',
     'ui_patterns',
     'ui_patterns_library',
     'ui_patterns_settings',
+    'user',
     'views',
-    'rest',
-    'serialization',
   ];
 
   /**
-- 
GitLab


From db9cce6d3ac28fd537f66ab4ccef596c6f42e069 Mon Sep 17 00:00:00 2001
From: drishu <aszilagyi@live.com>
Date: Tue, 8 Mar 2022 18:54:36 +0200
Subject: [PATCH 28/54] OEL-486: Focus more on facets form structure.

---
 .../tests/src/Kernel/FacetsFormTest.php           | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/modules/oe_whitelabel_search/tests/src/Kernel/FacetsFormTest.php b/modules/oe_whitelabel_search/tests/src/Kernel/FacetsFormTest.php
index 403ba357..3b2fd6e5 100644
--- a/modules/oe_whitelabel_search/tests/src/Kernel/FacetsFormTest.php
+++ b/modules/oe_whitelabel_search/tests/src/Kernel/FacetsFormTest.php
@@ -90,30 +90,27 @@ class FacetsFormTest extends KernelTestBase {
 
     $builder = \Drupal::entityTypeManager()->getViewBuilder('block');
     $build = $builder->view($entity, 'block');
-    $render = $this->container->get('renderer')->renderRoot($build);
-    $crawler = new Crawler($render->__toString());
+    $html = (string) $this->container->get('renderer')->renderRoot($build);
+    $crawler = new Crawler($html);
 
     $offcanvas = $crawler->filter('div#bcl-offcanvas');
-    $this->assertSame('bcl-offcanvas offcanvas offcanvas-start', $offcanvas->attr('class'));
-    $header = $offcanvas->filter('div.offcanvas-header.p-lg-0');
+    $header = $offcanvas->filter('div.offcanvas-header');
     $this->assertCount(1, $header);
-    $title = $header->filter('h4.offcanvas-title.mb-lg-4');
+    $title = $header->filter('h4.offcanvas-title');
     $this->assertSame('Facets form', $title->text());
     $button = $header->filter('button');
-    $this->assertSame('btn-close text-reset d-lg-none', $button->attr('class'));
     $this->assertSame('offcanvas', $button->attr('data-bs-dismiss'));
     $this->assertSame('button', $button->attr('type'));
-    $body = $offcanvas->filter('div.offcanvas-body.bcl-offcanvas.p-lg-0');
+    $body = $offcanvas->filter('div.offcanvas-body.bcl-offcanvas');
     $this->assertCount(1, $body);
     $form = $body->filter('form.facets-form');
     $this->assertCount(1, $form);
-    $button = $crawler->filter('button.d-lg-none.w-100.mb-4.btn.btn-light.btn-md');
+    $button = $crawler->filter('button.btn-light.btn-lg');
     $this->assertSame('button', $button->attr('type'));
     $this->assertSame('#bcl-offcanvas', $button->attr('data-bs-target'));
     $this->assertSame('offcanvas', $button->attr('data-bs-toggle'));
     $this->assertStringContainsString('Facets form', $button->text());
     $icon = $button->filter('svg');
-    $this->assertSame('me-2-5 bi icon--fluid', $icon->attr('class'));
     $this->assertStringContainsString('/assets/icons/bootstrap-icons.svg#filter', $icon->html());
   }
 
-- 
GitLab


From b81b763a83c3010f47a4d380a0893e4a6a579ec4 Mon Sep 17 00:00:00 2001
From: drishu <aszilagyi@live.com>
Date: Wed, 9 Mar 2022 09:57:40 +0200
Subject: [PATCH 29/54] OEL-486: Improve facets form test comment.

---
 .../oe_whitelabel_search/tests/src/Kernel/FacetsFormTest.php    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/oe_whitelabel_search/tests/src/Kernel/FacetsFormTest.php b/modules/oe_whitelabel_search/tests/src/Kernel/FacetsFormTest.php
index 3b2fd6e5..43ba8a79 100644
--- a/modules/oe_whitelabel_search/tests/src/Kernel/FacetsFormTest.php
+++ b/modules/oe_whitelabel_search/tests/src/Kernel/FacetsFormTest.php
@@ -63,7 +63,7 @@ class FacetsFormTest extends KernelTestBase {
   }
 
   /**
-   * Tests the rendering of the whitelabel search block.
+   * Tests the rendering of the Facets Form block.
    */
   public function testBlockRendering(): void {
     $entity_type_manager = $this->container
-- 
GitLab


From 1c4a2edfe6927a1aee0439f056c257a625c7a2ea Mon Sep 17 00:00:00 2001
From: drishu <aszilagyi@live.com>
Date: Wed, 9 Mar 2022 10:39:25 +0200
Subject: [PATCH 30/54] OEL-486: Add facets summary test.

---
 tests/src/Functional/FacetsSummaryTest.php    | 75 +++++++++++++++++++
 .../src/Kernel/FacetsFormTest.php             |  0
 2 files changed, 75 insertions(+)
 create mode 100644 tests/src/Functional/FacetsSummaryTest.php
 rename {modules/oe_whitelabel_search/tests => tests}/src/Kernel/FacetsFormTest.php (100%)

diff --git a/tests/src/Functional/FacetsSummaryTest.php b/tests/src/Functional/FacetsSummaryTest.php
new file mode 100644
index 00000000..88f0e45a
--- /dev/null
+++ b/tests/src/Functional/FacetsSummaryTest.php
@@ -0,0 +1,75 @@
+<?php
+
+declare(strict_types = 1);
+
+namespace Drupal\Tests\oe_whitelabel\Functional;
+
+use Drupal\facets\Entity\Facet;
+use Drupal\facets_summary\Entity\FacetsSummary;
+use Drupal\Tests\facets\Functional\BlockTestTrait;
+use Drupal\Tests\facets\Functional\ExampleContentTrait;
+
+/**
+ * Tests the Facets Summary rendering.
+ */
+class FacetsSummaryTest extends WhitelabelBrowserTestBase {
+
+  use ExampleContentTrait;
+  use BlockTestTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $modules = [
+    'block',
+    'facets_search_api_dependency',
+    'facets_summary',
+    'oe_whitelabel_helper',
+  ];
+
+  /**
+   * {@inheritdoc}
+   */
+  public function setUp(): void {
+    parent::setUp();
+    $this->setUpExampleStructure();
+    $this->insertExampleContent();
+    $this->assertSame(5, $this->indexItems('database_search_index'));
+  }
+
+  /**
+   * Tests facets summary block rendering.
+   */
+  public function testFacetsSummaryBlock(): void {
+    $this->createFacet('Emu', 'emu', 'type', 'page_1', 'views_page__search_api_test_view', FALSE);
+    $facet = Facet::load('emu');
+    $facet->setOnlyVisibleWhenFacetSourceIsVisible(FALSE);
+    $facet->setWidget('links');
+    $facet->save();
+
+    FacetsSummary::create([
+      'name' => 'Owl',
+      'id' => 'owl',
+      'facet_source_id' => 'search_api:views_page__search_api_test_view__page_1',
+      'facets' => [
+        'emu' => [
+          'checked' => TRUE,
+          'show_count' => FALSE,
+        ],
+      ],
+      'processor_configs' => [
+        'show_count' => [
+          'processor_id' => 'show_count',
+        ],
+      ],
+    ])->save();
+
+    $block = $this->placeBlock('facets_summary_block:owl', ['region' => 'content']);
+    $this->drupalGet('search-api-test-fulltext');
+
+    $assert = $this->assertSession();
+    $assert->elementTextContains('css', 'h4.mb-4', $block->label());
+    $assert->elementTextContains('css', 'h4.mb-4 span.source-summary-count', '(5)');
+  }
+
+}
diff --git a/modules/oe_whitelabel_search/tests/src/Kernel/FacetsFormTest.php b/tests/src/Kernel/FacetsFormTest.php
similarity index 100%
rename from modules/oe_whitelabel_search/tests/src/Kernel/FacetsFormTest.php
rename to tests/src/Kernel/FacetsFormTest.php
-- 
GitLab


From 4a8dfb4fee2cf6c7ac1d41abc646eb3f39f01dfd Mon Sep 17 00:00:00 2001
From: drishu <aszilagyi@live.com>
Date: Wed, 9 Mar 2022 10:39:46 +0200
Subject: [PATCH 31/54] OEL-486: Move facets form test to root.

---
 tests/src/Kernel/FacetsFormTest.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/src/Kernel/FacetsFormTest.php b/tests/src/Kernel/FacetsFormTest.php
index 43ba8a79..915bde04 100644
--- a/tests/src/Kernel/FacetsFormTest.php
+++ b/tests/src/Kernel/FacetsFormTest.php
@@ -2,7 +2,7 @@
 
 declare(strict_types = 1);
 
-namespace Drupal\Tests\oe_whitelabel_search\Kernel;
+namespace Drupal\Tests\oe_whitelabel\Kernel;
 
 use Drupal\KernelTests\KernelTestBase;
 use Symfony\Component\DomCrawler\Crawler;
-- 
GitLab


From 5d00c75f2d4e1911cee17137a7615fe7d0e16cba Mon Sep 17 00:00:00 2001
From: drishu <aszilagyi@live.com>
Date: Wed, 9 Mar 2022 10:45:19 +0200
Subject: [PATCH 32/54] OEL-486: Move FloatEndSort widget test to plugin
 subfolder.

---
 .../better_exposed_filters/sort}/FloatEndSortWidgetTest.php     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename modules/oe_whitelabel_helper/tests/src/Kernel/{ => Plugin/better_exposed_filters/sort}/FloatEndSortWidgetTest.php (94%)

diff --git a/modules/oe_whitelabel_helper/tests/src/Kernel/FloatEndSortWidgetTest.php b/modules/oe_whitelabel_helper/tests/src/Kernel/Plugin/better_exposed_filters/sort/FloatEndSortWidgetTest.php
similarity index 94%
rename from modules/oe_whitelabel_helper/tests/src/Kernel/FloatEndSortWidgetTest.php
rename to modules/oe_whitelabel_helper/tests/src/Kernel/Plugin/better_exposed_filters/sort/FloatEndSortWidgetTest.php
index c3f9f358..cb33ad87 100644
--- a/modules/oe_whitelabel_helper/tests/src/Kernel/FloatEndSortWidgetTest.php
+++ b/modules/oe_whitelabel_helper/tests/src/Kernel/Plugin/better_exposed_filters/sort/FloatEndSortWidgetTest.php
@@ -2,7 +2,7 @@
 
 declare(strict_types = 1);
 
-namespace Drupal\Tests\oe_whitelabel_helper\Kernel;
+namespace Drupal\Tests\oe_whitelabel_helper\Kernel\Plugin\better_exposed_filters\sort;
 
 use Drupal\Tests\better_exposed_filters\Kernel\BetterExposedFiltersKernelTestBase;
 use Drupal\views\Views;
-- 
GitLab


From d38eb3e026f99e090fc035cea7c1b37a8ef4bca6 Mon Sep 17 00:00:00 2001
From: drishu <aszilagyi@live.com>
Date: Tue, 29 Mar 2022 10:41:16 +0300
Subject: [PATCH 33/54] OEL-486: Update facets summary test.

---
 tests/src/Functional/FacetsSummaryTest.php | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/tests/src/Functional/FacetsSummaryTest.php b/tests/src/Functional/FacetsSummaryTest.php
index 88f0e45a..80e14b6a 100644
--- a/tests/src/Functional/FacetsSummaryTest.php
+++ b/tests/src/Functional/FacetsSummaryTest.php
@@ -8,14 +8,16 @@ use Drupal\facets\Entity\Facet;
 use Drupal\facets_summary\Entity\FacetsSummary;
 use Drupal\Tests\facets\Functional\BlockTestTrait;
 use Drupal\Tests\facets\Functional\ExampleContentTrait;
+use Drupal\Tests\sparql_entity_storage\Traits\SparqlConnectionTrait;
 
 /**
  * Tests the Facets Summary rendering.
  */
 class FacetsSummaryTest extends WhitelabelBrowserTestBase {
 
-  use ExampleContentTrait;
   use BlockTestTrait;
+  use ExampleContentTrait;
+  use SparqlConnectionTrait;
 
   /**
    * {@inheritdoc}
@@ -32,6 +34,7 @@ class FacetsSummaryTest extends WhitelabelBrowserTestBase {
    */
   public function setUp(): void {
     parent::setUp();
+    $this->setUpSparql();
     $this->setUpExampleStructure();
     $this->insertExampleContent();
     $this->assertSame(5, $this->indexItems('database_search_index'));
@@ -68,8 +71,8 @@ class FacetsSummaryTest extends WhitelabelBrowserTestBase {
     $this->drupalGet('search-api-test-fulltext');
 
     $assert = $this->assertSession();
-    $assert->elementTextContains('css', 'h4.mb-4', $block->label());
-    $assert->elementTextContains('css', 'h4.mb-4 span.source-summary-count', '(5)');
+    $assert->elementTextContains('css', 'main h4', $block->label());
+    $assert->elementTextContains('css', 'span.source-summary-count', '(5)');
   }
 
 }
-- 
GitLab


From fbefb81c9366e2e5c7ee33d6f1ef797bbf7bcbd2 Mon Sep 17 00:00:00 2001
From: drishu <aszilagyi@live.com>
Date: Tue, 29 Mar 2022 11:03:59 +0300
Subject: [PATCH 34/54] OEL-486: Update icon in facets form test.

---
 tests/src/Kernel/FacetsFormTest.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/src/Kernel/FacetsFormTest.php b/tests/src/Kernel/FacetsFormTest.php
index 915bde04..17aba89c 100644
--- a/tests/src/Kernel/FacetsFormTest.php
+++ b/tests/src/Kernel/FacetsFormTest.php
@@ -111,7 +111,7 @@ class FacetsFormTest extends KernelTestBase {
     $this->assertSame('offcanvas', $button->attr('data-bs-toggle'));
     $this->assertStringContainsString('Facets form', $button->text());
     $icon = $button->filter('svg');
-    $this->assertStringContainsString('/assets/icons/bootstrap-icons.svg#filter', $icon->html());
+    $this->assertStringContainsString('/assets/icons/bcl-default-icons.svg#filter', $icon->html());
   }
 
 }
-- 
GitLab


From 9a9501ddf44ca1f4adea234b9be47c90a2831f6a Mon Sep 17 00:00:00 2001
From: drishu <aszilagyi@live.com>
Date: Mon, 25 Apr 2022 19:17:59 +0300
Subject: [PATCH 35/54] OEL-486: Improve FloatEndSort test class annotation.

---
 .../better_exposed_filters/sort/FloatEndSortWidgetTest.php    | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/modules/oe_whitelabel_helper/tests/src/Kernel/Plugin/better_exposed_filters/sort/FloatEndSortWidgetTest.php b/modules/oe_whitelabel_helper/tests/src/Kernel/Plugin/better_exposed_filters/sort/FloatEndSortWidgetTest.php
index cb33ad87..2b799fca 100644
--- a/modules/oe_whitelabel_helper/tests/src/Kernel/Plugin/better_exposed_filters/sort/FloatEndSortWidgetTest.php
+++ b/modules/oe_whitelabel_helper/tests/src/Kernel/Plugin/better_exposed_filters/sort/FloatEndSortWidgetTest.php
@@ -9,7 +9,9 @@ use Drupal\views\Views;
 use Symfony\Component\DomCrawler\Crawler;
 
 /**
- * Tests the FloatEndSort exposed form sort widget rendering.
+ * Tests theming of the "Float End Sort" widget for "better exposed filters".
+ *
+ * @coversDefaultClass \Drupal\oe_whitelabel_helper\Plugin\better_exposed_filters\sort\FloatEndSortWidget
  */
 class FloatEndSortWidgetTest extends BetterExposedFiltersKernelTestBase {
 
-- 
GitLab


From b6bbf18b50e38327a2692713f62c6bd919ad4a4c Mon Sep 17 00:00:00 2001
From: drishu <aszilagyi@live.com>
Date: Mon, 25 Apr 2022 19:18:53 +0300
Subject: [PATCH 36/54] OEL-486: Rename variables in tests for better accuracy.

---
 .../tests/src/Kernel/SearchBlockTest.php                  | 4 ++--
 tests/src/Kernel/AuthenticationBlockTest.php              | 4 ++--
 tests/src/Kernel/FacetsFormTest.php                       | 8 ++++----
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/modules/oe_whitelabel_search/tests/src/Kernel/SearchBlockTest.php b/modules/oe_whitelabel_search/tests/src/Kernel/SearchBlockTest.php
index cd3be37a..a55f26a1 100644
--- a/modules/oe_whitelabel_search/tests/src/Kernel/SearchBlockTest.php
+++ b/modules/oe_whitelabel_search/tests/src/Kernel/SearchBlockTest.php
@@ -85,10 +85,10 @@ class SearchBlockTest extends KernelTestBase {
    * Tests the rendering of the whitelabel search block.
    */
   public function testBlockRendering(): void {
-    $entity_type_manager = $this->container
+    $block_entity_storage = $this->container
       ->get('entity_type.manager')
       ->getStorage('block');
-    $entity = $entity_type_manager->create([
+    $entity = $block_entity_storage->create([
       'id' => 'whitelabel_search_block',
       'theme' => 'oe_whitelabel',
       'plugin' => 'whitelabel_search_block',
diff --git a/tests/src/Kernel/AuthenticationBlockTest.php b/tests/src/Kernel/AuthenticationBlockTest.php
index cc7c8bba..ccb23a16 100644
--- a/tests/src/Kernel/AuthenticationBlockTest.php
+++ b/tests/src/Kernel/AuthenticationBlockTest.php
@@ -43,10 +43,10 @@ class AuthenticationBlockTest extends KernelTestBase {
    * Tests the rendering of the authentication block.
    */
   public function testBlockRendering(): void {
-    $entity_type_manager = $this->container
+    $block_entity_storage = $this->container
       ->get('entity_type.manager')
       ->getStorage('block');
-    $entity = $entity_type_manager->load('oe_whitelabel_eulogin');
+    $entity = $block_entity_storage->load('oe_whitelabel_eulogin');
     $builder = \Drupal::entityTypeManager()->getViewBuilder('block');
     $build = $builder->view($entity, 'block');
     $render = $this->container->get('renderer')->renderRoot($build);
diff --git a/tests/src/Kernel/FacetsFormTest.php b/tests/src/Kernel/FacetsFormTest.php
index 17aba89c..2b7c17c5 100644
--- a/tests/src/Kernel/FacetsFormTest.php
+++ b/tests/src/Kernel/FacetsFormTest.php
@@ -66,10 +66,10 @@ class FacetsFormTest extends KernelTestBase {
    * Tests the rendering of the Facets Form block.
    */
   public function testBlockRendering(): void {
-    $entity_type_manager = $this->container
+    $block_entity_storage = $this->container
       ->get('entity_type.manager')
       ->getStorage('block');
-    $entity = $entity_type_manager->create([
+    $block = $block_entity_storage->create([
       'id' => 'whitelabel_facets_form_block',
       'theme' => 'oe_whitelabel',
       'plugin' => 'facets_form:search_api:views_page__search_api_test_view__page_1',
@@ -86,10 +86,10 @@ class FacetsFormTest extends KernelTestBase {
         'facets' => [],
       ],
     ]);
-    $entity->save();
+    $block->save();
 
     $builder = \Drupal::entityTypeManager()->getViewBuilder('block');
-    $build = $builder->view($entity, 'block');
+    $build = $builder->view($block, 'block');
     $html = (string) $this->container->get('renderer')->renderRoot($build);
     $crawler = new Crawler($html);
 
-- 
GitLab


From 078fed40420772aa200bcc2270292dd63507e3f7 Mon Sep 17 00:00:00 2001
From: drishu <aszilagyi@live.com>
Date: Mon, 25 Apr 2022 19:19:19 +0300
Subject: [PATCH 37/54] OEL-486: Separate code blocks with newlines.

---
 tests/src/Kernel/FacetsFormTest.php | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tests/src/Kernel/FacetsFormTest.php b/tests/src/Kernel/FacetsFormTest.php
index 2b7c17c5..6b98be66 100644
--- a/tests/src/Kernel/FacetsFormTest.php
+++ b/tests/src/Kernel/FacetsFormTest.php
@@ -101,15 +101,18 @@ class FacetsFormTest extends KernelTestBase {
     $button = $header->filter('button');
     $this->assertSame('offcanvas', $button->attr('data-bs-dismiss'));
     $this->assertSame('button', $button->attr('type'));
+
     $body = $offcanvas->filter('div.offcanvas-body.bcl-offcanvas');
     $this->assertCount(1, $body);
     $form = $body->filter('form.facets-form');
     $this->assertCount(1, $form);
+
     $button = $crawler->filter('button.btn-light.btn-lg');
     $this->assertSame('button', $button->attr('type'));
     $this->assertSame('#bcl-offcanvas', $button->attr('data-bs-target'));
     $this->assertSame('offcanvas', $button->attr('data-bs-toggle'));
     $this->assertStringContainsString('Facets form', $button->text());
+
     $icon = $button->filter('svg');
     $this->assertStringContainsString('/assets/icons/bcl-default-icons.svg#filter', $icon->html());
   }
-- 
GitLab


From 915354b7e8de213fd7c0c931818d52eb6fa52b50 Mon Sep 17 00:00:00 2001
From: escuriola <escuriola@gmail.com>
Date: Thu, 24 Mar 2022 17:26:56 +0100
Subject: [PATCH 38/54] OEL-1317: Improve navbar search form.

---
 .../src/Form/SearchForm.php                   |  4 +--
 ...block--oe-whitelabel-search-form.html.twig | 34 +++++++++++++++++++
 .../form--oe-whitelabel-search-form.html.twig |  2 +-
 .../tests/src/Kernel/SearchBlockTest.php      |  2 +-
 ...element--search-api-autocomplete.html.twig |  1 +
 .../Functional/CorporateHeaderLogosTest.php   |  8 ++---
 6 files changed, 43 insertions(+), 8 deletions(-)
 create mode 100644 modules/oe_whitelabel_search/templates/block--oe-whitelabel-search-form.html.twig

diff --git a/modules/oe_whitelabel_search/src/Form/SearchForm.php b/modules/oe_whitelabel_search/src/Form/SearchForm.php
index b6af8c45..5cc359bf 100644
--- a/modules/oe_whitelabel_search/src/Form/SearchForm.php
+++ b/modules/oe_whitelabel_search/src/Form/SearchForm.php
@@ -48,14 +48,14 @@ class SearchForm extends FormBase {
     $form_state->set('oe_whitelabel_search_config', $config);
     $input_value = '';
 
-    $form['#attributes']['class'][] = 'bcl_search_form';
+    $form['#attributes']['class'][] = 'd-flex mt-3 mt-lg-0';
 
     if (!empty($config['input']['name'])) {
       $input_value = $this->getRequest()->get($config['input']['name']);
     }
 
     $form['search_input'] = [
-      '#prefix' => '<div class="bcl-search-form__group">',
+      '#prefix' => '<div class="bcl-search-form__group w-100">',
       '#suffix' => '</div>',
       '#type' => 'textfield',
       '#title' => $config['input']['label'],
diff --git a/modules/oe_whitelabel_search/templates/block--oe-whitelabel-search-form.html.twig b/modules/oe_whitelabel_search/templates/block--oe-whitelabel-search-form.html.twig
new file mode 100644
index 00000000..0dafd890
--- /dev/null
+++ b/modules/oe_whitelabel_search/templates/block--oe-whitelabel-search-form.html.twig
@@ -0,0 +1,34 @@
+{#
+/**
+ * @file
+ * Override theme implementation to display block oe_whitelabel-search-form.
+ *
+ * Available variables:
+ * - plugin_id: The ID of the block implementation.
+ * - label: The configured label of the block if visible.
+ * - configuration: A list of the block's configuration values.
+ *   - label: The configured label for the block.
+ *   - label_display: The display settings for the label.
+ *   - provider: The module or other provider that provided this block plugin.
+ *   - Block plugin specific settings will also be stored here.
+ * - content: The content of this block.
+ * - attributes: array of HTML attributes populated by modules, intended to
+ *   be added to the main container tag of this template.
+ *   - id: A valid HTML ID and guaranteed unique.
+ * - title_attributes: Same as attributes, except applied to the main title
+ *   tag that appears in the template.
+ * - title_prefix: Additional output populated by modules, intended to be
+ *   displayed in front of the main title tag that appears in the template.
+ * - title_suffix: Additional output populated by modules, intended to be
+ *   displayed after the main title tag that appears in the template.
+ *
+ * @see template_preprocess_block()
+ *
+ * @ingroup themeable
+ */
+#}
+
+{% block content %}
+  {{ content }}
+{% endblock %}
+
diff --git a/modules/oe_whitelabel_search/templates/form--oe-whitelabel-search-form.html.twig b/modules/oe_whitelabel_search/templates/form--oe-whitelabel-search-form.html.twig
index c1b2c0d4..6ce4d555 100644
--- a/modules/oe_whitelabel_search/templates/form--oe-whitelabel-search-form.html.twig
+++ b/modules/oe_whitelabel_search/templates/form--oe-whitelabel-search-form.html.twig
@@ -12,6 +12,6 @@
  * @ingroup themeable
  */
 #}
-<form{{ attributes.addClass('d-flex', 'bcl-search-form', 'submittable') }}>
+<form{{ attributes.addClass('d-flex', 'mt-3', 'mt-lg-0', 'w-100', 'submittable') }}>
   {{ children }}
 </form>
diff --git a/modules/oe_whitelabel_search/tests/src/Kernel/SearchBlockTest.php b/modules/oe_whitelabel_search/tests/src/Kernel/SearchBlockTest.php
index a55f26a1..b5e5322b 100644
--- a/modules/oe_whitelabel_search/tests/src/Kernel/SearchBlockTest.php
+++ b/modules/oe_whitelabel_search/tests/src/Kernel/SearchBlockTest.php
@@ -127,7 +127,7 @@ class SearchBlockTest extends KernelTestBase {
     $this->assertCount(1, $block);
     $form = $block->filter('#oe-whitelabel-search-form');
     $this->assertCount(1, $form);
-    $this->assertSame('d-flex bcl-search-form submittable', $form->attr('class'));
+    $this->assertSame('d-flex mt-3 mt-lg-0 w-100 submittable', $form->attr('class'));
     // Assert the field wrapper rendering.
     $wrapper = $form->filter('.bcl-search-form__group');
     $this->assertCount(1, $wrapper);
diff --git a/templates/overrides/search/form-element--search-api-autocomplete.html.twig b/templates/overrides/search/form-element--search-api-autocomplete.html.twig
index 046ac772..c4b1ca1a 100644
--- a/templates/overrides/search/form-element--search-api-autocomplete.html.twig
+++ b/templates/overrides/search/form-element--search-api-autocomplete.html.twig
@@ -48,6 +48,7 @@
 #}
 {%
   set classes = [
+  'w-100',
   'js-form-item',
   'form-item',
   'js-form-type-' ~ type|clean_class,
diff --git a/tests/src/Functional/CorporateHeaderLogosTest.php b/tests/src/Functional/CorporateHeaderLogosTest.php
index 5a024044..c3db2695 100644
--- a/tests/src/Functional/CorporateHeaderLogosTest.php
+++ b/tests/src/Functional/CorporateHeaderLogosTest.php
@@ -57,14 +57,14 @@ class CorporateHeaderLogosTest extends WhitelabelBrowserTestBase {
     $this->drupalGet('<front>');
 
     $assert_session->elementExists('css', 'header.bcl-header.bcl-header--eu');
-    $assert_session->elementExists('css', 'header > nav > div > div > a[href="https://european-union.europa.eu/index_en"]');
+    $assert_session->elementExists('css', 'header > nav > div > a[href="https://european-union.europa.eu/index_en"]');
     $assert_session->elementExists('css', 'picture > source[srcset="/build/themes/contrib/oe_bootstrap_theme/assets/logos/eu/mobile/logo-eu--en.svg"]');
     $assert_session->elementExists('css', 'picture > img[src="/build/themes/contrib/oe_bootstrap_theme/assets/logos/eu/logo-eu--en.svg"]');
 
     $this->drupalGet('es/');
 
     $assert_session->elementExists('css', 'header.bcl-header.bcl-header--eu');
-    $assert_session->elementExists('css', 'header > nav > div > div > a[href="https://european-union.europa.eu/index_es"]');
+    $assert_session->elementExists('css', 'header > nav > div > a[href="https://european-union.europa.eu/index_es"]');
     $assert_session->elementExists('css', 'picture > source[srcset="/build/themes/contrib/oe_bootstrap_theme/assets/logos/eu/mobile/logo-eu--es.svg"]');
     $assert_session->elementExists('css', 'picture > img[src="/build/themes/contrib/oe_bootstrap_theme/assets/logos/eu/logo-eu--es.svg"]');
 
@@ -75,12 +75,12 @@ class CorporateHeaderLogosTest extends WhitelabelBrowserTestBase {
 
     $this->drupalGet('<front>');
     $assert_session->elementExists('css', 'header.bcl-header.bcl-header--ec');
-    $assert_session->elementExists('css', 'header > nav > div > div > a[href="https://ec.europa.eu/info/index_en"]');
+    $assert_session->elementExists('css', 'header > nav > div > a[href="https://ec.europa.eu/info/index_en"]');
     $assert_session->elementExists('css', 'img[src="/build/themes/contrib/oe_bootstrap_theme/assets/logos/ec/logo-ec--en.svg"]');
 
     $this->drupalGet('es/');
     $assert_session->elementExists('css', 'header.bcl-header.bcl-header--ec');
-    $assert_session->elementExists('css', 'header > nav > div > div > a[href="https://ec.europa.eu/info/index_es"]');
+    $assert_session->elementExists('css', 'header > nav > div > a[href="https://ec.europa.eu/info/index_es"]');
     $assert_session->elementExists('css', 'img[src="/build/themes/contrib/oe_bootstrap_theme/assets/logos/ec/logo-ec--es.svg"]');
   }
 
-- 
GitLab


From 2c28a407f92adb995a8a3080e0b3642ef452c2c0 Mon Sep 17 00:00:00 2001
From: escuriola <escuriola@gmail.com>
Date: Tue, 29 Mar 2022 13:18:57 +0200
Subject: [PATCH 39/54] OEL-1317: Refactor. Remove extra classes.

---
 modules/oe_whitelabel_search/src/Form/SearchForm.php            | 2 --
 .../templates/form--oe-whitelabel-search-form.html.twig         | 2 +-
 .../search/form-element--search-api-autocomplete.html.twig      | 1 -
 3 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/modules/oe_whitelabel_search/src/Form/SearchForm.php b/modules/oe_whitelabel_search/src/Form/SearchForm.php
index 5cc359bf..4dd36f65 100644
--- a/modules/oe_whitelabel_search/src/Form/SearchForm.php
+++ b/modules/oe_whitelabel_search/src/Form/SearchForm.php
@@ -48,8 +48,6 @@ class SearchForm extends FormBase {
     $form_state->set('oe_whitelabel_search_config', $config);
     $input_value = '';
 
-    $form['#attributes']['class'][] = 'd-flex mt-3 mt-lg-0';
-
     if (!empty($config['input']['name'])) {
       $input_value = $this->getRequest()->get($config['input']['name']);
     }
diff --git a/modules/oe_whitelabel_search/templates/form--oe-whitelabel-search-form.html.twig b/modules/oe_whitelabel_search/templates/form--oe-whitelabel-search-form.html.twig
index 6ce4d555..74d42158 100644
--- a/modules/oe_whitelabel_search/templates/form--oe-whitelabel-search-form.html.twig
+++ b/modules/oe_whitelabel_search/templates/form--oe-whitelabel-search-form.html.twig
@@ -12,6 +12,6 @@
  * @ingroup themeable
  */
 #}
-<form{{ attributes.addClass('d-flex', 'mt-3', 'mt-lg-0', 'w-100', 'submittable') }}>
+<form{{ attributes.addClass('d-flex', 'mt-3', 'mt-lg-0', 'submittable') }}>
   {{ children }}
 </form>
diff --git a/templates/overrides/search/form-element--search-api-autocomplete.html.twig b/templates/overrides/search/form-element--search-api-autocomplete.html.twig
index c4b1ca1a..046ac772 100644
--- a/templates/overrides/search/form-element--search-api-autocomplete.html.twig
+++ b/templates/overrides/search/form-element--search-api-autocomplete.html.twig
@@ -48,7 +48,6 @@
 #}
 {%
   set classes = [
-  'w-100',
   'js-form-item',
   'form-item',
   'js-form-type-' ~ type|clean_class,
-- 
GitLab


From 1abbb521d444a3cdd1d78ab25df77e0ea4ce2afd Mon Sep 17 00:00:00 2001
From: escuriola <escuriola@gmail.com>
Date: Wed, 13 Apr 2022 13:59:15 +0200
Subject: [PATCH 40/54] OEL-1317: Update diff patch with branch.

---
 composer.json | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/composer.json b/composer.json
index 28266bee..10df1b25 100644
--- a/composer.json
+++ b/composer.json
@@ -82,6 +82,11 @@
                 }
             }
         },
+        "patches": {
+            "openeuropa/oe_bootstrap_theme": {
+                "latest": "https://github.com/openeuropa/oe_bootstrap_theme/compare/0.1.202204221756..OEL-1317.diff"
+            }
+        },
         "drupal-scaffold": {
             "locations": {
                 "web-root": "./build"
-- 
GitLab


From 51df8fd12b8b367084632439377b47bf67af4779 Mon Sep 17 00:00:00 2001
From: escuriola <escuriola@gmail.com>
Date: Wed, 13 Apr 2022 13:59:28 +0200
Subject: [PATCH 41/54] OEL-1317: Fixing tests.

---
 .../oe_whitelabel_search/tests/src/Kernel/SearchBlockTest.php   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/oe_whitelabel_search/tests/src/Kernel/SearchBlockTest.php b/modules/oe_whitelabel_search/tests/src/Kernel/SearchBlockTest.php
index b5e5322b..2aa8cff4 100644
--- a/modules/oe_whitelabel_search/tests/src/Kernel/SearchBlockTest.php
+++ b/modules/oe_whitelabel_search/tests/src/Kernel/SearchBlockTest.php
@@ -127,7 +127,7 @@ class SearchBlockTest extends KernelTestBase {
     $this->assertCount(1, $block);
     $form = $block->filter('#oe-whitelabel-search-form');
     $this->assertCount(1, $form);
-    $this->assertSame('d-flex mt-3 mt-lg-0 w-100 submittable', $form->attr('class'));
+    $this->assertSame('d-flex mt-3 mt-lg-0 submittable', $form->attr('class'));
     // Assert the field wrapper rendering.
     $wrapper = $form->filter('.bcl-search-form__group');
     $this->assertCount(1, $wrapper);
-- 
GitLab


From 7902ed5bcbbceacd4f3089e6f0261ee48cfdd202 Mon Sep 17 00:00:00 2001
From: escuriola <escuriola@gmail.com>
Date: Tue, 19 Apr 2022 09:24:07 +0200
Subject: [PATCH 42/54] OEL-1317: Remove submittable class.

---
 .../templates/form--oe-whitelabel-search-form.html.twig         | 2 +-
 .../oe_whitelabel_search/tests/src/Kernel/SearchBlockTest.php   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/oe_whitelabel_search/templates/form--oe-whitelabel-search-form.html.twig b/modules/oe_whitelabel_search/templates/form--oe-whitelabel-search-form.html.twig
index 74d42158..28e3182f 100644
--- a/modules/oe_whitelabel_search/templates/form--oe-whitelabel-search-form.html.twig
+++ b/modules/oe_whitelabel_search/templates/form--oe-whitelabel-search-form.html.twig
@@ -12,6 +12,6 @@
  * @ingroup themeable
  */
 #}
-<form{{ attributes.addClass('d-flex', 'mt-3', 'mt-lg-0', 'submittable') }}>
+<form{{ attributes.addClass('d-flex', 'mt-3', 'mt-lg-0') }}>
   {{ children }}
 </form>
diff --git a/modules/oe_whitelabel_search/tests/src/Kernel/SearchBlockTest.php b/modules/oe_whitelabel_search/tests/src/Kernel/SearchBlockTest.php
index 2aa8cff4..4fca8c00 100644
--- a/modules/oe_whitelabel_search/tests/src/Kernel/SearchBlockTest.php
+++ b/modules/oe_whitelabel_search/tests/src/Kernel/SearchBlockTest.php
@@ -127,7 +127,7 @@ class SearchBlockTest extends KernelTestBase {
     $this->assertCount(1, $block);
     $form = $block->filter('#oe-whitelabel-search-form');
     $this->assertCount(1, $form);
-    $this->assertSame('d-flex mt-3 mt-lg-0 submittable', $form->attr('class'));
+    $this->assertSame('d-flex mt-3 mt-lg-0', $form->attr('class'));
     // Assert the field wrapper rendering.
     $wrapper = $form->filter('.bcl-search-form__group');
     $this->assertCount(1, $wrapper);
-- 
GitLab


From ebd89a4abac72473e976a9324885a92e295a4c00 Mon Sep 17 00:00:00 2001
From: escuriola <escuriola@gmail.com>
Date: Tue, 19 Apr 2022 09:45:48 +0200
Subject: [PATCH 43/54] OEL-1317: Add region to navbar right.

---
 .../navigation/region--navbar-right.html.twig          | 10 ++++++++++
 1 file changed, 10 insertions(+)
 create mode 100644 templates/overrides/navigation/region--navbar-right.html.twig

diff --git a/templates/overrides/navigation/region--navbar-right.html.twig b/templates/overrides/navigation/region--navbar-right.html.twig
new file mode 100644
index 00000000..5bee15e3
--- /dev/null
+++ b/templates/overrides/navigation/region--navbar-right.html.twig
@@ -0,0 +1,10 @@
+{#
+/**
+ * @see template_preprocess_region()
+ */
+#}
+{% if content %}
+  <div class="nav">
+    {{ content }}
+  </div>
+{% endif %}
-- 
GitLab


From 3f4526bee79793346e699c0a254e8c985cbe52d7 Mon Sep 17 00:00:00 2001
From: escuriola <escuriola@gmail.com>
Date: Tue, 19 Apr 2022 09:46:26 +0200
Subject: [PATCH 44/54] OEL-1317: Move search templates.

---
 ...block--oe-whitelabel-search-form.html.twig | 34 -------------------
 .../form--oe-whitelabel-search-form.html.twig | 17 ----------
 .../block--system-branding-block.html.twig    |  2 +-
 .../navigation/region--navbar-right.html.twig |  6 ++--
 ...block--oe-whitelabel-search-form.html.twig | 12 +++++++
 .../form--oe-whitelabel-search-form.html.twig | 10 ++++++
 6 files changed, 27 insertions(+), 54 deletions(-)
 delete mode 100644 modules/oe_whitelabel_search/templates/block--oe-whitelabel-search-form.html.twig
 delete mode 100644 modules/oe_whitelabel_search/templates/form--oe-whitelabel-search-form.html.twig
 create mode 100644 templates/search/block--oe-whitelabel-search-form.html.twig
 create mode 100644 templates/search/form--oe-whitelabel-search-form.html.twig

diff --git a/modules/oe_whitelabel_search/templates/block--oe-whitelabel-search-form.html.twig b/modules/oe_whitelabel_search/templates/block--oe-whitelabel-search-form.html.twig
deleted file mode 100644
index 0dafd890..00000000
--- a/modules/oe_whitelabel_search/templates/block--oe-whitelabel-search-form.html.twig
+++ /dev/null
@@ -1,34 +0,0 @@
-{#
-/**
- * @file
- * Override theme implementation to display block oe_whitelabel-search-form.
- *
- * Available variables:
- * - plugin_id: The ID of the block implementation.
- * - label: The configured label of the block if visible.
- * - configuration: A list of the block's configuration values.
- *   - label: The configured label for the block.
- *   - label_display: The display settings for the label.
- *   - provider: The module or other provider that provided this block plugin.
- *   - Block plugin specific settings will also be stored here.
- * - content: The content of this block.
- * - attributes: array of HTML attributes populated by modules, intended to
- *   be added to the main container tag of this template.
- *   - id: A valid HTML ID and guaranteed unique.
- * - title_attributes: Same as attributes, except applied to the main title
- *   tag that appears in the template.
- * - title_prefix: Additional output populated by modules, intended to be
- *   displayed in front of the main title tag that appears in the template.
- * - title_suffix: Additional output populated by modules, intended to be
- *   displayed after the main title tag that appears in the template.
- *
- * @see template_preprocess_block()
- *
- * @ingroup themeable
- */
-#}
-
-{% block content %}
-  {{ content }}
-{% endblock %}
-
diff --git a/modules/oe_whitelabel_search/templates/form--oe-whitelabel-search-form.html.twig b/modules/oe_whitelabel_search/templates/form--oe-whitelabel-search-form.html.twig
deleted file mode 100644
index 28e3182f..00000000
--- a/modules/oe_whitelabel_search/templates/form--oe-whitelabel-search-form.html.twig
+++ /dev/null
@@ -1,17 +0,0 @@
-{#
-/**
- * @file
- * Template for a 'form' element.
- *
- * Available variables
- * - attributes: A list of HTML attributes for the wrapper element.
- * - children: The child elements of the form.
- *
- * @see template_preprocess_form()
- *
- * @ingroup themeable
- */
-#}
-<form{{ attributes.addClass('d-flex', 'mt-3', 'mt-lg-0') }}>
-  {{ children }}
-</form>
diff --git a/templates/overrides/navigation/block--system-branding-block.html.twig b/templates/overrides/navigation/block--system-branding-block.html.twig
index a3755bcb..31f8491a 100644
--- a/templates/overrides/navigation/block--system-branding-block.html.twig
+++ b/templates/overrides/navigation/block--system-branding-block.html.twig
@@ -26,7 +26,7 @@
             </a>
           {% endif %}
           {% if site_name is not empty %}
-            <div class="bcl-header__site-name site-name{{ bcl_component_library == 'neutral' ? ' h5 d-inline-block d-lg-none' }}">
+            <div class="bcl-header__site-name ps-0 site-name{{ bcl_component_library == 'neutral' ? ' h5 d-inline-block d-lg-none' }}">
               <a class="text-decoration-none align-bottom bcl-header__site-name mw-100"
                  href="{{ path('<front>') }}">
                 {{ site_name }}
diff --git a/templates/overrides/navigation/region--navbar-right.html.twig b/templates/overrides/navigation/region--navbar-right.html.twig
index 5bee15e3..9b47a83e 100644
--- a/templates/overrides/navigation/region--navbar-right.html.twig
+++ b/templates/overrides/navigation/region--navbar-right.html.twig
@@ -1,7 +1,9 @@
 {#
 /**
- * @see template_preprocess_region()
- */
+ * @file
+ * Theme override to display the navbar right region.
+ *
+ * @see ./core/themes/stable/templates/layout/region.html.twig
 #}
 {% if content %}
   <div class="nav">
diff --git a/templates/search/block--oe-whitelabel-search-form.html.twig b/templates/search/block--oe-whitelabel-search-form.html.twig
new file mode 100644
index 00000000..acf4786f
--- /dev/null
+++ b/templates/search/block--oe-whitelabel-search-form.html.twig
@@ -0,0 +1,12 @@
+{#
+/**
+ * @file
+ * Theme override for the search box block.
+ *
+ * @see ./core/modules/system/templates/block.html.twig
+ */
+#}
+{% block content %}
+  {{ content }}
+{% endblock %}
+
diff --git a/templates/search/form--oe-whitelabel-search-form.html.twig b/templates/search/form--oe-whitelabel-search-form.html.twig
new file mode 100644
index 00000000..f11d99ca
--- /dev/null
+++ b/templates/search/form--oe-whitelabel-search-form.html.twig
@@ -0,0 +1,10 @@
+{#
+/**
+ * @file
+ * Theme override for a 'form' element.
+ * @see ./core/themes/stable/templates/form/form.html.twig
+ */
+#}
+<form{{ attributes.addClass('d-flex', 'mt-3', 'mt-lg-0') }}>
+  {{ children }}
+</form>
-- 
GitLab


From a40cdd1b68bb0c5b0c2ad3087a6df94dabfbb0e5 Mon Sep 17 00:00:00 2001
From: escuriola <escuriola@gmail.com>
Date: Tue, 26 Apr 2022 10:30:44 +0200
Subject: [PATCH 45/54] OEL-1317: Rename region template.

---
 ...egion--navbar-right.html.twig => region--header-top.html.twig} | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 rename templates/overrides/navigation/{region--navbar-right.html.twig => region--header-top.html.twig} (100%)

diff --git a/templates/overrides/navigation/region--navbar-right.html.twig b/templates/overrides/navigation/region--header-top.html.twig
similarity index 100%
rename from templates/overrides/navigation/region--navbar-right.html.twig
rename to templates/overrides/navigation/region--header-top.html.twig
-- 
GitLab


From 8ec5542a951104988a7f4bab5c2dbc9ff25658e2 Mon Sep 17 00:00:00 2001
From: escuriola <escuriola@gmail.com>
Date: Tue, 26 Apr 2022 18:01:06 +0200
Subject: [PATCH 46/54] OEL-1317: Remove extra line.

---
 templates/search/block--oe-whitelabel-search-form.html.twig | 1 -
 1 file changed, 1 deletion(-)

diff --git a/templates/search/block--oe-whitelabel-search-form.html.twig b/templates/search/block--oe-whitelabel-search-form.html.twig
index acf4786f..fde06a88 100644
--- a/templates/search/block--oe-whitelabel-search-form.html.twig
+++ b/templates/search/block--oe-whitelabel-search-form.html.twig
@@ -9,4 +9,3 @@
 {% block content %}
   {{ content }}
 {% endblock %}
-
-- 
GitLab


From ea64ede2bd8bd9e27309e6d45d9765b0d4100602 Mon Sep 17 00:00:00 2001
From: escuriola <escuriola@gmail.com>
Date: Mon, 2 May 2022 11:23:12 +0200
Subject: [PATCH 47/54] OEL-1317: Bring 1.x branch updates.

---
 composer.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/composer.json b/composer.json
index 10df1b25..69150254 100644
--- a/composer.json
+++ b/composer.json
@@ -84,7 +84,7 @@
         },
         "patches": {
             "openeuropa/oe_bootstrap_theme": {
-                "latest": "https://github.com/openeuropa/oe_bootstrap_theme/compare/0.1.202204221756..OEL-1317.diff"
+                "latest": "https://github.com/openeuropa/oe_bootstrap_theme/compare/0.1.202204221756..1.x.diff"
             }
         },
         "drupal-scaffold": {
-- 
GitLab


From ca24052f24e6744af9b0d89371abab32743ebcd8 Mon Sep 17 00:00:00 2001
From: Andreas Hennings <andreas@dqxtech.net>
Date: Thu, 5 May 2022 10:40:14 +0200
Subject: [PATCH 48/54] OEL-0000: Fix remote_stream_wrapper version to 1.5.0
 temporarily.

---
 composer.json | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/composer.json b/composer.json
index 69150254..5d473864 100644
--- a/composer.json
+++ b/composer.json
@@ -25,6 +25,7 @@
         "drupal/file_link": "^2.0.6",
         "drupal/facets_form": "1.0.0-alpha2",
         "drupal/pathauto": "^1.8",
+        "drupal/remote_stream_wrapper": "1.5.0",
         "drupal/search_api": "^1.21",
         "drupal/search_api_autocomplete": "^1.5",
         "drupal/token": "^1.10",
@@ -96,6 +97,7 @@
             "Explicit minimum version requirement of drupal/ctools module due to D9.2 compatibility.",
             "Explicit requirement for drupal/file_link due to https://www.drupal.org/project/file_link/issues/3147517. It can be removed when oe_starter_content requires oe_media version 1.15.0 or above.",
             "Explicit requirement for drupal/pathauto due to D9.2 compatibility according to https://www.drupal.org/node/2979476.",
+            "Explicit fixed version for drupal/remote_stream_wrapper until new release of openeuropa/media_avportal.",
             "Explicit requirement for egulias/email-validator due to https://www.drupal.org/project/drupal/issues/3061074#comment-14300579. It can be removed when Drupal core 9.2 support is droppped.",
             "Explicit requirement for league/csv due to PHP 8.0 compatibility",
             "Explicit minimum version requirement for symfony/dom-crawler due to its lower versions using the deprecated function libxml_disable_entity_loader() in PHP8.",
-- 
GitLab


From 1bf0d2b0036e4523c5889479e1686c4389fc875b Mon Sep 17 00:00:00 2001
From: Andreas Hennings <andreas@dqxtech.net>
Date: Thu, 5 May 2022 17:46:21 +0200
Subject: [PATCH 49/54] OEL-0000: Remove explicit version requirement for
 drupal/remote_stream_wrapper.

The package is needed for media_avportal.
The explicit version was needed to prevent the package to be upgraded to 1.6, where a patch from media_avportal would no longer apply.

Now a new version of media_avportal has been released, which requires drupal/remote_stream_wrapper:^2.0, and no longer attempts to patch it. Therefore the explicit version is no longer needed.
---
 composer.json | 2 --
 1 file changed, 2 deletions(-)

diff --git a/composer.json b/composer.json
index 5d473864..69150254 100644
--- a/composer.json
+++ b/composer.json
@@ -25,7 +25,6 @@
         "drupal/file_link": "^2.0.6",
         "drupal/facets_form": "1.0.0-alpha2",
         "drupal/pathauto": "^1.8",
-        "drupal/remote_stream_wrapper": "1.5.0",
         "drupal/search_api": "^1.21",
         "drupal/search_api_autocomplete": "^1.5",
         "drupal/token": "^1.10",
@@ -97,7 +96,6 @@
             "Explicit minimum version requirement of drupal/ctools module due to D9.2 compatibility.",
             "Explicit requirement for drupal/file_link due to https://www.drupal.org/project/file_link/issues/3147517. It can be removed when oe_starter_content requires oe_media version 1.15.0 or above.",
             "Explicit requirement for drupal/pathauto due to D9.2 compatibility according to https://www.drupal.org/node/2979476.",
-            "Explicit fixed version for drupal/remote_stream_wrapper until new release of openeuropa/media_avportal.",
             "Explicit requirement for egulias/email-validator due to https://www.drupal.org/project/drupal/issues/3061074#comment-14300579. It can be removed when Drupal core 9.2 support is droppped.",
             "Explicit requirement for league/csv due to PHP 8.0 compatibility",
             "Explicit minimum version requirement for symfony/dom-crawler due to its lower versions using the deprecated function libxml_disable_entity_loader() in PHP8.",
-- 
GitLab


From 78f74adfff7b61377e7ac05f692ae1a51ed8de00 Mon Sep 17 00:00:00 2001
From: Andreas Hennings <andreas@dqxtech.net>
Date: Tue, 3 May 2022 23:09:43 +0200
Subject: [PATCH 50/54] OEL-1525: Define default config for SearchBlock.

---
 .../src/Plugin/Block/SearchBlock.php          | 35 ++++++++++++++++---
 1 file changed, 31 insertions(+), 4 deletions(-)

diff --git a/modules/oe_whitelabel_search/src/Plugin/Block/SearchBlock.php b/modules/oe_whitelabel_search/src/Plugin/Block/SearchBlock.php
index 08c2e404..1c6d5ece 100644
--- a/modules/oe_whitelabel_search/src/Plugin/Block/SearchBlock.php
+++ b/modules/oe_whitelabel_search/src/Plugin/Block/SearchBlock.php
@@ -85,6 +85,33 @@ class SearchBlock extends BlockBase implements ContainerFactoryPluginInterface {
     );
   }
 
+  /**
+   * {@inheritdoc}
+   */
+  public function defaultConfiguration() {
+    // Most of these placeholder values must be overwritten in the block
+    // creation form.
+    return [
+      'form' => [
+        'action' => '',
+      ],
+      'input' => [
+        'name' => '',
+        'label' => '',
+        'classes' => '',
+        'placeholder' => $this->t('Search'),
+      ],
+      'button' => [
+        'classes' => '',
+      ],
+      'view_options' => [
+        'enable_autocomplete' => FALSE,
+        'id' => '',
+        'display' => '',
+      ],
+    ];
+  }
+
   /**
    * {@inheritdoc}
    */
@@ -130,7 +157,7 @@ class SearchBlock extends BlockBase implements ContainerFactoryPluginInterface {
       '#type' => 'textfield',
       '#title' => $this->t('Input placeholder text'),
       '#description' => $this->t('The placeholder that will be shown inside the input field.'),
-      '#default_value' => $config['input']['placeholder'] ?? $this->t('Search'),
+      '#default_value' => $config['input']['placeholder'],
     ];
     $form['button'] = [
       '#type' => 'details',
@@ -148,7 +175,7 @@ class SearchBlock extends BlockBase implements ContainerFactoryPluginInterface {
     $form['enable_autocomplete'] = [
       '#type' => 'checkbox',
       '#title' => $this->t('Enable autocomplete'),
-      '#default_value' => $config['view_options']['enable_autocomplete'] ?? 0,
+      '#default_value' => $config['view_options']['enable_autocomplete'],
     ];
 
     if (!$this->moduleHandler->moduleExists('views') || !$this->moduleHandler->moduleExists('search_api_autocomplete')) {
@@ -162,7 +189,7 @@ class SearchBlock extends BlockBase implements ContainerFactoryPluginInterface {
       '#type' => 'textfield',
       '#title' => $this->t('View id'),
       '#description' => $this->t('The view id will be the machine name for the view.'),
-      '#default_value' => $config['view_options']['id'] ?? '',
+      '#default_value' => $config['view_options']['id'],
       '#states' => [
         'visible' => [
           ':input[name="settings[enable_autocomplete]"]' => ['checked' => TRUE],
@@ -173,7 +200,7 @@ class SearchBlock extends BlockBase implements ContainerFactoryPluginInterface {
       '#type' => 'textfield',
       '#title' => $this->t('View display'),
       '#description' => $this->t('The view display will be the machine name of the views display.'),
-      '#default_value' => $config['view_options']['display'] ?? '',
+      '#default_value' => $config['view_options']['display'],
       '#states' => [
         'visible' => [
           ':input[name="settings[enable_autocomplete]"]' => ['checked' => TRUE],
-- 
GitLab


From 9239386a998c1a23e448951de986b54f06d5e43e Mon Sep 17 00:00:00 2001
From: Andreas Hennings <andreas@dqxtech.net>
Date: Tue, 3 May 2022 23:20:52 +0200
Subject: [PATCH 51/54] OEL-1525: Make view id and display id required if
 autocomplete is checked.

---
 .../oe_whitelabel_search/src/Plugin/Block/SearchBlock.php   | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/modules/oe_whitelabel_search/src/Plugin/Block/SearchBlock.php b/modules/oe_whitelabel_search/src/Plugin/Block/SearchBlock.php
index 1c6d5ece..ef89ccbe 100644
--- a/modules/oe_whitelabel_search/src/Plugin/Block/SearchBlock.php
+++ b/modules/oe_whitelabel_search/src/Plugin/Block/SearchBlock.php
@@ -194,6 +194,9 @@ class SearchBlock extends BlockBase implements ContainerFactoryPluginInterface {
         'visible' => [
           ':input[name="settings[enable_autocomplete]"]' => ['checked' => TRUE],
         ],
+        'required' => [
+          ':input[name="settings[enable_autocomplete]"]' => ['checked' => TRUE],
+        ],
       ],
     ];
     $form['view_display'] = [
@@ -205,6 +208,9 @@ class SearchBlock extends BlockBase implements ContainerFactoryPluginInterface {
         'visible' => [
           ':input[name="settings[enable_autocomplete]"]' => ['checked' => TRUE],
         ],
+        'required' => [
+          ':input[name="settings[enable_autocomplete]"]' => ['checked' => TRUE],
+        ],
       ],
     ];
 
-- 
GitLab


From abb0d87054fa1f6ebb3f17dfa8aabf2e40578e06 Mon Sep 17 00:00:00 2001
From: Andreas Hennings <andreas@dqxtech.net>
Date: Tue, 3 May 2022 23:21:37 +0200
Subject: [PATCH 52/54] OEL-1525: Abort validation if view is not found, to
 prevent error.

---
 modules/oe_whitelabel_search/src/Plugin/Block/SearchBlock.php | 1 +
 1 file changed, 1 insertion(+)

diff --git a/modules/oe_whitelabel_search/src/Plugin/Block/SearchBlock.php b/modules/oe_whitelabel_search/src/Plugin/Block/SearchBlock.php
index ef89ccbe..ba8e470d 100644
--- a/modules/oe_whitelabel_search/src/Plugin/Block/SearchBlock.php
+++ b/modules/oe_whitelabel_search/src/Plugin/Block/SearchBlock.php
@@ -273,6 +273,7 @@ class SearchBlock extends BlockBase implements ContainerFactoryPluginInterface {
 
     if (!$view) {
       $form_state->setErrorByName('view_id', $this->t('View id was not found.'));
+      return;
     }
 
     if (!$view->getDisplay($values['view_display'])) {
-- 
GitLab


From 75502a693ccec84f08285855af286b0af5848282 Mon Sep 17 00:00:00 2001
From: Andreas Hennings <andreas@dqxtech.net>
Date: Wed, 4 May 2022 11:16:04 +0200
Subject: [PATCH 53/54] OEL-1536: Send additional parameter to ConfigImporter.

---
 .../oe_whitelabel_paragraphs/oe_whitelabel_paragraphs.install   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/oe_whitelabel_paragraphs/oe_whitelabel_paragraphs.install b/modules/oe_whitelabel_paragraphs/oe_whitelabel_paragraphs.install
index 5d300a8f..c0204cc3 100644
--- a/modules/oe_whitelabel_paragraphs/oe_whitelabel_paragraphs.install
+++ b/modules/oe_whitelabel_paragraphs/oe_whitelabel_paragraphs.install
@@ -70,7 +70,7 @@ function _oe_whitelabel_paragraphs_install_config(): void {
     'field.field.paragraph.oe_social_media_follow.field_oe_social_media_variant',
   ];
 
-  ConfigImporter::importMultiple('oe_whitelabel_paragraphs', '/config/overrides/', $configs);
+  ConfigImporter::importMultiple('module', 'oe_whitelabel_paragraphs', '/config/overrides/', $configs);
 }
 
 /**
-- 
GitLab


From 61e6940fd07f5a5647d172e36b71e194177f01a6 Mon Sep 17 00:00:00 2001
From: Andreas Hennings <andreas@dqxtech.net>
Date: Tue, 10 May 2022 18:01:45 +0200
Subject: [PATCH 54/54] OEL-1293: Pass additional argument to
 ConfigImporter::importMultiple().

---
 .../oe_whitelabel_extra_project.install                         | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/oe_whitelabel_extra_project/oe_whitelabel_extra_project.install b/modules/oe_whitelabel_extra_project/oe_whitelabel_extra_project.install
index 7b2e1b67..782c6ebd 100644
--- a/modules/oe_whitelabel_extra_project/oe_whitelabel_extra_project.install
+++ b/modules/oe_whitelabel_extra_project/oe_whitelabel_extra_project.install
@@ -26,5 +26,5 @@ function oe_whitelabel_extra_project_install($is_syncing): void {
     'core.entity_view_display.oe_organisation.oe_cx_project_stakeholder.default',
   ];
 
-  ConfigImporter::importMultiple('oe_whitelabel_extra_project', '/config/overrides/', $configs);
+  ConfigImporter::importMultiple('module', 'oe_whitelabel_extra_project', '/config/overrides/', $configs);
 }
-- 
GitLab