🎨 Clean up UI for 2x branch

Created on 6 April 2023, over 1 year ago
Updated 21 June 2023, over 1 year ago

Problem/Motivation

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Needs review

Version

2.0

Component

User interface

Created by

🇨🇦Canada AaronChristian Kelowna, BC

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @AaronChristian
  • @aaronchristian opened merge request.
  • 🇨🇦Canada AaronChristian Kelowna, BC
  • 🇨🇦Canada AaronChristian Kelowna, BC
  • 🇨🇦Canada AaronChristian Kelowna, BC

    In Drupal 9/10, our beautiful UI is not so beautiful anymore. 😔

  • 🇯🇴Jordan Rajab Natshah Jordan

    Try to do the following
    which I learned to make use of that from Gin Layout Builder
    doing that in https://git.drupalcode.org/project/varbase_layout_builder/-/blob/10.1.x/...
    which works

    /**
     * Implements hook_css_alter().
     */
    function bootstrap_styles_css_alter(&$css, AttachedAssetsInterface $assets) {
    
      if (_is_layout_builder_route()) {
        if (\Drupal::service('theme_handler')->themeExists('stable9')) {
          $stable_theme_css = \Drupal::service('extension.list.theme')->getPath('stable9') . '/css';
          unset($css[$stable_theme_css . '/layout_builder/layout-builder.css']);
          unset($css[$stable_theme_css . '/core/dialog/off-canvas.theme.css']);
          unset($css[$stable_theme_css . '/core/dialog/off-canvas.details.css']);
          unset($css[$stable_theme_css . '/core/dialog/off-canvas.reset.css']);
          unset($css[$stable_theme_css . '/core/dialog/off-canvas.base.css']);
          unset($css[$stable_theme_css . '/core/dialog/off-canvas.table.css']);
          unset($css[$stable_theme_css . '/core/dialog/off-canvas.tabledrag.css']);
          unset($css[$stable_theme_css . '/core/dialog/off-canvas.form.css']);
          unset($css[$stable_theme_css . '/core/dialog/off-canvas.button.css']);
        }
    
        unset($css['core/misc/dialog/off-canvas/css/reset.css']);
        unset($css['core/misc/dialog/off-canvas/css/wrapper.css']);
        unset($css['core/misc/dialog/off-canvas/css/titlebar.css']);
        unset($css['core/misc/dialog/off-canvas/css/dropbutton.css']);
        unset($css['core/misc/dialog/off-canvas/css/messages.css']);
        unset($css['core/misc/dialog/off-canvas/css/details.css']);
        unset($css['core/misc/dialog/off-canvas/css/form.css']);
        unset($css['core/misc/dialog/off-canvas/css/button.css']);
        unset($css['core/misc/dialog/off-canvas/css/base.css']);
        unset($css['core/misc/dialog/off-canvas/css/table.css']);
        // unset($css['core/misc/dialog/off-canvas/css/utility.css']);
        // unset($css['core/misc/dialog/off-canvas/css/drupal.css']);
        // unset($css['core/misc/dialog/off-canvas/css/tabledrag.css']);
        // unset($css['core/misc/dialog/off-canvas/css/throbber.css']);
    
        if (\Drupal::service('theme.manager')->getActiveTheme()->getName() !== \Drupal::config('system.theme')->get('admin')) {
          unset($css['core/modules/layout_builder/css/off-canvas.css']);
        }
     
      }
    }
    
    /**
     * Returns true if the current route is a layout builder route.
     *
     * @return bool
     *   Returns true for layout builder routes.
     */
    function _is_layout_builder_route() {
      $layout_builder_route = drupal_static(__FUNCTION__);
      if ($layout_builder_route !== NULL) {
        return $layout_builder_route;
      }
    
      $route_name = \Drupal::routeMatch()->getRouteName();
      $layout_builder_route = FALSE;
    
      if ($route_name !== NULL && preg_match('/^(layout_builder\.([^.]+\.)?)/', $route_name)) {
        $layout_builder_route = TRUE;
      }
    
      $context = null;
      \Drupal::moduleHandler()->alter('_is_layout_builder_route', $layout_builder_route, $context);
      unset($context);
      return $layout_builder_route;
    }
    
    
    
  • Status changed to Needs review over 1 year ago
  • 🇨🇦Canada AaronChristian Kelowna, BC
  • 🇨🇦Canada AaronChristian Kelowna, BC

    Thanks @rajab

    I'm trying hard to ensure BLB/BS doesn't cross pollinate the rest of the UI, proving to be a bit difficult, but I'm not sure that enough of our users are going to know to implement your solution.

    I'm hoping @Mahmoud will be able to merge these in soon.

    We are using the patches on several production sites right now, so far so good 🤞

  • 🇳🇱Netherlands marcom2021

    When can we expect for this to be updated?

Production build 0.71.5 2024