Skip to content

feat: support rich Menu action content#57

Merged
artiphishle merged 21 commits into
mainfrom
feature/menu-item-content
May 16, 2026
Merged

feat: support rich Menu action content#57
artiphishle merged 21 commits into
mainfrom
feature/menu-item-content

Conversation

@artiphishle
Copy link
Copy Markdown
Contributor

Summary

  • replace the unused minimal Menu item shape with structured actions
  • add MenuAction with title, description, leading, trailing, selected, disabled, intent, and activate
  • render menu rows with layout primitives instead of nesting arbitrary content inside Text
  • keep Surface-owned menu mechanics: trigger measurement, portal rendering, focus scope, keyboard navigation, escape handling, outside dismiss, and close-on-select behavior
  • export MenuAction and MenuActionIntent from the component and root barrels
  • add a patch changeset

Closes #56.

Notes

This intentionally does not preserve the previous items / label API because Surface Menu has not been consumed yet. This PR uses the opportunity to make the first real public API cleaner:

  • actions instead of items
  • title instead of label
  • activate instead of onPress
  • dismiss instead of onDismiss
  • intent: 'default' | 'danger' instead of a broad color API

The existing MenuItem export remains as an alias of MenuAction for compatibility with the current barrel naming, but MenuAction is the preferred type name.

Verification

Not run locally in this environment because the connected GitHub API path cannot execute repo commands. Please run before merge:

bun run build
bun run lint:fix
bun run test

@artiphishle artiphishle self-assigned this May 16, 2026
@artiphishle artiphishle merged commit a5281c0 into main May 16, 2026
1 check passed
@artiphishle artiphishle deleted the feature/menu-item-content branch May 16, 2026 23:15
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.

feat: support rich Menu item content

1 participant