Olivero: menu block does not expand if primary menu is empty

Created on 21 April 2023, over 1 year ago
Updated 31 January 2024, 10 months ago

Problem/Motivation

Olivero combines the "Primary menu" and "Secondary menu" regions into a single, responsive component. (Maybe it is more accurate to say that the "Secondary menu" region is nested inside the "Primary menu" region.)

If there are links in the "Secondary menu" region, but not in the "Primary menu" region, then on narrow screens the collapsed component does not respond to a click event.

Steps to reproduce

  1. Install Drupal with the minimal profile.
  2. Log in as admin.
  3. Enable Olivero and set it as the default theme.
  4. View any front-end page in a narrow window.
  5. Try to open the secondary menu (account menu).

Proposed resolution

Remaining tasks

User interface changes

API changes

None

Data model changes

None

Release notes snippet

N/A

🐛 Bug report
Status

Closed: cannot reproduce

Version

11.0 🔥

Component
Olivero 

Last updated 2 days ago

Created by

🇺🇸United States benjifisher Boston area

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

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • Issue created by @benjifisher
  • 🇮🇳India mukeysh

    The reason for this problem is that the primary-navigation library is only attached to the main menu template, causing the issue. And if there is no link in the main menu then the main menu block is not rendered because of this library is not attached. I think we need to attach library globally to fix this issue.

  • Status changed to Needs review over 1 year ago
  • last update over 1 year ago
    Build Successful
  • 🇮🇳India gauravvvv Delhi, India

    I have removed the navigation-primary library and added all the required files to global-styling. As when we were loading the navigation-primary library only on primary menu, when it is not there it was causing the issue. I have attached the patch for same. please review

  • Hi,

    successfully tested the patch '3355510-4.patch' locally, and it applied successfully, resolving the issue and addressing the following point:

    1. When the "Primary menu" is empty on a narrow window, the 'secondary menu' becomes visible upon clicking the menu.

    Looks for RTBC

  • Status changed to Needs work over 1 year ago
  • 🇺🇸United States smustgrave

    #4 had test failures.

  • Assigned to rupeshghar
  • Status changed to Needs review 10 months ago
  • I do not see any issue in the expanding menu block everything looks fine.

    See screen-recording - screen-capture-119.mp4

    Testing steps:-

    1. Latest Drupal 11
    2. Primary menu is empty
    3. Switch on below 1200px screen
    4. Click on hamburger menu
    5. Secondary menu is expanding
  • Assigned to sdhruvi5142
  • Merge request !6314Navigation libraries added globally. → (Open) created by rupeshghar
  • Pipeline finished with Failed
    10 months ago
    #82253
  • Status changed to RTBC 10 months ago
  • 🇮🇳India sdhruvi5142

    Hi, I've verified and tested this issue on drupal latest version 11.x-dev with applied patch #4 and without applied patch in both scenarios, it is working as expected and found no issue.

    Followed below testing steps:
    1. Install the Drupal 11.x version
    2. Install/Enable the Olivero Theme
    3. Now went to Primary menu and secondary menu on narrow screens (Mobile, Ipad and 1024(Laptop))
    4. And it is working as expected

    Testing Results:
    In Narrow screens also the secondary menu was getting expanded and working as expected.
    Attaching screenshots for reference
    Hence moving to RTBC
    Thanks

  • Issue was unassigned.
  • Status changed to Closed: cannot reproduce 10 months ago
  • Based on #8 and #11 testing moving to status to closed (cannot reproduce)
    Thanks

Production build 0.71.5 2024