Problem/Motivation
Steps to reproduce
- Go to
/admin/appearance/settings/[site-name] - Select 'Navigation'
- In
Dropdown typeselectNone - Save
Observed
Primary menu is broken. Links display vertically down the page.
Expected
Primary menu should no longer open as a drawer/dropdown, single level only. Menu items are linked.
Design: https://www.figma.com/file/H2LrWbmEg1EbSeH1Ljac6n/CivicTheme%3A-Design-S...
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | Screenshot 2024-02-22 at 12.38.41 pm.png | 261.19 KB | ivrh |
| broken nav.png | 1.11 MB | fionamorrison23 |
Comments
Comment #2
fionamorrison23 commentedComment #3
alex.skrypnykIt looks like that Drupal does not pass correct variable to disable "Expand all" for level 2+ items.
The solution would be to update the preprocessing for primary navigation.
Comment #4
ivrh commented@fionamorrison23 can we apply a block-level workaround and restrict the primary navigation block to only show 1 level navigation?

Comment #5
fionamorrison23 commented@ivrh workaround is good, thanks. Regardless, this requires a fix and I'll prioritise is accordingly.
Comment #6
alex.skrypnykThis issue needs fixing UI Kit - https://github.com/civictheme/uikit/pull/94
Comment #8
alex.skrypnykThe UIKit PR referenced above was merged within UIKit repository. The UIKit `Navigation` component was not doing what it was saying on the tin - when `Dropdown` had the value `None` selected - the dropdown behaviour was not applied, but the menu structure was preserved, which is not what the UI component should have done, because `Dropdown` property name controls not only the behaviour, but also the look of the component.
As for the Drupal side - this actually works as designed: using the "Number of levels to display" setting is the expected setting to be used to control the number of levels. So this issue is not an issue with Drupal implementation. Closing.
Comment #10
alex.skrypnyk