Toolbar doesn't indicate active menu trail for pages not included in Toolbar

Created on 20 November 2023, about 1 year ago
Updated 7 December 2023, about 1 year ago

Problem/Motivation

Core introduced this fix a while ago for the current Toolbar: 🐛 Toolbar doesn't indicate active menu trail for pages not included in Toolbar Fixed . It introduced the behavior that indicates the active menu trail even for pages that are not included in Toolbar to help users orient in which section of the site they are currently on. This new Toolbar should be translated to this module, otherwise it would be a regression on a functionality perspective.

Steps to reproduce

  1. Navigate to /admin/structure/types/manage/page/fields
  2. The parents "Structure" and "Content types" should look as active trail (not active) (and the parent item opened)
  3. The sidebar should scroll the same way it'd scroll if the active element was there.

Proposed resolution

Adapt the solution introduced in 🐛 Toolbar doesn't indicate active menu trail for pages not included in Toolbar Fixed in here.

📌 Task
Status

Fixed

Version

1.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
  • 🇪🇸Spain ckrina Barcelona

    Adding the active trail styles regression from 🐛 Active trail is not showing anymore Active . That issue is only to add back the styles, this one is to change the functionality itself.

    Also, I think we should add tests too for this. But I'm happy with the tests happening in a followup where the discussion about how tests should be included can happen if needed.

  • Pipeline finished with Failed
    about 1 year ago
    Total: 1055s
    #59964
  • First commit to issue fork.
  • Merge request !146Toolbar active menu indication. → (Merged) created by Meeni_Dhobale
  • Status changed to Needs review about 1 year ago
  • 🇮🇳India Meeni_Dhobale

    I modified JavaScript where previously we checked that our menu link is the same as our URL. Now it checks whether the URL contains our menu link or not. This is solving our problem.

  • Status changed to RTBC about 1 year ago
  • 🇷🇸Serbia finnsky

    Thank you!
    Looks great on all subpages.

    Catched one not related bug. We need to resolve it in follow up issue:

    https://gyazo.com/577f0d8e6bc000973ab824315cf315f8

  • Status changed to Fixed about 1 year ago
  • 🇪🇸Spain ckrina Barcelona

    Nice! Thanks you!

    @finnsky Good catch! Would you create an issue for that when you have some time?

  • Pipeline finished with Skipped
    about 1 year ago
    #61499
  • Pipeline finished with Skipped
    about 1 year ago
    #64665
  • Automatically closed - issue fixed for 2 weeks with no activity.

  • Pipeline finished with Success
    10 months ago
    Total: 33s
    #112743
  • Pipeline finished with Success
    9 months ago
    Total: 1094s
    #118052
  • Pipeline finished with Success
    9 months ago
    Total: 1219s
    #118189
  • Pipeline finished with Success
    9 months ago
    Total: 169s
    #118707
  • Pipeline finished with Success
    9 months ago
    Total: 137s
    #118731
  • Pipeline finished with Success
    9 months ago
    Total: 167s
    #131071
Production build 0.71.5 2024