-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
New warning row for non-existent entities #1946
Conversation
} | ||
|
||
protected render(): TemplateResult { | ||
if (!this.entity) { |
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 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also indirectly meant that we should remove this if, or else it doesn't make sense to default below.
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.
ok to merge when comment addressed.
private renderStyle(): TemplateResult { | ||
return html` | ||
<style> | ||
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not
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 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's not something I would ever do...
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 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.