Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Gin 8.x-3.0-rc2 was released on: 12 Mar 2023 by:
https://www.drupal.org/project/gin/releases/8.x-3.0-rc2
#3309113: Change CSS3 variables from camelCase to kebab-case
Having issues with nested gin-layer-wrapper
Proposed resolution
- Reset for nested
gin-layer-wrapper
- Switch to support admin themes (Base themes and Sub admin themes)
- Use new Gin theme spacing
- Fix style of empty blocks which have empty text
- Fix style of un-formatted views blocks
Issue #3276164 by saschaeggi: Added style overrides for The Gin admin theme
Having the following logic would be better for sure as Sascha helped with a module.
$active_theme = \Drupal::theme()->getActiveTheme();
$base_themes = (array) $active_theme->getBaseThemeExtensions();
if ($active_theme->getName() === 'gin' || array_key_exists('gin', $base_themes)) {
// Overrides to support Gin's CSS3 variables for Light/Dark mode, Accent etc.
$element['#attached']['library'][] = 'dashboards/assets.gin';
}
elseif ($active_theme->getName() === 'claro' || array_key_exists('claro', $base_themes)) {
// Overrides to support Claro's CSS3 variables.
$element['#attached']['library'][] = 'dashboards/assets.claro';
}
Remaining tasks
- File an issue
- Patch/MR
- Test
- Review
User interface changes
After the fix:
Light mode - My Dashboard sandbox with Drupal 10 - after the fix with The Gin Admin theme
My Dashboard sandbox with Drupal 10 - after the fix with The Claro Admin theme
Dark mode - My Dashboard sandbox with Drupal 10 - after the fix with The Gin Admin theme
API changes
- N/A
Data model changes
- N/A
Comment | File | Size | Author |
---|---|---|---|
#15 | My-Dashboard-sandboxes-a1drupal10--after-the-fix--dark-mode.png | 788.25 KB | Rajab Natshah |
#11 | My-Dashboard-sandboxes-a1drupal10--claro--look-after-the-fix.png | 766.11 KB | Rajab Natshah |
#11 | 3349570-11.patch | 1.54 KB | Rajab Natshah |
#7 | My-Dashboard-sandboxes-a1drupal10--after-the-fix.png | 795.23 KB | Rajab Natshah |
#3 | 3349570-3.patch | 2.13 KB | Rajab Natshah |
Issue fork dashboards-3349570
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3349570-2.1.x changes, plain diff MR !17
- 3349570-fix-gin-layer changes, plain diff MR !16
Comments
Comment #2
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot for Vardot commentedComment #3
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot for Vardot commentedComment #7
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot for Vardot commentedComment #8
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot for Vardot commentedThis is a quick fix for the issue
Having the following logic would be better for sure as Sascha helped with a module in Issue #3276164 by saschaeggi: Added style overrides for The Gin admin theme.
Which had to support Gin, Claro and their sub themes with the same code base.
Comment #9
Erik Seifert CreditAttribution: Erik Seifert at 1xINTERNET commentedDoes it also applies to 2.1.x ?
Comment #10
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot for Vardot commentedIt is for the
2.1.x
branchTesting with Support for Claro and Gin
Comment #11
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot for Vardot commentedThis patch has support for Claro too
My Dashboard sandbox with Drupal 10 - after the fix with The Claro Admin theme
Comment #12
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot for Vardot commentedComment #13
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot for Vardot commentedComment #14
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot for Vardot commentedComment #15
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot for Vardot commentedComment #16
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot for Vardot commentedComment #17
Rajab Natshah CreditAttribution: Rajab Natshah at Vardot for Vardot commentedThank you, Erik for this so nice and important module!
Comment #18
Erik Seifert CreditAttribution: Erik Seifert at 1xINTERNET commentedThank you for support and work on this module. And after your patch is looking very nice. I like it ;-) Seems your MR does not have any changes, so i commit the patch.
Comment #20
Erik Seifert CreditAttribution: Erik Seifert at 1xINTERNET commentedComment #21
Erik Seifert CreditAttribution: Erik Seifert at 1xINTERNET commented