-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[TextBasedEditor] Use resizable button from EUI #165935
Conversation
Pinging @elastic/kibana-visualizations (Team:Visualizations) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code review only
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for putting this together, @stratoula! I left one small comment below.
Additionally, I was wondering if it would be possible to conditionally remove the bottom border on . uniSearchBar
when the editor is in its expanded mode. That way we don't have the resizing icon overlaid on top of the dividing border when it's present (at least until we revisit the resizing styling as suggested in the Discover design refresh).
In any case, none of this is worth holding you up over, so I'm approving now. Thanks!
<div | ||
css={css` | ||
position: absolute; | ||
bottom: 0; | ||
left: 0; | ||
right: 0; | ||
`} | ||
> | ||
<EuiResizableButton | ||
data-test-subj="TextBasedLangEditor-resize" | ||
className="TextBasedLangEditor--resizableButton" | ||
onMouseDown={onMouseDownResizeHandler} | ||
onKeyDown={onKeyDownResizeHandler} | ||
onClick={setFocus} | ||
onTouchStart={onMouseDownResizeHandler} | ||
/> | ||
</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this wrapping div
element necessary? Or can the CSS positioning be applied directly to the EuiResizableButton
component?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me test it!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You were right, I removed it! 4e7a0bc
It is possible but it will require some refactoring as this styling is outside of the editor component. We can explore in another PR, closer to the Discover redesign! |
Summary
When I created the text based editor, the resizable button was not exported from EUI so I had to create my own custom solution. It was recently been exported and merged in kibana so now we can remove the custom solution and use the EUI component instead!
elastic/eui#6100