Update popover position when children contents change#966
Conversation
58a5025 to
903374c
Compare
01088fe to
36f7e9f
Compare
5e3ee29 to
aa4f99c
Compare
|
Is this ready? If so, want to remove the "WIP" from the title? |
|
@cchaos title updated, thanks! |
cchaos
left a comment
There was a problem hiding this comment.
Seems to work well! I checked in IE11 too for good measure. Had a couple comments, mainly around documentation.
| }], | ||
| text: ( | ||
| <p> | ||
| <EuiCode>MutationObserver</EuiCode> is a wrapper around the Mutation Observer API. |
There was a problem hiding this comment.
Can you link to the API and describe more about what it is for?
| }], | ||
| text: ( | ||
| <p> | ||
| There is an optional <EuiCode>insert</EuiCode> prop that can specify the portal"s |
There was a problem hiding this comment.
Since the props list won't properly list out what the insert object accepts, can you explain it here.
"s => '
There was a problem hiding this comment.
I've added the props tab with a descriptive note, and expanded the writeup.
| }; | ||
| } | ||
|
|
||
| setButtonRef = node => this.buttonRef = node |
|
|
||
| import PopoverContainer from './popover_container'; | ||
| const popoverContainerSource = require('!!raw-loader!./popover_htmlelement_anchor'); | ||
| const popoverContainerHtml = renderToHtml(PopoverHTMLElementAnchor); |
There was a problem hiding this comment.
Pointing to wrong sources here.
There was a problem hiding this comment.
great catch, thanks!
| <div> | ||
| <p> | ||
| <EuiCode>EuiWrappingPopover</EuiCode> is an extra popover component that allows | ||
| any existing DOM element to be passed as the <EuiCode>button</EuiCode> prop. |
There was a problem hiding this comment.
I don't really understand the use-case for this one, but I'm guessing someone needed it?
There was a problem hiding this comment.
Yeah, Nathan needs it for the top nav changes.
|
@cchaos pushed changes from your feedback |
cchaos
left a comment
There was a problem hiding this comment.
Great, thx. Just one grammar issue.
| </p> | ||
| <p> | ||
| <EuiCode>insert</EuiCode> is an object with two key/values: <EuiCode>sibling</EuiCode> | ||
| and <EuiCode>position</EuiCode>. sibling is either the React node or HTMLElement |
There was a problem hiding this comment.
sibling should remain lowercase as the property name itself is lowercase. Verified with @gchaps, who reworded it to read better.
1078ac9 to
1db2d3d
Compare
…height transition
1db2d3d to
66cf140
Compare
| @@ -189,7 +236,7 @@ export class EuiPopover extends Component { | |||
| } | |||
There was a problem hiding this comment.
@chandlerprall I just realized I messed up this arrowBuffer value, would you mind setting it to 10 instead of 0?
|
jenkins test this |

features / bug fixes
EuiMutationObserverAdds a component that wraps components with the mutation observer API.

EuiPortalA new optional prop called
insertthat allows the portal to be inserted in arbitrary locations in the DOM.EuiPopoverDynamic content
Popover repositions with dynamic content, such as an animated context menu height
fixes #958 fixes #955
Container restriction
An optional
containerprop allows restricting the popover boundariessupports canvas euiification
EuiWrappingPopoverNew component that allows non-React DOM elements to be used as popover anchors
supports Kibana navigation euiification
todo
Details
browser testing
Details
IE11
Edge
Chrome
FF
Safari