feat: implement dropdown menu in NavMain for collapsed state with hover functionality

This commit is contained in:
mlogclub
2026-05-30 20:58:25 +08:00
parent 57995e352b
commit b1b632e28b
2 changed files with 62 additions and 0 deletions
+9
View File
@@ -9,3 +9,12 @@ test("dashboard nav items expose full labels when visual text is truncated", ()
assert.match(source, /tooltip=\{item\.title\}/)
assert.match(source, /<span\s+title=\{item\.title\}>\{item\.title\}<\/span>/)
})
test("collapsed dashboard nav sections expose submenu flyouts on hover", () => {
assert.match(source, /useSidebar/)
assert.match(source, /state === "collapsed" && !isMobile/)
assert.match(source, /<DropdownMenuTrigger\s+openOnHover/)
assert.match(source, /render=\{<SidebarMenuButton \/>\}/)
assert.match(source, /<DropdownMenuContent[\s\S]*side="right"/)
assert.match(source, /<DropdownMenuGroup>[\s\S]*<DropdownMenuLabel/)
})