-
Notifications
You must be signed in to change notification settings - Fork 838
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
[EuiPopover] Let 'anchorPosition' determine anchor position, regardless of screen real estate #3845
Comments
I'm not sure giving the ability to completely turn this positioning feature off is the correct path. There will always need to be some sort of affordance for the popover based on the window/body. For instance, if this example's input was actually at the bottom of the page, then forcing the popover to continue to drop down instead of up, would force extra scrolling and height onto the the Instead, we should allow the |
Thanks for taking the time @cchaos! Just to close the feedback loop here, using a container to calculate placement in addition to the window edge does sound like an improvement to me, but if I'm understanding correctly, still won't help us with our particular use-case. Our popover has always been within the bounds of I'm personally 100% comfortable managing my UI's layout to avoid the scrollbar jank (which I think already happens with
|
The container functionality right now, is if one is provided, the smaller bounds of The proposed change is to add a flag alongside the container to indicate that the window's size should not be used. So, given this flag + container=body, an anchorPosition=downCenter popover will expand down as long as there is room in the body, regardless of the window size & scroll position. It would still expand up if the anchor is at the bottom of its container. |
@chandlerprall oh!, that's great, I didn't catch that part. that definitely sounds like it'd suit our needs much better. thanks for explaining. |
👋 Hey there. This issue hasn't had any activity for 180 days. We'll automatically close it if that trend continues for another week. If you feel this issue is still valid and needs attention please let us know with a comment. |
❌ We're automatically closing this issue due to lack of activity. Please comment if you feel this was done in error. |
Hi team, I noticed that
EuiPopover
wasn't respectinganchorPosition
if it calculated that the content took up too much screen real estate. It simply treatsanchorPosition
as a preference, and overrides it when necessary. See the example in the documentation:However, the documentation also states:
So we have a case of documentation-implementation mismatch. This was discussed on Slack in this thread.
We need to be able to position a popover panel at a certain position regardless of screen real estate. Is that a property you would consider implementing? We definitely do need it, although I certainly understand why you don't think we should be doing this. However, as we are mimicking a dropdown with an
EuiInputPopover
, there are many states—especially in mobile views—that look and feel awkward when they reposition themselves above the trigger.So we do think this is a feature that would help us out here quite a bit. Thanks for your time!
The text was updated successfully, but these errors were encountered: