Add support for Navigation Beta 1+ (Gin Toolbar)

Created on 19 April 2024, 8 months ago
Updated 18 May 2024, 7 months ago

Problem/Motivation

Adds support for Navigation Beta 1 and onwards

Steps to reproduce

Install the navigation module:
composer require 'drupal/navigation:^1.0@beta'
composer require 'drupal/gin:^3.0@beta'

Proposed resolution

Works as expected

Remaining tasks

  • Base checks are in place
  • Code review if things can be done more elegantly
  • Programmatically remove all toolbar related libraries when Navigation is active
  • Testing! Does it work with Accent colors, Darkmode etc.

User interface changes

New navigation over steers Gin's Navigation options

API changes

Data model changes

📌 Task
Status

Fixed

Version

1.0

Component

User interface

Created by

🇨🇭Switzerland saschaeggi Zurich

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

Merge Requests

Comments & Activities

  • Issue created by @saschaeggi
  • Merge request !45Add Navigation module Beta support → (Merged) created by saschaeggi
  • 🇨🇭Switzerland saschaeggi Zurich
  • 🇩🇪Germany jurgenhaas Gottmadingen

    When I apply MR45 on top of Gin Toolbar 1.0.0-rc5 together with Drupal core 10.3.x-dev, I'm getting these javascript errors in the browser console on every page request:

    Uncaught TypeError: document.querySelector(...) is null
        <anonymous> https://amplius.dev.jurgenhaas.de/core/modules/toolbar/js/toolbar.js?v=10.3.0-dev:35
        <anonymous> https://amplius.dev.jurgenhaas.de/core/modules/toolbar/js/toolbar.js?v=10.3.0-dev:38
        <anonymous> https://amplius.dev.jurgenhaas.de/core/modules/toolbar/js/toolbar.js?v=10.3.0-dev:396
    toolbar.js:35:10
    Uncaught TypeError: Drupal.toolbar is undefined
        <anonymous> https://amplius.dev.jurgenhaas.de/core/modules/toolbar/js/models/MenuModel.js?v=10.3.0-dev:14
        <anonymous> https://amplius.dev.jurgenhaas.de/core/modules/toolbar/js/models/MenuModel.js?v=10.3.0-dev:29
    MenuModel.js:14:45
    Uncaught TypeError: Drupal.toolbar is undefined
        <anonymous> https://amplius.dev.jurgenhaas.de/core/modules/toolbar/js/models/ToolbarModel.js?v=10.3.0-dev:14
        <anonymous> https://amplius.dev.jurgenhaas.de/core/modules/toolbar/js/models/ToolbarModel.js?v=10.3.0-dev:159
    ToolbarModel.js:14:48
    Uncaught TypeError: Drupal.toolbar is undefined
        <anonymous> https://amplius.dev.jurgenhaas.de/core/modules/toolbar/js/views/BodyVisualView.js?v=10.3.0-dev:7
        <anonymous> https://amplius.dev.jurgenhaas.de/core/modules/toolbar/js/views/BodyVisualView.js?v=10.3.0-dev:48
    BodyVisualView.js:7:49
    Uncaught TypeError: Drupal.toolbar is undefined
        <anonymous> https://amplius.dev.jurgenhaas.de/core/modules/toolbar/js/views/MenuVisualView.js?v=10.3.0-dev:7
        <anonymous> https://amplius.dev.jurgenhaas.de/core/modules/toolbar/js/views/MenuVisualView.js?v=10.3.0-dev:65
    MenuVisualView.js:7:49
    Uncaught TypeError: Drupal.toolbar is undefined
        <anonymous> https://amplius.dev.jurgenhaas.de/core/modules/toolbar/js/views/ToolbarAuralView.js?v=10.3.0-dev:7
        <anonymous> https://amplius.dev.jurgenhaas.de/core/modules/toolbar/js/views/ToolbarAuralView.js?v=10.3.0-dev:80
    ToolbarAuralView.js:7:51
    Uncaught TypeError: Drupal.toolbar is undefined
        <anonymous> https://amplius.dev.jurgenhaas.de/core/modules/toolbar/js/views/ToolbarVisualView.js?v=10.3.0-dev:7
        <anonymous> https://amplius.dev.jurgenhaas.de/core/modules/toolbar/js/views/ToolbarVisualView.js?v=10.3.0-dev:396
    ToolbarVisualView.js:7:52
    
  • 🇨🇭Switzerland saschaeggi Zurich

    @jurgenhaas I've pushed a fix to 📌 Add support for Navigation Beta 1+ Active , please have another look 👀

  • 🇨🇭Switzerland saschaeggi Zurich
  • Status changed to Fixed 8 months ago
  • 🇨🇭Switzerland saschaeggi Zurich
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024