-
-
Notifications
You must be signed in to change notification settings - Fork 308
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
feat(layout): add default, horizontal and vertical layout for all cards #132
Conversation
7c4fad6
to
f8d2880
Compare
<paper-dropdown-menu .label=${this.label}> | ||
<paper-listbox | ||
slot="dropdown-content" | ||
attr-for-selected="value" | ||
.selected=${this.value ?? ""} | ||
.configValue=${this.configValue} | ||
@iron-select=${this._selectChanged} | ||
> | ||
<paper-item value=""> | ||
${customLocalize("editor.form.layout_picker.values.default")} | ||
</paper-item> | ||
<paper-item .value=${"vertical"}> | ||
${customLocalize("editor.form.layout_picker.values.vertical")} | ||
</paper-item> | ||
<paper-item .value=${"horizontal"}> | ||
${customLocalize("editor.form.layout_picker.values.horizontal")} | ||
</paper-item> | ||
</paper-listbox> | ||
</paper-dropdown-menu> |
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 will most likely not work with the next release of HA. The frontend has been striped of all Paper Drop downs and in place used mwc-select
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.
Issue created, #133 ;)
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 that, little things to changed, mostly typo, and it's OK for me :)
protected render(): TemplateResult { | ||
console.log(this.noCardStyle); | ||
if (this.noCardStyle) { | ||
return this.renderContent(); |
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.
So you handled #57 in the same time?
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.
Nop, it's a workaround for the alarm card but we can use this property in the future
<paper-dropdown-menu .label=${this.label}> | ||
<paper-listbox | ||
slot="dropdown-content" | ||
attr-for-selected="value" | ||
.selected=${this.value ?? ""} | ||
.configValue=${this.configValue} | ||
@iron-select=${this._selectChanged} | ||
> | ||
<paper-item value=""> | ||
${customLocalize("editor.form.layout_picker.values.default")} | ||
</paper-item> | ||
<paper-item .value=${"vertical"}> | ||
${customLocalize("editor.form.layout_picker.values.vertical")} | ||
</paper-item> | ||
<paper-item .value=${"horizontal"}> | ||
${customLocalize("editor.form.layout_picker.values.horizontal")} | ||
</paper-item> | ||
</paper-listbox> | ||
</paper-dropdown-menu> |
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.
Issue created, #133 ;)
}; | ||
export function getLayoutFromConfig(config: ConfigWithLayout): Layout { | ||
// Backward compatibility for vertical option | ||
return config.layout ?? (Boolean(config.vertical) ? "vertical" : "default"); |
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.
Nice to thought about that :)
65ff715
to
9ce3072
Compare
Description
Add different layout for all card :
The
layout
option replace thevertical
option. A backward compatibility is added.fix #34
Some examples
Light card
Entity card
Fan card
Cover card
Alarm card