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

[EuiComboBox] Combobox popover can be hidden behind EuiBottomBar #4872

Closed
jloleysens opened this issue Jun 10, 2021 · 5 comments
Closed

[EuiComboBox] Combobox popover can be hidden behind EuiBottomBar #4872

jloleysens opened this issue Jun 10, 2021 · 5 comments

Comments

@jloleysens
Copy link

On EUI v33.0.0 it is possible to have the combobox popover appear under the EuiBottomBar.

Screenshot

There are 3 items in the this popover but only 2 are visible

Screenshot 2021-06-10 at 15 04 55

Example

https://codesandbox.io/s/heuristic-waterfall-1ntg0?file=/src/index.tsx

@cchaos
Copy link
Contributor

cchaos commented Jun 10, 2021

Z-index issues are really hard to control from an external library. We do our best when it comes to portal content to know, for example, that a Modal should always be on top, or that a fixed element should have a high z-index. EuiComboBox popover's inherit their z-index from their current position and add just a slight bit 100 to ensure it lives on top of any other page content. You should be able to adjust the combo box's z-index to something higher than the bottom bar to fix this.

Other approaches would be

  • use the EuiPageTemplate with a built in bottomBar
  • change the bottom bar's position to sticky

The only thing we might be able to do on the EUI side, for combo boxes specifically, is to allow passing the buffer prop through to the EuiPopover. Or have the EuiPopover always also test and account for any padding added to the <body> element.

@jloleysens
Copy link
Author

Z-index issues are really hard to control from an external library

Yeah I can imagine 😅

The only thing we might be able to do on the EUI side...

From a user perspective, knowing all the challenges that exist with z-index, it would be nice to have a way to "reach in" to the component to correct z-index issues. In this case something like the "buffer" prop on the EuiPopover component could have worked really well. In this case, I was able to "fix" the issue by pushing the EuiBottomBar back instead of bringing the EuiComboBox forward (this is the PR that will contain this work for reference elastic/kibana#101714)

@jloleysens
Copy link
Author

@cchaos One alternative I was wondering about, is it not possible to always have popovers with higher z-index value than the bottom bar or other "hovering" EUI components? It seems as though we would always want these in front, but I might be missing a case where this assumption does not hold.

@github-actions
Copy link

👋 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.

@github-actions
Copy link

❌ We're automatically closing this issue due to lack of activity. Please comment if you feel this was done in error.

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

No branches or pull requests

2 participants