-
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
[Component templates] Address feedback #70912
[Component templates] Address feedback #70912
Conversation
Pinging @elastic/es-ui (Team:Elasticsearch UI) |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
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.
Great work @alisonelizabeth 👏🏻! I tested creating a component template and an index template (and editing both) and every was working as expected.
Left non-blocker comments.
|
||
{componentTemplateDetails?._kbnMeta.isManaged ? ( | ||
<EuiFlexItem grow={false}> | ||
{' '} |
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 whitespace intended to be included? Perhaps &npsb; would be better if so.
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.
Yes, it is intentional. I'm going to leave as is for now, but will consider changing in a follow-up PR.
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.
FYI the empty space that Alison used will allow a line break if the container forces the text to wrap, but a non-breaking space won’t allow this. In most situations I think we want the former behavior.
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 pointing this out @cjcenizal!
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.
FYI the empty space that Alison used will allow a line break if the container forces the text to wrap, but a non-breaking space won’t allow this. In most situations I think we want the former behavior.
@cjcenizal Not sure I understand correctly. Are we talking about 1 space difference (probably a few pixels) that would not wrap? Ex: hello world
(there is a space before the "h"): where would this not wrap after "hello"?
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.
I’m not sure if this answers your question but I was just pointing out that
!== ‘ ‘
. The former won’t allow a line break on the space (“hello world” will overflow its container) while the latter will (“hello world” will break into two lines consisting of “hello” and “world”).
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.
This is strange, I would need to try it out 😊 It would make sense if we were talking about hello world
but here we are adding the before the 2 words.
const cleanupComponentTemplateObject = (componentTemplate: ComponentTemplateDeserialized) => { | ||
const outputTemplate = { ...componentTemplate }; | ||
|
||
if (outputTemplate.template.settings === undefined) { |
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.
Could there ever be a case where "settings", "mappings" or "aliases" is an empty object at this point? If so we should probably also delete that from the output template.
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.
👍 It is already being stripped out here: https://github.com/elastic/kibana/blob/master/x-pack/plugins/index_management/public/application/components/shared/components/wizard_steps/use_json_step.ts#L44
💚 Build SucceededBuild metrics
History
To update your PR or re-run it, just comment with: |
This PR addresses some of the feedback received on the component templates UI:
Screenshots