bcgov / MFIN-Data-Catalogue

The Finance Data Catalogue enables users to discover data holdings at the BC Ministry of Finance and offers information and functionality that benefits consumers of data for business purposes. The product is built using Drupal and adheres to the Government of BC's Core Administrative and Descriptive etadata Standard.
Other
6 stars 0 forks source link

Active link not styled correctly in book page side navigation block #467

Closed CraigClark closed 6 months ago

CraigClark commented 6 months ago

OP timer

https://openplus.monday.com/boards/4092908516/pulses/6589190503


Describe the bug

When navigating the documentation, the active class is not being applied at all page depths.

To reproduce

Steps to reproduce the behaviour:

  1. Go to https://dv14.openplus.ca/documentation/information-schedule
  2. See that the active class is applied to Administration root page, two levels above

Expected behaviour

Whatever page I am on in the documentation, the corresponding menu item in the side bar has the active class

Additional context

This problem does not present itself until you get three levels deep into the book navigation

In the example above, in the side bar if you follow click on navigation items in this order

Administration > Working with taxonomies > Information schedule

  1. Administration will have active class
  2. Working with taxonomies will have the active class
  3. Information schedule will not have the active class, but the grandparent Administration will have active
lkmorlan commented 6 months ago

@CraigClark resolved this with CSS. The active class was being applied but was not correctly styled. The selector needs to exclude elements with a child with active since some ancestors of the active link may have this class. It is not clear why.

lkmorlan commented 6 months ago

Issue opened when working on this: https://www.drupal.org/project/book/issues/3445783