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

fix(overflowmenu): improve autoAlign fallback placements #17248

Conversation

tay1orjones
Copy link
Member

@tay1orjones tay1orjones commented Aug 22, 2024

Based on a slack conversation, this improves the fallback placements for OverflowMenu's autoAlign. Here's an example of the problem:

2024-08-22.at.12.46.01-MAIN-Google.Chrome.mp4

With this PR it avoids vertically flipping unless it absolutely has to:

2024-08-22.at.12.48.36-MAIN-Google.Chrome.mp4

Changelog

New

  • reorder the fallbackPlacements based on the value of menuAlignment

Changed

  • updated/improved code comments

Removed

  • removed fallbackAxisSideDirection because it's ignored when fallbackPlacements is used

Testing / Reviewing

  • Check out the feature flagg overflow auto align story, ensure it works in a more logical way to what you'd expect as shown in the video.

Copy link

netlify bot commented Aug 22, 2024

Deploy Preview for v11-carbon-react ready!

Name Link
🔨 Latest commit 0d275f1
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/66c7858082949c00080b1129
😎 Deploy Preview https://deploy-preview-17248--v11-carbon-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Aug 22, 2024

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit 0d275f1
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/66c78580ad014000086edd7e
😎 Deploy Preview https://deploy-preview-17248--carbon-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@emyarod emyarod left a comment

Choose a reason for hiding this comment

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

looks good to me!

@tay1orjones tay1orjones added this pull request to the merge queue Aug 23, 2024
Merged via the queue into carbon-design-system:main with commit dbe4f28 Aug 23, 2024
22 checks passed
@tay1orjones tay1orjones deleted the overflowmenu-autoalign-fallbacks branch August 23, 2024 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants