Skip to content

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

Merged
ciampo merged 2 commits into
trunkfrom
feat/dropdownmenu-v2-change-default-placement
May 31, 2023
Merged

ciampo merged 2 commits into
trunkfrom
feat/dropdownmenu-v2-change-default-placement

Conversation

@ciampo

@ciampo ciampo commented May 31, 2023 •

Copy link
Copy Markdown
Contributor

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
43 of 58 tasks

@tyxla tyxla left a comment

Copy link
Copy Markdown
Member

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