Skip to content

Conversation

@dmarcey
Copy link
Contributor

@dmarcey dmarcey commented May 5, 2020

Adds support for aligning the menu of a SelectMenu with the right side of the button. This functionality exists currently in Primer/CSS (https://primer.style/css/components/select-menu#right-aligned), so this PR brings Primer/Components up to feature parity.

image

The implementation is the same as the one in Primer/CSS, where a container should have position: relative in order to align the absolutely positioned modal properly.

Closes #795

Screenshots

Please provide before/after screenshots for any visual changes

Merge checklist

  • Added or updated TypeScript definitions (index.d.ts) if necessary
  • Added/updated tests
  • Added/updated documentation
  • Tested in Chrome
  • Tested in Firefox
  • Tested in Safari
  • Tested in Edge

Take a look at the What we look for in reviews section of the contributing guidelines for more information on how we review PRs.

@vercel
Copy link

vercel bot commented May 5, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/primer/primer-components/g7t73yoo4
✅ Preview: https://primer-components-git-dmarcey-select-menu-align.primer.now.sh

@dmarcey dmarcey linked an issue May 5, 2020 that may be closed by this pull request
Copy link
Contributor

@BinaryMuse BinaryMuse left a comment

Choose a reason for hiding this comment

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

This seems reasonable to me! 👍 One doc change and a fix to propTypes in suggestions below.

@BinaryMuse BinaryMuse changed the base branch from master to release-19.0.0 May 5, 2020 22:22
@vercel vercel bot temporarily deployed to Preview May 6, 2020 13:50 Inactive
Co-authored-by: Michelle Tilley <binarymuse@github.com>
@vercel vercel bot temporarily deployed to Preview May 6, 2020 14:02 Inactive
@dmarcey dmarcey marked this pull request as ready for review May 6, 2020 14:02
@dmarcey dmarcey requested review from BinaryMuse and emplums May 6, 2020 14:02
@vercel vercel bot temporarily deployed to Preview May 6, 2020 14:26 Inactive
@vercel vercel bot temporarily deployed to Preview May 7, 2020 17:04 Inactive
@vercel vercel bot temporarily deployed to Preview May 7, 2020 18:25 Inactive
@BinaryMuse BinaryMuse merged commit a224c95 into release-19.0.0 May 7, 2020
@BinaryMuse BinaryMuse mentioned this pull request May 7, 2020
24 tasks
@colebemis colebemis deleted the dmarcey-select-menu-align branch October 29, 2021 00:44
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.

Support right alignment in SelectMenu

3 participants