From b68fd18fe715d53f7efb71b1b191fe36a3badd6c Mon Sep 17 00:00:00 2001 From: Joachim Valdemar Yde <joachim.git@cern.ch> Date: Tue, 30 Nov 2021 15:53:02 +0100 Subject: [PATCH] Update deprecated 'replace' function in .twig --- CHANGELOG.md | 17 ++++---- cern_components.info.yml | 2 +- composer.json | 60 +++++++++++++++------------- patterns/molecules/row/row.html.twig | 2 +- 4 files changed, 44 insertions(+), 37 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b98b6a1e..6316a9c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,19 +1,28 @@ # Changelog + All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2.7.14] - 30/21/2021 + +- Update deprecated `replace` function in `.twig` + ## [2.7.13] - 8/02/2021 + - Remove deprecated functions of D9 (module passes d9-readiness scan) ## [2.7.12] - 8/02/2021 + - Add core: 8.x to fix enabling issue ## [2.7.11] - 14/01/2021 + - Modify composer to require Components 2.x for D9 ## [2.7.10] - 14/01/2021 + - Update module to be D9-ready ## [2.7.9] - 12/01/2021 @@ -109,13 +118,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fixed issue of mega menu not working on specific versions of IE - ## [2.5.0] - 25/04/2019 - Fixed issue of plus/minus signs in FAQ-list pattern - Fixed issue of active trail in 2nd level menu - ## [2.4.0] - 26/02/2019 - Fixed issue of Preview Card styling not loading on Preview List @@ -124,14 +131,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Added text-shadow on Preview Cards' elements - Removed top margin from Preview List component - ## [2.3.2] - 31/01/2019 - Fixed issue of video resources are displayed very slim ## [2.3.1] - 30/01/2019 -- Decreased the number of permitted chars for Preview cards from 65 to 45 +- Decreased the number of permitted chars for Preview cards from 65 to 45 ## [2.3.0] - 21/01/2019 @@ -139,7 +145,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fixed issue og Preview cards overflowing under mega menu - Added text shadow for Hero Frames titles and subtitles - ## [2.2.2] - 16/01/2019 - Fixed overflowing text in Preview Cards when the card had icon @@ -148,7 +153,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Added styling for "+More" link in mega menu - ## [2.2.0] - 06/12/2018 - Fixed FAQ List pattern not holding 100% of the width @@ -159,4 +163,3 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Added new twig function that returns current language - Changed design of FAQ List pattern - Removed avatar from "opinion" pieces - diff --git a/cern_components.info.yml b/cern_components.info.yml index 199899d9..58314358 100755 --- a/cern_components.info.yml +++ b/cern_components.info.yml @@ -3,7 +3,7 @@ type: module description: "Provides all the necessary modules regarding CERN Web Components." core: 8.x core_version_requirement: ^8 || ^9 -version: 2.7.13 +version: 2.7.14 package: CERN Components dependencies: - components:components (>=8.x-1.1-alpha1) diff --git a/composer.json b/composer.json index e9a52fa4..76c78cfa 100644 --- a/composer.json +++ b/composer.json @@ -1,31 +1,35 @@ { - "name": "drupal/cern-components", - "description": "Defines a set of re-usable patterns for the CERN Drupal infrastructure", - "version": "2.7.13", - "type": "drupal-custom-module", - "license": "GPL-2.0-or-later", - "authors": [ - { - "name": "Konstantinos Platis", - "email": "konstantinos.platis@cern.ch" - } - ], - "repositories": [ - { - "type": "composer", - "url": "https://packages.drupal.org/8" - }, - { - "type": "vcs", - "url": "https://gitlab.cern.ch/web-team/drupal/public/d8/modules/cern-full-html-format" - } - ], - "require": { - "drupal/components": "^2.0", - "drupal/ui_patterns": "^1.2", - "drupal/cern-full-html-format": "^2.0.2", - "drupal/twig_tweak": "^2.8", - "drupal/ds": "^3.9", - "drupal/field_group": "^3.1" + "name": "drupal/cern-components", + "description": "Defines a set of re-usable patterns for the CERN Drupal infrastructure", + "version": "2.7.14", + "type": "drupal-custom-module", + "license": "GPL-2.0-or-later", + "authors": [ + { + "name": "Joachim Valdemar Yde", + "email": "joachim.git@cern.ch" + }, + { + "name": "Konstantinos Platis", + "email": "konstantinos.platis@cern.ch" } + ], + "repositories": [ + { + "type": "composer", + "url": "https://packages.drupal.org/8" + }, + { + "type": "vcs", + "url": "https://gitlab.cern.ch/web-team/drupal/public/d8/modules/cern-full-html-format" + } + ], + "require": { + "drupal/components": "^2.0", + "drupal/ui_patterns": "^1.2", + "drupal/cern-full-html-format": "^2.0.2", + "drupal/twig_tweak": "^2.8", + "drupal/ds": "^3.9", + "drupal/field_group": "^3.1" + } } diff --git a/patterns/molecules/row/row.html.twig b/patterns/molecules/row/row.html.twig index 3485a6c7..c269f8ec 100755 --- a/patterns/molecules/row/row.html.twig +++ b/patterns/molecules/row/row.html.twig @@ -174,7 +174,7 @@ {# If the section has a title => add title as ID attribute separated with hyphens #} {% if variants.show_title.value == 1 %} - <div{{ attributes.setAttribute('id', title|render|lower|replace(' ', '-')) }}> + <div{{ attributes.setAttribute('id', title | render | lower | replace({' ': '-'})) }}> {% else %} <div{{ attributes }}> {% endif %} -- GitLab