Skip to content

feat: add mega-dropdown component - #166

Open
YvetteNikolov wants to merge 1 commit into
mainfrom
feat/mega-dropdown
Open

feat: add mega-dropdown component#166
YvetteNikolov wants to merge 1 commit into
mainfrom
feat/mega-dropdown

Conversation

@YvetteNikolov

Copy link
Copy Markdown
Contributor
megamenu

Standaard mega menu / dropdown toegevoegd in Brave als er meer dan 7 items in staan.

  • Twee nieuwe componenten aangemaakt: dropdown.blade.php en mega-dropdown.blade.php
  • Aparte dropdown-item.blade.php aangemaakt die in beide dropdown's geinclude wordt

@WybeBosch

WybeBosch commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Hmm is het een mega menu? of een wide menu?
Verder priem

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds reusable header dropdown components and introduces a “mega dropdown” variant that’s automatically used when a top-level navigation item has more than 7 children, improving scalability of large menus in the Sage theme header.

Changes:

  • Refactors the existing header submenu markup into a shared dropdown-item component.
  • Adds dropdown and mega-dropdown Blade components and selects between them based on child count (> 7).
  • Updates header navigation to use the new components instead of inline dropdown markup.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
web/app/themes/sage/resources/views/components/header/navigation.blade.php Switches submenu rendering to dropdown vs mega-dropdown based on number of child items.
web/app/themes/sage/resources/views/components/header/mega-dropdown.blade.php Introduces a fixed-position, multi-column mega dropdown for large child lists.
web/app/themes/sage/resources/views/components/header/dropdown.blade.php Introduces a standard dropdown component for smaller child lists.
web/app/themes/sage/resources/views/components/header/dropdown-item.blade.php Extracts shared child item rendering used by both dropdown variants.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

<x-brave::nav.item>
<x-brave::nav.link :item="$child"
{{ $attributes->class([
'group/sub-menu-link flex items-center justify-between gap-6 px-6 py-4 text-left leading-snug text-inherit no-underline',

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Iets meer ruimte erin gesneakt

@YvetteNikolov

YvetteNikolov commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

Hmm is het een mega menu? of een wide menu? Verder priem

"Menu" is niet correct als woord, want dat woord omvat het hele menu. We hebben ook een mobile menu en top bar menu. Dropdown is duidelijker.

/taalnazi


<x-brave::nav.dropdown mode="hover"
{{ $attributes->class([
'ease-base invisible fixed left-1/2 z-10 w-(--container-width) -translate-x-1/2 -translate-y-6 columns-3 gap-x-6 bg-white p-8 opacity-0 shadow-lg transition-all duration-300',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ik ben zelf niet heel erg fan van columns-3. Hoe gaat het bijvoorbeeld als een menu item over 2 regels gaat? (Niet dat het een goed idee is om zulke lange menu items te maken)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants