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

RFC: Be able to define fallback order for Popup position #2359

Closed
WiNloSt opened this issue Dec 6, 2017 · 1 comment
Closed

RFC: Be able to define fallback order for Popup position #2359

WiNloSt opened this issue Dec 6, 2017 · 1 comment
Labels

Comments

@WiNloSt
Copy link
Contributor

WiNloSt commented Dec 6, 2017

The behavior of a Popup is if our desired position doesn't fit in the viewport, the component will calculate the next possible fallback position based on a predefined constant POSITIONS.

While this is convenient that users doesn't need to defined their own fallback position order. Some users, like me, might prefer having another fallback order for visual purpose. So, being able to override this POSITIONS variable somehow would benefit in this case.

I imagine if there would be something like this

<Popup
  trigger={<Icon name="heart" color="red" size="large" circular />}
  content="I am positioned to the top left"
  position="top left"
  fallbackPositions={["bottom left", "bottom center"]}
/>

What do you think?

@layershifter
Copy link
Member

I have an idea to switch positioning of Popup to Popper.js after we will finish with refs (#2306).

In fact, current positioning is poorly tested and I don't want to add more complexivity there. However, I think that we will accept PR for current implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants