Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DropdownMenu v2: change default placement to match the legacy DropdownMenu component #51133

Merged
merged 2 commits into from
May 31, 2023

Conversation

ciampo
Copy link
Contributor

@ciampo ciampo commented May 31, 2023

Part of #50459

What?

The legacy DropdownMenu component shows its popover in the bottom-start placement since it fallbacks to the default value of the Popover component for its placement prop.

This PR updates the default value of the DropdownMenu v2 component to be the same as the legacy DropdownMenu

Why?

Consistency and less disruption when updating from legacy to v2

How?

Change default prop assignment, update docs

Testing Instructions

Open Storybook, notice how the popover of the DropdownMenu v2 component is not opening against the edge of the viewport, but is instead aligned with the left side of the trigger button.

Screenshots or screencast

Before (trunk) This PR
Screenshot 2023-05-31 at 14 41 39 Screenshot 2023-05-31 at 14 41 25

(ignore the border styles)

@ciampo ciampo added [Type] Enhancement A suggestion for improvement. [Package] Components /packages/components labels May 31, 2023
@ciampo ciampo requested a review from ajitbohra as a code owner May 31, 2023 12:43
@ciampo ciampo self-assigned this May 31, 2023
@ciampo ciampo mentioned this pull request May 31, 2023
52 tasks
Copy link
Member

@tyxla tyxla left a comment

Choose a reason for hiding this comment

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

LGTM! 🚀

@ciampo ciampo force-pushed the feat/dropdownmenu-v2-change-default-placement branch from 899bfb8 to 70352eb Compare May 31, 2023 15:08
@ciampo ciampo enabled auto-merge (squash) May 31, 2023 15:08
@ciampo ciampo merged commit 172366a into trunk May 31, 2023
@ciampo ciampo deleted the feat/dropdownmenu-v2-change-default-placement branch May 31, 2023 15:41
@github-actions github-actions bot added this to the Gutenberg 16.0 milestone May 31, 2023
sethrubenstein pushed a commit to pewresearch/gutenberg that referenced this pull request Jul 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Components /packages/components [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants