Skip to content
Snippets Groups Projects
Verified Commit f6d07a14 authored by Théodore Biadala's avatar Théodore Biadala
Browse files

Issue #3512194 by catch, smustgrave, nod_: Move resize CSS into its own library

parent d15e2ea5
No related branches found
No related tags found
1 merge request!2964Issue #2865710 : Dependencies from only one instance of a widget are used in display modes
Pipeline #453900 passed with warnings
Pipeline: drupal

#453905

    ......@@ -647,6 +647,21 @@ drupal.progress:
    - core/jquery
    - core/drupalSettings
    drupal.textarea-resize:
    version: VERSION
    css:
    component:
    misc/components/resize.module.css: { weight: -10 }
    moved_files:
    system/base:
    deprecation_version: 11.2.0
    removed_version: 12.0.0
    deprecation_link: https://www.drupal.org/node/3432346
    css:
    component:
    css/components/resize.module.css:
    component: misc/components/resize.module.css
    drupal.states:
    version: VERSION
    js:
    ......
    ......@@ -44,12 +44,21 @@ public function getInfo() {
    ],
    '#pre_render' => [
    [static::class, 'preRenderGroup'],
    [static::class, 'preRenderAttachments'],
    ],
    '#theme' => 'textarea',
    '#theme_wrappers' => ['form_element'],
    ];
    }
    /**
    * Adds the textarea resize library.
    */
    public static function preRenderAttachments($element): array {
    $element['#attached']['library'][] = 'core/drupal.textarea-resize';
    return $element;
    }
    /**
    * {@inheritdoc}
    */
    ......
    ......@@ -93,7 +93,7 @@ public function testLogin(): void {
    'ScriptCount' => 3,
    'ScriptBytes' => 215500,
    'StylesheetCount' => 1,
    'StylesheetBytes' => 46300,
    'StylesheetBytes' => 46000,
    ];
    $this->assertMetrics($expected, $performance_data);
    ......
    ......@@ -13,7 +13,6 @@ base:
    css/components/nowrap.module.css: { weight: -10 }
    css/components/position-container.module.css: { weight: -10 }
    css/components/reset-appearance.module.css: { weight: -10 }
    css/components/resize.module.css: { weight: -10 }
    css/components/tablesort.module.css: { weight: -10 }
    admin:
    ......
    ......@@ -30,7 +30,7 @@ public function testFrontAndRecipesPages(): void {
    'ScriptCount' => 1,
    'ScriptBytes' => 11700,
    'StylesheetCount' => 6,
    'StylesheetBytes' => 121000,
    'StylesheetBytes' => 120500,
    ];
    $this->assertMetrics($expected, $performance_data);
    }
    ......
    ......@@ -191,7 +191,7 @@ protected function testAnonymous(): void {
    ['config:user.role.anonymous'],
    ],
    'StylesheetCount' => 1,
    'StylesheetBytes' => 2250,
    'StylesheetBytes' => 2100,
    ];
    $this->assertMetrics($expected, $performance_data);
    $expected_default_cache_cids = [
    ......@@ -275,7 +275,7 @@ protected function testAnonymous(): void {
    ['config:user.role.anonymous'],
    ],
    'StylesheetCount' => 1,
    'StylesheetBytes' => 2250,
    'StylesheetBytes' => 2100,
    ];
    $this->assertMetrics($expected, $performance_data);
    ......@@ -312,7 +312,7 @@ protected function testAnonymous(): void {
    'CacheTagInvalidationCount' => 0,
    'CacheTagLookupQueryCount' => 13,
    'StylesheetCount' => 1,
    'StylesheetBytes' => 1950,
    'StylesheetBytes' => 1800,
    ];
    $this->assertMetrics($expected, $performance_data);
    }
    ......
    ......@@ -78,6 +78,11 @@ libraries-override:
    component:
    misc/components/progress.module.css: css/core/components/progress.module.css
    core/drupal.textarea-resize:
    css:
    component:
    misc/components/resize.module.css: css/core/components/resize.module.css
    core/drupal.tabledrag:
    css:
    component:
    ......@@ -234,7 +239,6 @@ libraries-override:
    css/components/nowrap.module.css: css/system/components/nowrap.module.css
    css/components/position-container.module.css: css/system/components/position-container.module.css
    css/components/reset-appearance.module.css: css/system/components/reset-appearance.module.css
    css/components/resize.module.css: css/system/components/resize.module.css
    css/components/tablesort.module.css: css/system/components/tablesort.module.css
    system/admin:
    css:
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment