From b90102de0ff82e7edb3907cb253150b3a9e557d4 Mon Sep 17 00:00:00 2001
From: Lee Rowlands <lee.rowlands@previousnext.com.au>
Date: Thu, 28 Dec 2023 15:36:22 +1000
Subject: [PATCH] Issue #3409663 by sakthi_dev, gorkagr, smustgrave: Remove
 datetime_range icon and library

---
 core/misc/icons/55565b/daterange.svg                   |  1 -
 .../datetime_range/css/datetime_range.icon.theme.css   |  9 ---------
 .../css/datetime_range.icon.theme.pcss.css             |  3 ---
 .../datetime_range/datetime_range.libraries.yml        |  7 -------
 core/modules/datetime_range/datetime_range.module      | 10 ----------
 core/modules/field_ui/css/field_ui.icons.theme.css     |  3 ---
 .../modules/field_ui/css/field_ui.icons.theme.pcss.css |  4 ----
 .../Core/Theme/Stable9LibraryOverrideTest.php          |  1 -
 8 files changed, 38 deletions(-)
 delete mode 100644 core/misc/icons/55565b/daterange.svg
 delete mode 100644 core/modules/datetime_range/css/datetime_range.icon.theme.css
 delete mode 100644 core/modules/datetime_range/css/datetime_range.icon.theme.pcss.css
 delete mode 100644 core/modules/datetime_range/datetime_range.libraries.yml

diff --git a/core/misc/icons/55565b/daterange.svg b/core/misc/icons/55565b/daterange.svg
deleted file mode 100644
index 8b852f0d95ce..000000000000
--- a/core/misc/icons/55565b/daterange.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg height="36" viewBox="0 0 36 36" width="36" xmlns="http://www.w3.org/2000/svg"><path d="m27 3.6h7.2c.9941 0 1.8.8059 1.8 1.8v28.8c0 .9941-.8059 1.8-1.8 1.8h-32.4c-.994104 0-1.8-.8059-1.8-1.8v-28.8c0-.9941.805896-1.8 1.8-1.8h7.2v-3.6h3.6v3.6h10.8v-3.6h3.6zm-23.4 10.8v18h28.8v-18zm3.6 3.6h3.6v3.6h-3.6zm9 0h3.6v3.6h-3.6zm9 0h3.6v3.6h-3.6z" fill="#55565b"/></svg>
\ No newline at end of file
diff --git a/core/modules/datetime_range/css/datetime_range.icon.theme.css b/core/modules/datetime_range/css/datetime_range.icon.theme.css
deleted file mode 100644
index 028163f29e1c..000000000000
--- a/core/modules/datetime_range/css/datetime_range.icon.theme.css
+++ /dev/null
@@ -1,9 +0,0 @@
-/*
- * DO NOT EDIT THIS FILE.
- * See the following change record for more information,
- * https://www.drupal.org/node/3084859
- * @preserve
- */
-.field-icon-daterange {
-  background-image: url("data:image/svg+xml,%3csvg height='36' viewBox='0 0 36 36' width='36' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='m27 3.6h7.2c.9941 0 1.8.8059 1.8 1.8v28.8c0 .9941-.8059 1.8-1.8 1.8h-32.4c-.994104 0-1.8-.8059-1.8-1.8v-28.8c0-.9941.805896-1.8 1.8-1.8h7.2v-3.6h3.6v3.6h10.8v-3.6h3.6zm-23.4 10.8v18h28.8v-18zm3.6 3.6h3.6v3.6h-3.6zm9 0h3.6v3.6h-3.6zm9 0h3.6v3.6h-3.6z' fill='%2355565b'/%3e%3c/svg%3e");
-}
diff --git a/core/modules/datetime_range/css/datetime_range.icon.theme.pcss.css b/core/modules/datetime_range/css/datetime_range.icon.theme.pcss.css
deleted file mode 100644
index 01b7955cccf3..000000000000
--- a/core/modules/datetime_range/css/datetime_range.icon.theme.pcss.css
+++ /dev/null
@@ -1,3 +0,0 @@
-.field-icon-daterange {
-  background-image: url(../../../misc/icons/55565b/daterange.svg);
-}
diff --git a/core/modules/datetime_range/datetime_range.libraries.yml b/core/modules/datetime_range/datetime_range.libraries.yml
deleted file mode 100644
index 178d96067195..000000000000
--- a/core/modules/datetime_range/datetime_range.libraries.yml
+++ /dev/null
@@ -1,7 +0,0 @@
-drupal.datetime_range-icon:
-  version: VERSION
-  css:
-    theme:
-      css/datetime_range.icon.theme.css: {}
-  dependencies:
-    - field_ui/drupal.field_ui.manage_fields
diff --git a/core/modules/datetime_range/datetime_range.module b/core/modules/datetime_range/datetime_range.module
index 8c81fb52685c..0dbbd8d70d16 100644
--- a/core/modules/datetime_range/datetime_range.module
+++ b/core/modules/datetime_range/datetime_range.module
@@ -5,7 +5,6 @@
  * Field hooks to implement a datetime field that stores a start and end date.
  */
 
-use Drupal\Core\Field\FieldTypeCategoryManagerInterface;
 use Drupal\Core\Url;
 use Drupal\Core\Routing\RouteMatchInterface;
 
@@ -28,12 +27,3 @@ function datetime_range_help($route_name, RouteMatchInterface $route_match) {
       return $output;
   }
 }
-
-/**
- * Implements hook_field_type_category_info_alter().
- */
-function datetime_range_field_type_category_info_alter(&$definitions) {
-  // The `datetime_range` field type belongs in the `general` category, so the
-  // libraries need to be attached using an alter hook.
-  $definitions[FieldTypeCategoryManagerInterface::FALLBACK_CATEGORY]['libraries'][] = 'datetime_range/drupal.datetime_range-icon';
-}
diff --git a/core/modules/field_ui/css/field_ui.icons.theme.css b/core/modules/field_ui/css/field_ui.icons.theme.css
index 6679d13efa41..3224d77fcbd2 100644
--- a/core/modules/field_ui/css/field_ui.icons.theme.css
+++ b/core/modules/field_ui/css/field_ui.icons.theme.css
@@ -31,6 +31,3 @@
 .field-icon-reference {
   background-image: url("data:image/svg+xml,%3csvg height='36' viewBox='0 0 36 36' width='36' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='m10.98 9v4.98h5.52v3.06h-9v6h-5.52v9.96h14.04v-9.96h-5.52v-3.06h15v3.06h-5.52v9.96h14.04v-9.96h-5.52v-6h-9v-3.06h5.52v-9.96h-14.04zm11.026.015-.016 1.995h-7.98l-.016-1.995-.016-1.995h8.044zm-8.986 18.975v2.01h-8.04v-4.02h8.04zm18 0v2.01h-8.04v-4.02h8.04z' fill='%2355565b'/%3e%3c/svg%3e");
 }
-.field-icon-daterange {
-  background-image: url("data:image/svg+xml,%3csvg height='36' viewBox='0 0 36 36' width='36' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='m27 3.6h7.2c.9941 0 1.8.8059 1.8 1.8v28.8c0 .9941-.8059 1.8-1.8 1.8h-32.4c-.994104 0-1.8-.8059-1.8-1.8v-28.8c0-.9941.805896-1.8 1.8-1.8h7.2v-3.6h3.6v3.6h10.8v-3.6h3.6zm-23.4 10.8v18h28.8v-18zm3.6 3.6h3.6v3.6h-3.6zm9 0h3.6v3.6h-3.6zm9 0h3.6v3.6h-3.6z' fill='%2355565b'/%3e%3c/svg%3e");
-}
diff --git a/core/modules/field_ui/css/field_ui.icons.theme.pcss.css b/core/modules/field_ui/css/field_ui.icons.theme.pcss.css
index 09bf9cd6a57f..db397fd7d518 100644
--- a/core/modules/field_ui/css/field_ui.icons.theme.pcss.css
+++ b/core/modules/field_ui/css/field_ui.icons.theme.pcss.css
@@ -31,7 +31,3 @@
 .field-icon-reference {
   background-image: url(../../../misc/icons/55565b/reference.svg);
 }
-
-.field-icon-daterange {
-  background-image: url(../../../misc/icons/55565b/daterange.svg);
-}
diff --git a/core/tests/Drupal/KernelTests/Core/Theme/Stable9LibraryOverrideTest.php b/core/tests/Drupal/KernelTests/Core/Theme/Stable9LibraryOverrideTest.php
index 30b0e5cd503e..2c2f0e6a0059 100644
--- a/core/tests/Drupal/KernelTests/Core/Theme/Stable9LibraryOverrideTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Theme/Stable9LibraryOverrideTest.php
@@ -26,7 +26,6 @@ class Stable9LibraryOverrideTest extends StableLibraryOverrideTestBase {
     'media/drupal.media-icon',
     'options/drupal.options-icon',
     'telephone/drupal.telephone-icon',
-    'datetime_range/drupal.datetime_range-icon',
   ];
 
   /**
-- 
GitLab