Integrate Gin with the new Navitaion Top Bar

Created on 31 January 2025, 3 months ago

Problem/Motivation

Both the new Navigation and Top Bar are close to be marked Stable soon. Given Gin is the official theme for Drupal CMS we need them to integrate seamlessly.
There have been several improvements and changes on the top Bar recently, and it is one issue away to be able to be marked Stable and be enabled via the UI.

Steps to reproduce

  • Enable both Gin and the New Navigation
  • Enable the Top Bar Navigation module with drush: ddev drush en navigation_top_bar

Proposed resolution

Solve the conflicting areas and integrate the new and future coming from 🌱 [PLAN] Top contextual bar Active .

Remaining tasks

User interface changes

API changes

Data model changes

✨ Feature request
Status

Active

Version

4.0

Component

Code

Created by

πŸ‡ͺπŸ‡ΈSpain ckrina Barcelona

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

Merge Requests

Comments & Activities

  • Issue created by @ckrina
  • First commit to issue fork.
  • Merge request !589Resolve #3503575 "Integrate gin with" β†’ (Open) created by saschaeggi
  • πŸ‡¨πŸ‡­Switzerland saschaeggi Zurich

    I'm working on it.

    So far I've pushed the basic support for the new regions in the top bar and to disable the toolbar when navigation top bar is active.

  • πŸ‡¨πŸ‡­Switzerland saschaeggi Zurich

    Hey @JΓΌrgen πŸ‘‹

    Can you take a look here?

    You'll need to install navigation and navigation_top_bar

  • πŸ‡©πŸ‡ͺGermany jurgenhaas Gottmadingen

    @saschaeggi yes, this is on my list for this week.

  • πŸ‡©πŸ‡ͺGermany jurgenhaas Gottmadingen

    This is looking great, I like this a lot.

    However, I found a couple of issues and my test environment looks like this:

    • Drupal 11.x-dev
    • Gin with the MR!589
    • Enabled navigation and navigation_top_bar

    The issues I found:

    • When loading a page, the main region takes the full browser width, until the left navigation gets loaded, which is when the main region flips back to the narrower width. I guess that's an issue with navigation, not with Gin, right?
    • The action buttons are clickable but nothing happens.
    • When opening/closing the right sidebar, this works correct both throws this exception in the browser console: Uncaught TypeError: trigger is null more_actions.js:50:7

    Looking into the MR, I wonder how resistant this code is for the various combinations that we may have to support:

    • D10 with Gin only
    • D11 with Gin only
    • D11 with Gin and navigation
    • D11 with Gin and navigation and navigation_top_bar

    Is there any other combination that I may have missed?

  • πŸ‡©πŸ‡ͺGermany jurgenhaas Gottmadingen

    @saschaeggi found the reason for the nonfunctioning action buttons. They no longer have the data-drupal-selector="gin-sticky-${formElement}", but instead data-drupal-selector="${formElement}", i.e. the gin-sticky- prefix is no longer there. I guess, similar changes elsewhere will have additional side effects that we don't want.

    Before we can fix those, we should finalize the scope definition on what combination we want to support as raised in #8. We can then implement that accordingly, but I can already foresee that we have to cover a lot of different scenarios with one code base.

    That said, I wonder if we should move the navigation support into Gin 5.x and there only support 11.2 and later. Or whatever Drupal core version will have the new navigation in a stable fashion.

Production build 0.71.5 2024