Skip to content

Conversation

@viridia
Copy link
Contributor

@viridia viridia commented Oct 23, 2025

Objective

  • Splitting out the non-BSN parts of the work on popup menus.

Solution

  • Added Popover and Menu components.

Testing

  • Manual testing using example.

Showcase

popup

@viridia viridia marked this pull request as ready for review October 23, 2025 10:55
observe(on_menu_event),
children![(
Node {
width: Val::Px(200.0),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given this is an example, where I expect to see idiomatic code, shouldn't the convenience functions (px, percent, px(n).all()) be used here and not Val directly?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replaced uses of Val.

@lomirus
Copy link
Contributor

lomirus commented Oct 24, 2025

The way this component is named Menu seems relatively uncommon, as in most front-end UI component libraries, it is typically referred to as Select:

@viridia
Copy link
Contributor Author

viridia commented Oct 24, 2025

The way this component is named Menu seems relatively uncommon, as in most front-end UI component libraries, it is typically referred to as Select:

"Select" is a different widget:

  • Menu displays a list of actions (open, close, quit, etc.)
  • Select displays a list of values that can be chosen

Both are in the class of "popups" and "dropdowns". You can easily build a select from a menu:

  • Create menuitems representing the individual choices
  • Modify the button label to reflect the current choice

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.

3 participants