Navigation toolbar button not active when subtabs are selected

Created on 16 September 2024, 2 months ago

Problem/Motivation

New experimental navigation module does not mark sidebar menu element as active if the current address is not the base URL of the section.

Steps to reproduce

  1. Activate experimental navigation module
  2. Select Extend section
  3. Click Update tab

Expected outcome is for the main section to be marked as active in the sidebar.

Proposed resolution

JavaScript in toolbar-menu.js is using document.URL === link.href to determine the active status for both toolbar menu links and toolbar menu buttons. The latter ones would need a different check that accounts for URL not always being equal to the value of the anchor href attribute.

One possible solution would be to use document.URL.startsWith(link.href) to determine the active visuals of the toolbar menu button so that the elements would be visually consistently active.

Remaining tasks

User interface changes

None.

Introduced terminology

None.

API changes

None.

Data model changes

None.

Release notes snippet

🐛 Bug report
Status

Active

Version

10.4

Component
Navigation 

Last updated about 19 hours ago

No maintainer
Created by

🇪🇪Estonia pjotr.savitski

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

Comments & Activities

Production build 0.71.5 2024