New warning row for non-existent entities#1946
Conversation
| } | ||
|
|
||
| protected render(): TemplateResult { | ||
| if (!this.entity) { |
There was a problem hiding this comment.
I think that we should always render this element, even if no entity set. Make it ${this.enttiy || ''} below and it's fine
There was a problem hiding this comment.
I also indirectly meant that we should remove this if, or else it doesn't make sense to default below.
balloob
left a comment
There was a problem hiding this comment.
ok to merge when comment addressed.
| private renderStyle(): TemplateResult { | ||
| return html` | ||
| <style> | ||
| div { |
There was a problem hiding this comment.
Oh, one more comment. Skip the whole div. Remove it from the template and update CSS to style :host
:host {
display: block;
background-color: yellow;
padding: 8px;
}btw do we know why we use flex: 1?
There was a problem hiding this comment.
I believe I pulled that from somewhere and just kept the copypasta without checking any of it since it just worked. (Hearing that out loud sounds like I need to put the keyboard up smh)
There was a problem hiding this comment.
That's not something I would ever do...
There was a problem hiding this comment.
I can see that we only work with the best engineers here 👍
Switch to :host was good, I removed the <div> as it is no longer needed.
There was a problem hiding this comment.
Hey, you brought on a C++ dev that started front-end stuff three months ago 🤣
I am very much the "well it works" crowd right now, but am trying to learn the why as well.
No description provided.