Early Proof of Concept: Menu with BaseUI#3026
Conversation
Available types:
|
| * When false, always renders as a positioned popover. | ||
| * @default true | ||
| */ | ||
| readonly responsive?: boolean; |
There was a problem hiding this comment.
using an opt-out approach maximizes consistency, and UX on mobile while still offering the ability to diverge when needed.
when someone sets responsive={false} we know they thought about the mobile scenario and didn't want it for whatever reason. this is as strong of a signal as we can possibly get.
whereas with an opt in approach, not only does it create more work since that's not how Menu worked historically - but it also leaves room for ambiguity. did someone not want it because they really didn't like it? or did they not know about this case?
if they didn't know about it, then that's the best possible outcome of an included default. you didn't think about it, and you don't have to. your user will have a good, consistent experience on mobile.
There was a problem hiding this comment.
it may seem that this is structure, but I would argue it is not. this is behavior, and it includes logic. in the same way that a Modal has a dismiss Button, but you wouldn't use the mere presence of a Modal.Dismiss to control that because there is more to it than that. you are making a decision about the behavior of the overall component that is more than markup in isolation.
as such, adding a Menu.Drawer is not optimal.
abstracting with a Menu.Content is the right boundary and responsibility for Menu at the components level.
as a consumer, you don't need to be concerned with the precise mechanism Drawer vs Popover. you just need to think about the items, and their content (icons etc.). we give you those tools and take care of the rest.
using sub components to dictate behavior or configuration is not a good fit for that problem, and additionally adds to the already sizeable amount of sub components in the Menu name space.
Deploying atlantis with
|
| Latest commit: |
d6bd76f
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://b408bb3a.atlantis.pages.dev |
| Branch Preview URL: | https://cleanup-menu-but-with-baseui.atlantis.pages.dev |
Motivations
Changes
Added
Changed
Deprecated
Removed
Fixed
Security
Testing
Changes can be
tested via Pre-release
In Atlantis we use Github's built in pull request reviews.