-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
Description
In olden tymes, the Drupal 8 version of menu_block was missing some critical functionality for making sidebar/section navigations/menus show and hide items properly.
We have styles in cwd_base to deal with these limitations. Recently, these workarounds actually caused some trouble (LASSP faculty labs), and we had to override the cwd_base workaround styles, in order to show an entire menu tree in the sidebar.
- Example of the workaround styles in real life -- note how a lot of sidebar menu items are hidden via CSS: https://teaching.cornell.edu/learning-technologies/assessment-tools
- Basically, we re-printed the entire main menu and then some, in the sidebar, then manipulated the output with CSS, to show the kind of "section menu" tree you'd expect to see.
- Example on a LASSP multidev, where we had to override the cwd_base workaround styles in order to show the entire section menu: https://labs-lassp.pantheonsite.io/natasha-holmes-group/another-placeholder-page/fuga-fugit-ut-molestias
- (the issue only happens when the block title is disabled -- and of course when you show all menu tree children -- but no matter, just mentioning for context.)
Since then, menu_block has become good. Let's remove the workarounds!
Notes:
- We don't promise backwards compatibility with cwd_base, but it'll be simple enough for us to include instructions in the next cwd_base release notes for existing sites that wish to update to the latest version, so let's do that.
- Anything we should worry/think about re: these other two menu issues...?
To do:
- Remove workaround styles (
drupal.scss, line 344-350):
/* section navigation menu */
.secondary-navigation.drupal-section-navigation .menu-item {
display: none;
}
.secondary .menu-block-title + .secondary-navigation.drupal-section-navigation .menu-item,
.secondary-navigation.drupal-section-navigation .menu-item--active-trail,
.secondary-navigation.drupal-section-navigation .menu-item--active-trail .menu-item {
display: block;
}
- Check and if necessary update the sidebar menu block configuration on CD Demo
- Menu block machine name: cwd_project_mainnavigation
- If changes are needed, create a companion issue over there.
- Write instructions for release notes -- i.e.
- If you choose to update to this version of cwd_base and your sidebar menu relies on cwd_base to properly hide/show menu items...
- Here's how to update your section nav menu block settings...
- Or here are a few lines of styles to add to your site theme... (i.e. the style block above that we're removing)
Reactions are currently unavailable