Use EuiResizableContainer in visualize#86934
Conversation
…ntainer_editor # Conflicts: # src/plugins/vis_default_editor/public/_default.scss # src/plugins/vis_default_editor/public/_sidebar.scss # src/plugins/vis_default_editor/public/default_editor.tsx # src/plugins/vis_default_editor/public/index.scss
5409fac to
96c9b50
Compare
|
Hey @andreadelrio The pr is intended to use This was working fine initially, but after the changes happened here elastic/eui#3978 and here is an effect responsible for rendering a particular visualization in a DOM node: I did a research and found the reason: the DOM node was unmounted from the DOM during the render, and this happened due to a subscription to resize in eui The code re-initialize the container couple of times while render (we are using lazy loading and the container doesn't have its real dimensions set initially since it is hidden by Disabling the highlighted lines of code in the eui resolves the problem. I would really appreciate your help on this issue 🙏 |
|
Pinging @thompsongl |
|
elastic/eui#4447 Should get you moving again. Note that it'll take some time after it merges for the changes to 1) be part of an EUI release and 2) have that release land in Kibana. If you need it sooner to hit a deadline, let me know and we can work it out. |
|
@elasticmachine merge upstream |
a339e21 to
c7ab156
Compare
|
Thanks @thompsongl for helping out with elastic/eui#4447 to fix initialization problem. Screen.Recording.2021-02-15.at.16.02.46.movSo the current implementation uses |
|
@cchaos Do you mean we need to get rid of this feature? In this PR I fully preserved the existing editor behavior, but in the comment above just highlighted that I can't fully use |
|
Pinging @elastic/kibana-app (Team:KibanaApp) |
|
From your before/after screens, it seems that the new implementation is the same as the previous. I'd just leave it as-is for this PR then, and then circle back with @elastic/kibana-design for help with figuring out if there should be any layout changes. Another quick fix is that collapsible option of EuiResizableContainer comes with the option to change from horizontal to vertical, also in turn changing the direction of the icon. You may want to consider changing this direction once the screen sizes down. |
Unfortunately, EuiResizableContainer does NOT support changing horizontal/vertical layout dynamically, it provides only one direction layout initially. That's why I left the custom styles for small screens and collapse button. |
|
Yep, you're right. I tried to dynamically change the |
ryankeairns
left a comment
There was a problem hiding this comment.
+1 to the idea of circling back to this in the future, post-merge and after an EUI fix becomes available.
Approving the changes with that in mind.
| @@ -1,45 +1,25 @@ | |||
| .visEditor--default { | |||
| height: 1px; | |||
There was a problem hiding this comment.
It would be helpful to have a comment here explaining the reason as it will undoubtedly stand out to future reviewers of this file.
|
@elasticmachine merge upstream |
|
@elasticmachine run elasticsearch-ci/docs |
stratoula
left a comment
There was a problem hiding this comment.
I tested it locally on Chrome, FF and Safari and it works fine. Code LGTM 🙂
|
@elasticmachine run elasticsearch-ci/docs |
💚 Build SucceededMetrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: |
|
@elasticmachine run elasticsearch-ci/docs |
* Use EuiResizableContainer * Code cleanup * Memoize the sidebar for performance boost * Prevent mouseLeave event * Downgrade eui to 30.6.0 * Revert eui downgrade * Update styles * Render embeddable after a timeout * Fix printing * Fix resizer functional test * Create an explicit layout breakpoint * Remove extra code * Update layout styles * Add a note of using height: 1px Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Use EuiResizableContainer * Code cleanup * Memoize the sidebar for performance boost * Prevent mouseLeave event * Downgrade eui to 30.6.0 * Revert eui downgrade * Update styles * Render embeddable after a timeout * Fix printing * Fix resizer functional test * Create an explicit layout breakpoint * Remove extra code * Update layout styles * Add a note of using height: 1px Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>





Summary
Resolves #84343
Replace shared
PanelsContainercomponent fromkibana_reactplugin withEuiResizableContainerin Visualize default editor.Checklist
Delete any items that are not applicable to this PR.
For maintainers