Fix Menu dropdown items being normalized twice + Fix Dropdown not wrapping a nested submenu toggle in <li> - #168
Fix Menu dropdown items being normalized twice + Fix Dropdown not wrapping a nested submenu toggle in <li>#168vjik wants to merge 5 commits into
Menu dropdown items being normalized twice + Fix Dropdown not wrapping a nested submenu toggle in <li>#168Conversation
vjik
commented
Aug 14, 2026
| Q | A |
|---|---|
| Is bugfix? | ✔️ |
| New feature? | ❌ |
| Breaks BC? | ❌ |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #168 +/- ##
===========================================
Coverage 100.00% 100.00%
- Complexity 327 333 +6
===========================================
Files 8 8
Lines 1038 1057 +19
===========================================
+ Hits 1038 1057 +19 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Fixes double normalization of Menu dropdown items.
Changes:
- Defers submenu normalization to
Dropdown. - Propagates menu context into nested items.
- Adds regression tests and changelog entry.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/Helper/Normalizer.php |
Revises submenu normalization flow. |
tests/Menu/MenuTest.php |
Tests encoding, icons, and active paths. |
CHANGELOG.md |
Documents the bug fix. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
Suppressed comments (1)
src/Helper/Normalizer.php:83
Normalizer::menu()is public and previously recursively normalized submenu leaves, including removingencode,icon, and related raw keys. ReturninginjectMenuContext()here now leaves those children partially raw, reversing the behavior recorded inCHANGELOG.md:13and creating a backward-incompatible result for direct callers despite the PR's no-BC claim. Please keepmenu()fully normalized and move the single-normalization Menu→Dropdown handoff to a separate internal path/API.
$items[$i]['items'] = self::injectMenuContext(
Menu dropdown items being normalized twiceMenu dropdown items being normalized twice + Fix Dropdown not wrapping a nested submenu toggle in <li>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.
Suppressed comments (1)
src/Helper/Normalizer.php:83
Normalizer::menu()is public and promises fully normalized menu items, but this branch now returns submenu leaves with rawencode,icon, and related keys intact instead of rendered labels. That reverses the behavior documented inCHANGELOG.md:13and can break direct callers despite the PR’s no-BC claim. Keepmenu()’s recursive normalization contract and introduce a separate internal handoff forMenu→Dropdownso widget rendering still normalizes each item only once.
$items[$i]['items'] = self::injectMenuContext(