From a8ad60c5c84ef79870fb0f82188fae47c0f7b5a8 Mon Sep 17 00:00:00 2001
From: Lee Rowlands <lee.rowlands@previousnext.com.au>
Date: Tue, 22 Feb 2022 12:00:21 +1000
Subject: [PATCH] =?UTF-8?q?Revert=20"Issue=20#3215044=20by=20quietone,=20m?=
 =?UTF-8?q?urilohp,=20larowlan,=20G=C3=A1bor=20Hojtsy,=20catch,=20xjm,=20d?=
 =?UTF-8?q?affie,=20dww:=20Promote=20the=20non-stable=20statuses=20in=20ad?=
 =?UTF-8?q?min/appearance=20page,=20optionally=20even=20visually"?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This reverts commit c7efd92e631c8ae7682f51795c86a79419c7cbeb.
---
 core/modules/system/css/system.admin.css      |  4 ----
 .../src/Controller/SystemController.php       | 22 +++----------------
 .../tests/src/Functional/System/ThemeTest.php |  6 -----
 3 files changed, 3 insertions(+), 29 deletions(-)

diff --git a/core/modules/system/css/system.admin.css b/core/modules/system/css/system.admin.css
index 36c3f17c2dcd..2577c724b164 100644
--- a/core/modules/system/css/system.admin.css
+++ b/core/modules/system/css/system.admin.css
@@ -255,10 +255,6 @@ small .admin-link:after {
 .theme-info__description {
   margin-top: 0;
 }
-.theme-link--non-stable {
-  padding-left: 18px;
-  background: url(../../../misc/icons/e29700/warning.svg) 0 50% no-repeat; /* LTR */
-}
 .system-themes-list {
   margin-bottom: 20px;
 }
diff --git a/core/modules/system/src/Controller/SystemController.php b/core/modules/system/src/Controller/SystemController.php
index 4dcd156de54b..db3f3d0bb81c 100644
--- a/core/modules/system/src/Controller/SystemController.php
+++ b/core/modules/system/src/Controller/SystemController.php
@@ -4,13 +4,11 @@
 
 use Drupal\Core\Cache\CacheableMetadata;
 use Drupal\Core\Controller\ControllerBase;
-use Drupal\Core\Extension\ExtensionLifecycle;
 use Drupal\Core\Extension\ModuleDependencyMessageTrait;
 use Drupal\Core\Extension\ModuleExtensionList;
 use Drupal\Core\Extension\ThemeExtensionList;
 use Drupal\Core\Extension\ThemeHandlerInterface;
 use Drupal\Core\Form\FormBuilderInterface;
-use Drupal\Core\Link;
 use Drupal\Core\Menu\MenuLinkTreeInterface;
 use Drupal\Core\Menu\MenuTreeParameters;
 use Drupal\Core\Theme\ThemeAccessCheck;
@@ -345,7 +343,8 @@ public function themesPage() {
         }
       }
 
-      // Add notes to default theme, administration theme and non-stable themes.
+      // Add notes to default theme, administration theme and experimental
+      // themes.
       $theme->notes = [];
       if ($theme->is_default) {
         $theme->notes[] = $this->t('default theme');
@@ -353,22 +352,7 @@ public function themesPage() {
       if ($theme->is_admin) {
         $theme->notes[] = $this->t('administration theme');
       }
-      $lifecycle = $theme->info[ExtensionLifecycle::LIFECYCLE_IDENTIFIER];
-      if (!empty($theme->info[ExtensionLifecycle::LIFECYCLE_LINK_IDENTIFIER])) {
-        $theme->notes[] = Link::fromTextAndUrl($this->t('@lifecycle', ['@lifecycle' => ucfirst($lifecycle)]),
-          Url::fromUri($theme->info[ExtensionLifecycle::LIFECYCLE_LINK_IDENTIFIER], [
-            'attributes' =>
-              [
-                'class' => 'theme-link--non-stable',
-                'aria-label' => $this->t('View information on the @lifecycle status of the theme @theme', [
-                  '@lifecycle' => ucfirst($lifecycle),
-                  '@theme' => $theme->info['name'],
-                ]),
-              ],
-          ])
-        )->toString();
-      }
-      if ($theme->isExperimental() && empty($theme->info[ExtensionLifecycle::LIFECYCLE_LINK_IDENTIFIER])) {
+      if ($theme->isExperimental()) {
         $theme->notes[] = $this->t('experimental theme');
       }
 
diff --git a/core/modules/system/tests/src/Functional/System/ThemeTest.php b/core/modules/system/tests/src/Functional/System/ThemeTest.php
index 6ff779b2a07c..6859bf697ecd 100644
--- a/core/modules/system/tests/src/Functional/System/ThemeTest.php
+++ b/core/modules/system/tests/src/Functional/System/ThemeTest.php
@@ -288,12 +288,6 @@ public function testAdministrationTheme() {
     $this->drupalGet('admin/appearance');
     $this->submitForm($edit, 'Save configuration');
 
-    // Check the display of non stable themes.
-    $this->drupalGet('admin/appearance');
-    $this->assertSession()->pageTextContains('Experimental test 9.4.0-dev (experimental theme)');
-    $this->assertSession()->pageTextContains('Test deprecated theme 9.4.0-dev (Deprecated)');
-    $this->assertSession()->elementExists('xpath', "//a[contains(@href, 'http://example.com/deprecated_theme')]");
-
     // Check that the administration theme is used on an administration page.
     $this->drupalGet('admin/config');
     $this->assertSession()->responseContains('core/themes/seven');
-- 
GitLab