From d56abe6b72848cd3d1959b08f8f04011b392313f Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Fri, 29 Mar 2024 21:22:31 +0100 Subject: [PATCH 1/2] Fix stack card border radius reset on iOS (#20278) --- src/panels/lovelace/cards/hui-stack-card.ts | 11 +++++++---- src/panels/lovelace/views/hui-panel-view.ts | 4 +--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/panels/lovelace/cards/hui-stack-card.ts b/src/panels/lovelace/cards/hui-stack-card.ts index 8fad6f7ca19e..b7b8e7758ce0 100644 --- a/src/panels/lovelace/cards/hui-stack-card.ts +++ b/src/panels/lovelace/cards/hui-stack-card.ts @@ -35,6 +35,9 @@ export abstract class HuiStackCard @state() protected _config?: T; + @property({ type: Boolean, reflect: true }) + public isPanel = false; + public getCardSize(): number | Promise { return 1; } @@ -98,10 +101,10 @@ export abstract class HuiStackCard display: block; padding: 24px 16px 16px; } - #root { - --ha-card-border-radius: var(--restore-card-border-radius, inherit); - --ha-card-border-width: var(--restore-card-border-width, inherit); - --ha-card-box-shadow: var(--restore-card-border-shadow, inherit); + :host([ispanel]) #root { + --ha-card-border-radius: var(--restore-card-border-radius); + --ha-card-border-width: var(--restore-card-border-width); + --ha-card-box-shadow: var(--restore-card-border-shadow); } `; } diff --git a/src/panels/lovelace/views/hui-panel-view.ts b/src/panels/lovelace/views/hui-panel-view.ts index a47eac437fd5..52f597eb5c98 100644 --- a/src/panels/lovelace/views/hui-panel-view.ts +++ b/src/panels/lovelace/views/hui-panel-view.ts @@ -108,7 +108,6 @@ export class PanelView extends LitElement implements LovelaceViewElement { const card: LovelaceCard = this.cards[0]; card.isPanel = true; - card.toggleAttribute("no-border", true); if (this.isStrategy || !this.lovelace?.editMode) { card.editMode = false; @@ -117,7 +116,6 @@ export class PanelView extends LitElement implements LovelaceViewElement { } const wrapper = document.createElement("hui-card-options"); - wrapper.toggleAttribute("no-border", true); wrapper.hass = this.hass; wrapper.lovelace = this.lovelace; wrapper.path = [this.index!, 0]; @@ -137,7 +135,7 @@ export class PanelView extends LitElement implements LovelaceViewElement { --restore-card-box-shadow: var(--ha-card-box-shadow, none); } - [no-border] { + * { --ha-card-border-radius: 0; --ha-card-border-width: 0; --ha-card-box-shadow: none; From 85f80ff8635c7f1b64e9ab8ee05c4c09ed63d2ab Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Fri, 29 Mar 2024 21:23:46 +0100 Subject: [PATCH 2/2] Bumped version to 20240329.1 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 0497dd5d5d42..26cdafe44428 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "home-assistant-frontend" -version = "20240329.0" +version = "20240329.1" license = {text = "Apache-2.0"} description = "The Home Assistant frontend" readme = "README.md"