Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

Commit

Permalink
[SRM-665] Ckeditor5 and Claro upgrade (#124)
Browse files Browse the repository at this point in the history
* remove unused inkit patch

* Update linkit

* Read the config from /config/ directory only

* lint

* update preview link block

* put the patch back

* lint and skip unsupported test
  • Loading branch information
vincent-gao authored May 31, 2023
1 parent 9178aa8 commit 8978be9
Show file tree
Hide file tree
Showing 11 changed files with 9,553 additions and 9 deletions.
12 changes: 11 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,17 @@
"repositories": {
"drupal": {
"type": "composer",
"url": "https://packages.drupal.org/8"
"url": "https://packages.drupal.org/8",
"canonical": false
},
"drupal/entity_embed": {
"type": "git",
"url": "https://git.drupalcode.org/issue/entity_embed-3272732.git"
},
"drupal/video_embed_field": {
"type": "vcs",
"no-api": true,
"url": "https://git.drupalcode.org/issue/video_embed_field-3311063.git"
}
},
"extra": {
Expand Down
13 changes: 10 additions & 3 deletions config/install/linkit.linkit_profile.site_content.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ status: true
dependencies:
module:
- node
_core:
default_config_hash: i9NpUDkHXWv0nBVl_hba1YmpdozfyJrBYe5-8njLB4E
id: site_content
label: 'Site Content'
description: ''
Expand All @@ -20,4 +18,13 @@ matchers:
group_by_bundle: true
substitution_type: canonical
limit: 100

e91d515d-454e-47d4-adf7-6fc13b8f66cd:
id: email
uuid: e91d515d-454e-47d4-adf7-6fc13b8f66cd
settings: { }
weight: 0
7802f100-9fda-4458-8416-0f537a7b851d:
id: phone
uuid: 7802f100-9fda-4458-8416-0f537a7b851d
settings: { }
weight: 0
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ dependencies:
module:
- tide_site_preview
theme:
- seven
id: seven_tide_site_preview_links
theme: seven
- claro
id: claro_tide_site_preview_links
theme: claro
region: highlighted
weight: -3
provider: null
Expand Down
2 changes: 1 addition & 1 deletion modules/tide_site_preview/tide_site_preview.info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ dependencies:
config_devel:
install: { }
optional:
- block.block.seven_tide_site_preview_links
- block.block.claro_tide_site_preview_links
28 changes: 28 additions & 0 deletions modules/tide_site_preview/tide_site_preview.install
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*/

use Drupal\user\Entity\Role;
use Drupal\block\Entity\Block;

/**
* Implements hook_install().
Expand All @@ -21,3 +22,30 @@ function tide_site_preview_install() {
}
}
}

/**
* Remove block.block.seven_tide_site_preview_links.
*/
function tide_site_preview_update_8001() {
$block = Block::load('seven_tide_site_preview_links');
if ($block !== NULL) {
$block->delete();
}
}

/**
* Install block.block.claro_tide_site_preview_links.
*/
function tide_site_preview_update_8002() {
\Drupal::moduleHandler()->loadInclude('tide_core', 'inc', 'includes/helpers');
$config_location = [\Drupal::service('extension.list.module')->getPath('tide_site_preview') . '/config/optional'];
$storage = \Drupal::entityTypeManager()->getStorage('block');
$id = 'claro_tide_site_preview_links';
$config_entity = $storage->load($id);
if ($config_entity !== NULL) {
$storage->delete([$config_entity]);
}
$config_read = _tide_read_config('block.block.claro_tide_site_preview_links', $config_location, FALSE);
$new_config_entity = $storage->createFromStorageRecord($config_read);
$new_config_entity->save();
}
Empty file added patches/.gitkeep
Empty file.
9,011 changes: 9,011 additions & 0 deletions patches/ckeditor_templates/ckeditor_templates_4.patch

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions patches/composer-patches/fix-applied-patches.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/src/Patches.php b/src/Patches.php
index 70c5b83..53da82c 100644
--- a/src/Patches.php
+++ b/src/Patches.php
@@ -115,7 +115,7 @@ class Patches implements PluginInterface, EventSubscriberInterface {
$this->installedPatches[$package->getName()] = $extra['patches'];
}
$patches = isset($extra['patches']) ? $extra['patches'] : array();
- $tmp_patches = array_merge_recursive($tmp_patches, $patches);
+ $tmp_patches = $this->arrayMergeRecursiveDistinct($tmp_patches, $patches);
}

if ($tmp_patches == FALSE) {
Loading

0 comments on commit 8978be9

Please sign in to comment.