-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Migrate more-info-dialog to mwc and Lit #6345
Conversation
const domain = computeDomain(entityId); | ||
|
||
return html` | ||
<ha-dialog open @closed=${this._close} .heading=${true} hideActions> |
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.
Can we make heading
a boolean attribute so we can just make this
<ha-dialog open @closed=${this._close} .heading=${true} hideActions> | |
<ha-dialog open @closed=${this._close} heading hideActions> |
I think we might also want to rename it to something that better describes what it does. renderHeading
?
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 a hack, it is from mwc-dialog
it should be a string they only call renderHeading
when heading
is truthy, but we want to use the slot...
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.
lol ok
<ha-svg-icon .path=${mdiClose}></ha-svg-icon> | ||
</mwc-icon-button> | ||
<div class="main-title" main-title @click=${this._enlarge}> | ||
${stateObj ? computeStateName(stateObj) : ""} |
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.
Should we even render all of this when there is no stateObj
? I think we only did that in Polymer because it was so difficult to not do 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.
Should we no render the dialog at all?
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.
Nope. No state object means we hide the dialog.
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Proposed change
Migrates the more-info dialog to mwc elements and Lit.
Type of change
Example configuration
Additional information
Checklist
If user exposed functionality or configuration variables are added/changed: