Skip to content

Add CSS-only nested dropdown submenu primitives#84

Draft
developit wants to merge 20 commits intomainfrom
codex/implement-nested-dropdown-menus
Draft

Add CSS-only nested dropdown submenu primitives#84
developit wants to merge 20 commits intomainfrom
codex/implement-nested-dropdown-menus

Conversation

@developit
Copy link
Copy Markdown
Owner

Motivation

  • Provide a lightweight way to author nested/child dropdown menus while adhering to the toolkit's CSS-first, low-JS philosophy.

Description

  • Add three new submenu primitives: DropdownMenuSub, DropdownMenuSubTrigger, and DropdownMenuSubContent implemented with the existing createSimpleComponent pattern so they incur no runtime overhead.
  • Extend public types (src/components/dropdown-menu/types.ts) and export the new components from the package entrypoint so consumers can use the API.
  • Implement pure-CSS behavior in src/components/dropdown-menu/style.css using :hover and :focus-within to show/hide positioned child panels and support to="left" alignment for constrained layouts.
  • Add a demo NestedDropdownDemo in demo/src/routes/home.tsx to exercise two-level nested menus (including a left-flipped second-level submenu) without introducing new command wiring or runtime logic.

Testing

  • Ran pnpm -s build which completed successfully.
  • Ran pnpm -s build && pnpm -s build:demo which completed successfully and produced a demo build.
  • Executed an automated Playwright snippet to open the demo and capture a screenshot to validate nested hover/focus behavior which succeeded and produced nested-dropdown.png.
  • Ran pnpm -s exec biome check on the changed files which reported formatting suggestions (formatter output) and flagged a check failure; the functional builds and demo verification remained successful.

Codex Task

@netlify
Copy link
Copy Markdown

netlify bot commented Feb 24, 2026

Deploy Preview for pui-demo ready!

Name Link
🔨 Latest commit da7a1e6
🔍 Latest deploy log https://app.netlify.com/projects/pui-demo/deploys/69a489f860bd2500085c1efa
😎 Deploy Preview https://deploy-preview-84--pui-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 24, 2026

Size Change: +274 B (+1.98%)

Total Size: 14.1 kB

Filename Size Change
dist/index.css 8.53 kB +140 B (+1.67%)
dist/index.js 5.56 kB +134 B (+2.47%)

compressed-size-action

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant