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

[useAnchorPositioning] Disable auto axis flipping #817

Merged
merged 1 commit into from
Nov 22, 2024

Conversation

atomiks
Copy link
Contributor

@atomiks atomiks commented Nov 13, 2024

Based on #810, auto side axis-based flipping should be off by default.

Changing the algorithm in Floating UI will probably require considerable effort/time to resolve in a way that works in most situations (for instance, the alignment chosen seems incorrect based on the preferred side).

For now this is a good enough default to use as other libraries use this.

Two workarounds exist to this prop:

  • --available-width can be used to ensure left/right side popups don't overflow on narrow screens while preserving the preferred side axis.
  • A manual JavaScript media query based on the viewport width can be used to conditionally pass in a different preferred side.

@atomiks atomiks added the core Infrastructure work going on behind the scenes label Nov 13, 2024
@mui-bot
Copy link

mui-bot commented Nov 13, 2024

Netlify deploy preview

https://deploy-preview-817--base-ui.netlify.app/

Generated by 🚫 dangerJS against c081791

@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Nov 21, 2024
@atomiks atomiks mentioned this pull request Nov 22, 2024
1 task
@atomiks atomiks force-pushed the fix/disable-axis-flip branch from 459c04d to c081791 Compare November 22, 2024 10:41
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Nov 22, 2024
@atomiks atomiks merged commit 84126dd into mui:master Nov 22, 2024
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Infrastructure work going on behind the scenes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants