Problem/Motivation

As image shown, the admin toolbar navigation menu arrow disappaers.

Steps to reproduce

Proposed resolution

Add below code to override claro theme is-active class
.toolbar .toolbar-tray .menu-item--active-trail > .toolbar-box a,
.toolbar .toolbar-tray a.is-active {
color: #000;
background-color: unset;
font-weight: bold;
}

Remaining tasks

User interface changes

API changes

Data model changes

Command icon 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:

Comments

ConnBi created an issue. See original summary.

connbi’s picture

Issue summary: View changes
connbi’s picture

StatusFileSize
new423 bytes
vensires’s picture

Status: Active » Needs review
Issue tags: +GreeceSpringSprint2024
azacharop’s picture

Assigned: Unassigned » azacharop
azacharop’s picture

Assigned: azacharop » Unassigned
Status: Needs review » Reviewed & tested by the community

@ConnBi The patch seems to solve the issue.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 3: 3436637.patch, failed testing. View results

vensires’s picture

giannis makantasis’s picture

Assigned: Unassigned » giannis makantasis
giannis makantasis’s picture

Issue summary: View changes
StatusFileSize
new26.09 KB
new26.87 KB
giannis makantasis’s picture

StatusFileSize
new20.99 KB

While patch seems to fix the issue
The CSS that is getting ovewritten comes from claro's css
/core/themes/claro/css/state/toolbar.menu.css :

.toolbar .toolbar-tray .menu-item--active-trail > .toolbar-box a,
.toolbar .toolbar-tray a.is-active {
  color: #000;
  background-color: #f5f5f5;
  font-weight: bold;
}

The patch suggested css for the /modules/contrib/admin_toolbar/css/admin.toolbar.css :

.toolbar .toolbar-tray .menu-item--active-trail > .toolbar-box a,
.toolbar .toolbar-tray a.is-active {
  color: #000;
  background-color: unset;
  font-weight: bold;
}

while the only needed rule would be the unset of background color, I am not sure if it should be added on Claro's css or in Admin Toolbar's css.
Icon After Patch

giannis makantasis’s picture

Project: Admin Toolbar » Drupal core
Version: 3.4.1 » 11.1.x-dev
Component: Code » Claro theme
Assigned: giannis makantasis » Unassigned
Related issues: +#3371005: Toolbar doesn't indicate active menu trail for pages not included in Toolbar
saurav-drupal-dev’s picture

Issue tags: +Needs steps to reproduce
StatusFileSize
new248.22 KB

@giannis makantasis the css should come inside toolbar file because we cannot access dropdown without the admin toolbar. but i am unable to reproduce the issue.

no issue found

quietone’s picture

Version: 11.1.x-dev » 11.x-dev

Changes are made on on 11.x (our main development branch) first, and are then back ported as needed according to the Core change policies.

giannis makantasis’s picture

@saurav-drupal-dev In order to reproduce the issue let me give you en example.
If you go Configuration-> Development page, and then you hover on Configuration , the Menu item "Development" will now be bold and underlined but its arrow will be hidden even though Development has more "Children Links".
This happens because in
this file (Claro) public_html/core/themes/claro/css/state/toolbar.menu.css ,

there is this css rule:

.toolbar .toolbar-tray .menu-item--active-trail > .toolbar-box a,
.toolbar .toolbar-tray a.is-active {
  color: #000;
  background-color: #f5f5f5; <--------------
  font-weight: bold;
}

So the background of the a.is-active is covering the background of li.menu-item--expanded (that has that blue arrow)

vensires’s picture

Component: Claro theme » toolbar.module
Issue tags: -Needs steps to reproduce

So, @giannisMak do we need a new MR for this to fit what @saurav-drupal-dev described in #13?

the css should come inside toolbar file because we cannot access dropdown without the admin toolbar

giannis makantasis’s picture

Assigned: Unassigned » giannis makantasis
Issue tags: -GreeceWinterSprint2024 +GreeceSprints2025
giannis makantasis’s picture

Project: Drupal core » Admin Toolbar
Version: 11.x-dev » 3.5.3
Component: toolbar.module » Code

giannis makantasis’s picture

Status: Needs work » Needs review

dydave made their first commit to this issue’s fork.

dydave’s picture

Version: 3.5.3 » 3.x-dev
Assigned: giannis makantasis » Unassigned
Status: Needs review » Fixed

Thanks a lot everyone for all the contributions and great help on this issue!

I was able to reproduce the problem mentioned in the issue summary above, after taking a close look at the screenshots.
It is important to understand that to test this you have to click on a menu item with several levels, for example:
Browse to: Configuration > People (admin/config/people)
This way, the menu item will be marked as active and this is where the problem appears:
It loses its arrow style, thus losing its indication the menu item has sub-menus.

I have tested after applying the patch and it seemed to fix the issue, great job Giannis (@giannis makantasis)!! 👍
I have tested this with Olivero and Gin themes as well and it seemed to fix the issue.

Additionally, I have done a quick review of the merge request which adds a new CSS rule only impacting active menu link items (a.is-active tags), thus having a limited/localized impact.
 

After fixing a few StyleLint errors, the build of the MR passed 🟢 and that's why I decided to merge the changes above at #22.

At this point, this issue should be considered Fixed 🥳

Thanks again to everyone for the great work, testing and feedback! 🙏

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.