Skip to content

Better guarantee that a popover position can be found#2948

Merged
chandlerprall merged 2 commits intoelastic:masterfrom
chandlerprall:more-lenient-popover-positioning
Feb 28, 2020
Merged

Better guarantee that a popover position can be found#2948
chandlerprall merged 2 commits intoelastic:masterfrom
chandlerprall:more-lenient-popover-positioning

Conversation

@chandlerprall
Copy link
Contributor

@chandlerprall chandlerprall commented Feb 28, 2020

Summary

Fixes a bug described in #2874 (comment)

The context menu's first render pass does not include any content, only the wrapping DOM. With a border, that DOM's height is 2*borderWidth and no border means no height. No height means the content isn't displayable, and the popover service errors out. This PR changes the service to be more lenient in these cases.

Checklist

- [ ] Check against all themes for compatibility in both light and dark modes
- [ ] Checked in mobile
- [ ] Checked in IE11 and Firefox
- [ ] Props have proper autodocs
- [ ] Added documentation examples
- [ ] Added or updated jest tests

  • Checked for breaking changes and labeled appropriately
    - [ ] Checked for accessibility including keyboard-only and screenreader modes
  • A changelog entry exists and is marked appropriately

@chandlerprall chandlerprall requested a review from cchaos February 28, 2020 19:51
@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_2948/

Copy link
Contributor

@snide snide left a comment

Choose a reason for hiding this comment

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

Confirmed this by checking popovers that were causing problems and by making sure our other popovers still work as expected. Functionally LGTM.

Copy link
Contributor

@cchaos cchaos left a comment

Choose a reason for hiding this comment

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

💯 Works for me. I tested locally in Chrome and in all the themes (0 border panels) and even removed all content from the context menu and it still rendered. Thanks!

@chandlerprall chandlerprall merged commit 7c11113 into elastic:master Feb 28, 2020
@chandlerprall chandlerprall deleted the more-lenient-popover-positioning branch February 28, 2020 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants