Skip to content

feat: auto position menus - #46

Draft
developit wants to merge 1 commit into
mainfrom
codex/implement-css-based-menu-positioning-z1x3kw
Draft

developit wants to merge 1 commit into
mainfrom
codex/implement-css-based-menu-positioning-z1x3kw

Conversation

@developit

Copy link
Copy Markdown
Owner

Summary

  • delegate positioning to show/toggle listeners and drop unused anchor metrics
  • replace flip flags with space-separated data-flip and derive offsets from anchor size in CSS
  • clear default dialog margins so menus anchor correctly
  • temporarily remove popover transforms before measuring so layout nudges don't flip menus back and forth
  • flip context menus away from viewport edges using minimal JS

Testing

  • pnpm lint (fails: demo project has TypeScript errors)

https://chatgpt.com/codex/tasks/task_e_68c0e8bb75588321a1bb93503ba048f0

@github-actions

Copy link
Copy Markdown
Contributor

Size Change: +556 B (+5.3%) 🔍

Total Size: 11.1 kB

Filename Size Change
dist/index.css 5.74 kB +149 B (+2.67%)
dist/index.js 5.32 kB +407 B (+8.29%) 🔍

compressed-size-action

@netlify

netlify Bot commented Sep 11, 2025

Copy link
Copy Markdown

Deploy Preview for pui-demo ready!

Name Link
🔨 Latest commit 3025bd3
🔍 Latest deploy log https://app.netlify.com/projects/pui-demo/deploys/68c2c81341f18b0008115e88
😎 Deploy Preview https://deploy-preview-46--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.

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