-
Bug
-
Resolution: Fixed
-
Minor
-
3.3, 3.5
-
MOODLE_33_STABLE, MOODLE_35_STABLE
-
MOODLE_34_STABLE, MOODLE_35_STABLE
-
MDL-59599-master -
Hi,
during styling the nav drawer menu in our Boost child theme, I encountered that the selected nodes will be displayed bold and set to active if a user clicked them except for the grades node.
This behaviour is not only given in Boost theme but also in Clean theme (and probably in More theme but I did not test this).
Screenshots for getting an impression of the difference:
- Boost:
- Clicked on "Badges"
- Clicked on "Grades"
- Clicked on "Badges"
- Clean:
- Clicked on "Badges"
- Clicked on "Grades"
- Clicked on "Badges"
The code shows following differences:
- Boost:
- Clicked on "Badges":
<a class="list-group-item list-group-item-action font-weight-bold" (...) data-key="badgesview" (...) data-isactive="1" (...)>
- Clicked on "Grades":
<a class="list-group-item list-group-item-action (...) data-key="grades" (...) data-isactive="0" (...)>
- Clicked on "Badges":
The grades node keeps the attribute for data-isactive = 0 and therefore the class font-weight-bold would not been added as the renderer checks for the active status:
https://github.com/moodle/moodle/blob/master/theme/boost/templates/flat_navigation.mustache#L65
- Clean:
- Clicked on "Badges":
<p class="tree_item hasicon active_tree_node" role="treeitem" tabindex="0" aria-selected="true">(...)</p>
- Clicked on "Grades":
<p class="tree_item hasicon" role="treeitem" tabindex="0" aria-selected="true">(...)</p>
- Clicked on "Badges":
In Clean the grades node never gets the class "active_tree_node" and so here the displaying will also be different (not bold) to the other clicked nodes.
Steps to reproduce
- Login into Moodle
- Create a course
- Go into this course
- Click in the course navigation on "Badges"
-> See that the badges page will be loaded and the text "Badges" will be displayed in bold. - Click in the course navigation on "Grades"
- -> See that the grades page will be loaded and the text "Grades" will NOT be displayed in bold.
- will help resolve
-
MDL-62545 NavDrawer Highlighting Not Consistent.
- Closed