From 20cca1baa2aecbec765591d3a93f7bc4ba4260f5 Mon Sep 17 00:00:00 2001 From: Yosi Levy Date: Tue, 3 May 2022 14:26:32 +0300 Subject: [PATCH 01/15] each --- src/components/ha-button-menu.ts | 75 ++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) diff --git a/src/components/ha-button-menu.ts b/src/components/ha-button-menu.ts index bf0d1d348775..66d6db0aaeb9 100644 --- a/src/components/ha-button-menu.ts +++ b/src/components/ha-button-menu.ts @@ -37,6 +37,7 @@ export class HaButtonMenu extends LitElement { { + this.querySelectorAll("mwc-list-item").forEach((item) => { + item._getUpdateComplete = item.getUpdateComplete; + + var style = document.createElement("style"); + style.innerHTML = + ".rtl-fix, .rtl-fix2 { margin-left: var(--mdc-list-item-graphic-margin, 32px) !important; margin-right: 0px !important;}"; + item.shadowRoot.appendChild(style); + var span = item.shadowRoot?.querySelector("span:first-child"); + span.className = "rtl-fix"; + + item.getUpdateComplete = function () { + var result = item._getUpdateComplete(); + var span = item.shadowRoot?.querySelector(".rtl-fix"); + span!.className = "rtl-fix2"; + new Promise(function (resolve, reject) { + setTimeout(() => resolve("done"), 0); + }).then(() => { + span!.className = "rtl-fix"; + }); + + return result; + // wait for all children to render... and then inject again. + // check if we need original injection + }; + }); + }); + } + /* + protected async firstUpdated( + _changedProperties: Map + ): void { + const children = this.querySelectorAll("mwc-list-item"); + await Promise.all(Array.from(children).map((c) => c.updateComplete)); + + this.querySelectorAll("mwc-list-item").forEach((item) => { + var style = document.createElement("style"); + style.innerHTML = + "span:first-child { margin-left: var(--mdc-list-item-graphic-margin, 32px) !important; margin-right: 0px !important;}"; + item.shadowRoot.appendChild(style); + }); + } +*/ private _handleClick(): void { if (this.disabled) { return; @@ -67,6 +114,34 @@ export class HaButtonMenu extends LitElement { ::slotted([disabled]) { color: var(--disabled-text-color); } + + /* + :host-context([style*="direction: rtl;"]) mwc-menu mwc-list-item { + background-color: red; + margin-right: 0px !important; + margin-left: var(--mdc-list-item-graphic-margin, 32px); + } + */ + + /*:host-context([style*="direction: rtl;"]) span([class*="graphic"]) {*/ + /* + :host-context([style*="direction: rtl;"]) + mwc-menu + ::slotted([mwc-list-item]) { + background-color: red; + margin-right: 0px !important; + margin-left: var(--mdc-list-item-graphic-margin, 32px); + } +*/ + + /* + :host-context([style*="direction: rtl;"]) ::slotted([mwc-list-item]) { + background-color: red; + margin-right: 0px !important; + margin-left: var(--mdc-list-item-graphic-margin, 32px); + } + */ + /*::slotted([mwc-list-item]) {*/ `; } } From 5021b6dba94a115794a516542ad9e0e243f9ba60 Mon Sep 17 00:00:00 2001 From: Yosi Levy Date: Tue, 3 May 2022 14:26:42 +0300 Subject: [PATCH 02/15] Initial commit --- src/components/ha-button-menu.ts | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/src/components/ha-button-menu.ts b/src/components/ha-button-menu.ts index 66d6db0aaeb9..e4f482add7c1 100644 --- a/src/components/ha-button-menu.ts +++ b/src/components/ha-button-menu.ts @@ -82,21 +82,7 @@ export class HaButtonMenu extends LitElement { }); }); } - /* - protected async firstUpdated( - _changedProperties: Map - ): void { - const children = this.querySelectorAll("mwc-list-item"); - await Promise.all(Array.from(children).map((c) => c.updateComplete)); - - this.querySelectorAll("mwc-list-item").forEach((item) => { - var style = document.createElement("style"); - style.innerHTML = - "span:first-child { margin-left: var(--mdc-list-item-graphic-margin, 32px) !important; margin-right: 0px !important;}"; - item.shadowRoot.appendChild(style); - }); - } -*/ + private _handleClick(): void { if (this.disabled) { return; From 949cedab124072e7956dc24971c16f47735c13eb Mon Sep 17 00:00:00 2001 From: Yosi Levy Date: Tue, 3 May 2022 14:42:28 +0300 Subject: [PATCH 03/15] Fixes --- src/components/ha-button-menu.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/components/ha-button-menu.ts b/src/components/ha-button-menu.ts index e4f482add7c1..1a782fbb8d94 100644 --- a/src/components/ha-button-menu.ts +++ b/src/components/ha-button-menu.ts @@ -63,21 +63,24 @@ export class HaButtonMenu extends LitElement { ".rtl-fix, .rtl-fix2 { margin-left: var(--mdc-list-item-graphic-margin, 32px) !important; margin-right: 0px !important;}"; item.shadowRoot.appendChild(style); var span = item.shadowRoot?.querySelector("span:first-child"); - span.className = "rtl-fix"; + span!.classList.add("rtl-fix"); item.getUpdateComplete = function () { var result = item._getUpdateComplete(); + + // re-apply class since something in ripple handler resets it even though no style changes var span = item.shadowRoot?.querySelector(".rtl-fix"); - span!.className = "rtl-fix2"; + span!.classList.remove("rtl-fix"); + span!.classList.add("rtl-fix2"); + new Promise(function (resolve, reject) { setTimeout(() => resolve("done"), 0); }).then(() => { - span!.className = "rtl-fix"; + span!.classList.remove("rtl-fix2"); + span!.classList.add("rtl-fix"); }); return result; - // wait for all children to render... and then inject again. - // check if we need original injection }; }); }); From d8c968482ffb745605545695125bdfca9cdfacef Mon Sep 17 00:00:00 2001 From: Yosi Levy Date: Tue, 3 May 2022 14:46:44 +0300 Subject: [PATCH 04/15] Cleanup --- src/components/ha-button-menu.ts | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/src/components/ha-button-menu.ts b/src/components/ha-button-menu.ts index 1a782fbb8d94..ebb7946ae2f1 100644 --- a/src/components/ha-button-menu.ts +++ b/src/components/ha-button-menu.ts @@ -103,34 +103,6 @@ export class HaButtonMenu extends LitElement { ::slotted([disabled]) { color: var(--disabled-text-color); } - - /* - :host-context([style*="direction: rtl;"]) mwc-menu mwc-list-item { - background-color: red; - margin-right: 0px !important; - margin-left: var(--mdc-list-item-graphic-margin, 32px); - } - */ - - /*:host-context([style*="direction: rtl;"]) span([class*="graphic"]) {*/ - /* - :host-context([style*="direction: rtl;"]) - mwc-menu - ::slotted([mwc-list-item]) { - background-color: red; - margin-right: 0px !important; - margin-left: var(--mdc-list-item-graphic-margin, 32px); - } -*/ - - /* - :host-context([style*="direction: rtl;"]) ::slotted([mwc-list-item]) { - background-color: red; - margin-right: 0px !important; - margin-left: var(--mdc-list-item-graphic-margin, 32px); - } - */ - /*::slotted([mwc-list-item]) {*/ `; } } From 8ef03cb3f26275894f6ae28649081bf9a16c2ad1 Mon Sep 17 00:00:00 2001 From: Yosi Levy Date: Tue, 3 May 2022 14:56:34 +0300 Subject: [PATCH 05/15] Only run when in RTL --- src/components/ha-button-menu.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/ha-button-menu.ts b/src/components/ha-button-menu.ts index ebb7946ae2f1..07fd7664e98d 100644 --- a/src/components/ha-button-menu.ts +++ b/src/components/ha-button-menu.ts @@ -60,7 +60,7 @@ export class HaButtonMenu extends LitElement { var style = document.createElement("style"); style.innerHTML = - ".rtl-fix, .rtl-fix2 { margin-left: var(--mdc-list-item-graphic-margin, 32px) !important; margin-right: 0px !important;}"; + ':host-context([style*="direction: rtl;"]) .rtl-fix, :host-context([style*="direction: rtl;"]) .rtl-fix2 { margin-left: var(--mdc-list-item-graphic-margin, 32px) !important; margin-right: 0px !important;}'; item.shadowRoot.appendChild(style); var span = item.shadowRoot?.querySelector("span:first-child"); span!.classList.add("rtl-fix"); From f7aa73bdbc6b148b463a9ce0d5c3cd94a42c16f6 Mon Sep 17 00:00:00 2001 From: Yosi Levy Date: Tue, 3 May 2022 18:09:33 +0300 Subject: [PATCH 06/15] Lint fixes --- src/components/ha-button-menu.ts | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/src/components/ha-button-menu.ts b/src/components/ha-button-menu.ts index 07fd7664e98d..acc5fa15a99a 100644 --- a/src/components/ha-button-menu.ts +++ b/src/components/ha-button-menu.ts @@ -56,29 +56,31 @@ export class HaButtonMenu extends LitElement { this.updateComplete.then(() => { this.querySelectorAll("mwc-list-item").forEach((item) => { - item._getUpdateComplete = item.getUpdateComplete; + item!._getUpdateComplete = item.getUpdateComplete; - var style = document.createElement("style"); + const style = document.createElement("style"); style.innerHTML = ':host-context([style*="direction: rtl;"]) .rtl-fix, :host-context([style*="direction: rtl;"]) .rtl-fix2 { margin-left: var(--mdc-list-item-graphic-margin, 32px) !important; margin-right: 0px !important;}'; - item.shadowRoot.appendChild(style); - var span = item.shadowRoot?.querySelector("span:first-child"); + item!.shadowRoot.appendChild(style); + const span = item.shadowRoot?.querySelector("span:first-child"); span!.classList.add("rtl-fix"); item.getUpdateComplete = function () { - var result = item._getUpdateComplete(); + const result = item._getUpdateComplete(); // re-apply class since something in ripple handler resets it even though no style changes - var span = item.shadowRoot?.querySelector(".rtl-fix"); - span!.classList.remove("rtl-fix"); - span!.classList.add("rtl-fix2"); - - new Promise(function (resolve, reject) { - setTimeout(() => resolve("done"), 0); - }).then(() => { - span!.classList.remove("rtl-fix2"); - span!.classList.add("rtl-fix"); - }); + const rtlSpan = item.shadowRoot?.querySelector(".rtl-fix"); + if (rtlSpan) { + rtlSpan!.classList.remove("rtl-fix"); + rtlSpan!.classList.add("rtl-fix2"); + + new Promise((resolve) => { + setTimeout(() => resolve("done"), 0); + }).then(() => { + span!.classList.remove("rtl-fix2"); + span!.classList.add("rtl-fix"); + }); + } return result; }; From 42d0f416c83b53ab500df0c4d00949c105351b0d Mon Sep 17 00:00:00 2001 From: Yosi Levy Date: Tue, 3 May 2022 19:59:24 +0300 Subject: [PATCH 07/15] Fix lint --- src/components/ha-button-menu.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/ha-button-menu.ts b/src/components/ha-button-menu.ts index acc5fa15a99a..809266e2a8d0 100644 --- a/src/components/ha-button-menu.ts +++ b/src/components/ha-button-menu.ts @@ -56,16 +56,19 @@ export class HaButtonMenu extends LitElement { this.updateComplete.then(() => { this.querySelectorAll("mwc-list-item").forEach((item) => { + // eslint-disable-next-line item!._getUpdateComplete = item.getUpdateComplete; const style = document.createElement("style"); style.innerHTML = ':host-context([style*="direction: rtl;"]) .rtl-fix, :host-context([style*="direction: rtl;"]) .rtl-fix2 { margin-left: var(--mdc-list-item-graphic-margin, 32px) !important; margin-right: 0px !important;}'; - item!.shadowRoot.appendChild(style); + item!.shadowRoot!.appendChild(style); const span = item.shadowRoot?.querySelector("span:first-child"); span!.classList.add("rtl-fix"); + // eslint-disable-next-line item.getUpdateComplete = function () { + // eslint-disable-next-line const result = item._getUpdateComplete(); // re-apply class since something in ripple handler resets it even though no style changes From ef9f3171cdbcab5fb6ee0bcc468281f9c3f590c6 Mon Sep 17 00:00:00 2001 From: Yosi Levy Date: Tue, 3 May 2022 20:08:36 +0300 Subject: [PATCH 08/15] Fix lint yet again --- src/components/ha-button-menu.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/ha-button-menu.ts b/src/components/ha-button-menu.ts index 809266e2a8d0..782733eec2df 100644 --- a/src/components/ha-button-menu.ts +++ b/src/components/ha-button-menu.ts @@ -56,7 +56,7 @@ export class HaButtonMenu extends LitElement { this.updateComplete.then(() => { this.querySelectorAll("mwc-list-item").forEach((item) => { - // eslint-disable-next-line + // @ts-ignore item!._getUpdateComplete = item.getUpdateComplete; const style = document.createElement("style"); @@ -66,9 +66,9 @@ export class HaButtonMenu extends LitElement { const span = item.shadowRoot?.querySelector("span:first-child"); span!.classList.add("rtl-fix"); - // eslint-disable-next-line + // @ts-ignore item.getUpdateComplete = function () { - // eslint-disable-next-line + // @ts-ignore const result = item._getUpdateComplete(); // re-apply class since something in ripple handler resets it even though no style changes From 03cbca799ae81b2e2452521195045c7140297886 Mon Sep 17 00:00:00 2001 From: Yosi Levy Date: Thu, 5 May 2022 10:00:11 +0300 Subject: [PATCH 09/15] Only run when RTL --- src/components/ha-button-menu.ts | 68 +++++++++++++++++--------------- 1 file changed, 37 insertions(+), 31 deletions(-) diff --git a/src/components/ha-button-menu.ts b/src/components/ha-button-menu.ts index 782733eec2df..cf7df8e02858 100644 --- a/src/components/ha-button-menu.ts +++ b/src/components/ha-button-menu.ts @@ -2,6 +2,7 @@ import "@material/mwc-menu"; import type { Corner, Menu, MenuCorner } from "@material/mwc-menu"; import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; import { customElement, property, query } from "lit/decorators"; +import { computeRTL } from "../common/util/compute_rtl"; @customElement("ha-button-menu") export class HaButtonMenu extends LitElement { @@ -54,41 +55,46 @@ export class HaButtonMenu extends LitElement { protected firstUpdated(changedProps): void { super.firstUpdated(changedProps); - this.updateComplete.then(() => { - this.querySelectorAll("mwc-list-item").forEach((item) => { - // @ts-ignore - item!._getUpdateComplete = item.getUpdateComplete; + document.querySelector("home-assistant")!.provideHass(this); - const style = document.createElement("style"); - style.innerHTML = - ':host-context([style*="direction: rtl;"]) .rtl-fix, :host-context([style*="direction: rtl;"]) .rtl-fix2 { margin-left: var(--mdc-list-item-graphic-margin, 32px) !important; margin-right: 0px !important;}'; - item!.shadowRoot!.appendChild(style); - const span = item.shadowRoot?.querySelector("span:first-child"); - span!.classList.add("rtl-fix"); + // @ts-ignore + if (computeRTL(this.hass!)) { + this.updateComplete.then(() => { + this.querySelectorAll("mwc-list-item").forEach((item) => { + // @ts-ignore + item!._getUpdateComplete = item.getUpdateComplete; + + const style = document.createElement("style"); + style.innerHTML = + ':host-context([style*="direction: rtl;"]) .rtl-fix, :host-context([style*="direction: rtl;"]) .rtl-fix2 { margin-left: var(--mdc-list-item-graphic-margin, 32px) !important; margin-right: 0px !important;}'; + item!.shadowRoot!.appendChild(style); + const span = item.shadowRoot?.querySelector("span:first-child"); + span!.classList.add("rtl-fix"); - // @ts-ignore - item.getUpdateComplete = function () { // @ts-ignore - const result = item._getUpdateComplete(); - - // re-apply class since something in ripple handler resets it even though no style changes - const rtlSpan = item.shadowRoot?.querySelector(".rtl-fix"); - if (rtlSpan) { - rtlSpan!.classList.remove("rtl-fix"); - rtlSpan!.classList.add("rtl-fix2"); - - new Promise((resolve) => { - setTimeout(() => resolve("done"), 0); - }).then(() => { - span!.classList.remove("rtl-fix2"); - span!.classList.add("rtl-fix"); - }); - } - - return result; - }; + item.getUpdateComplete = function () { + // @ts-ignore + const result = item._getUpdateComplete(); + + // re-apply class since something in ripple handler resets it even though no style changes + const rtlSpan = item.shadowRoot?.querySelector(".rtl-fix"); + if (rtlSpan) { + rtlSpan!.classList.remove("rtl-fix"); + rtlSpan!.classList.add("rtl-fix2"); + + new Promise((resolve) => { + setTimeout(() => resolve("done"), 0); + }).then(() => { + span!.classList.remove("rtl-fix2"); + span!.classList.add("rtl-fix"); + }); + } + + return result; + }; + }); }); - }); + } } private _handleClick(): void { From 5907d070a7ab11d2502efc0b710debb350832851 Mon Sep 17 00:00:00 2001 From: Yosi Levy Date: Thu, 5 May 2022 11:35:55 +0300 Subject: [PATCH 10/15] Removal of host-context --- src/components/ha-button-menu.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/ha-button-menu.ts b/src/components/ha-button-menu.ts index cf7df8e02858..e51d1a1b42ed 100644 --- a/src/components/ha-button-menu.ts +++ b/src/components/ha-button-menu.ts @@ -66,7 +66,7 @@ export class HaButtonMenu extends LitElement { const style = document.createElement("style"); style.innerHTML = - ':host-context([style*="direction: rtl;"]) .rtl-fix, :host-context([style*="direction: rtl;"]) .rtl-fix2 { margin-left: var(--mdc-list-item-graphic-margin, 32px) !important; margin-right: 0px !important;}'; + ".rtl-fix, .rtl-fix2 { margin-left: var(--mdc-list-item-graphic-margin, 32px) !important; margin-right: 0px !important;}"; item!.shadowRoot!.appendChild(style); const span = item.shadowRoot?.querySelector("span:first-child"); span!.classList.add("rtl-fix"); From 60f13eb7ab48e738f65813e091db63dca8890bc2 Mon Sep 17 00:00:00 2001 From: Yosi Levy Date: Thu, 5 May 2022 11:40:02 +0300 Subject: [PATCH 11/15] Switched to first-of-type --- src/components/ha-button-menu.ts | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/src/components/ha-button-menu.ts b/src/components/ha-button-menu.ts index e51d1a1b42ed..04727f778842 100644 --- a/src/components/ha-button-menu.ts +++ b/src/components/ha-button-menu.ts @@ -61,37 +61,10 @@ export class HaButtonMenu extends LitElement { if (computeRTL(this.hass!)) { this.updateComplete.then(() => { this.querySelectorAll("mwc-list-item").forEach((item) => { - // @ts-ignore - item!._getUpdateComplete = item.getUpdateComplete; - const style = document.createElement("style"); style.innerHTML = - ".rtl-fix, .rtl-fix2 { margin-left: var(--mdc-list-item-graphic-margin, 32px) !important; margin-right: 0px !important;}"; + "span.material-icons:first-of-type { margin-left: var(--mdc-list-item-graphic-margin, 32px) !important; margin-right: 0px !important;}"; item!.shadowRoot!.appendChild(style); - const span = item.shadowRoot?.querySelector("span:first-child"); - span!.classList.add("rtl-fix"); - - // @ts-ignore - item.getUpdateComplete = function () { - // @ts-ignore - const result = item._getUpdateComplete(); - - // re-apply class since something in ripple handler resets it even though no style changes - const rtlSpan = item.shadowRoot?.querySelector(".rtl-fix"); - if (rtlSpan) { - rtlSpan!.classList.remove("rtl-fix"); - rtlSpan!.classList.add("rtl-fix2"); - - new Promise((resolve) => { - setTimeout(() => resolve("done"), 0); - }).then(() => { - span!.classList.remove("rtl-fix2"); - span!.classList.add("rtl-fix"); - }); - } - - return result; - }; }); }); } From d407d9bf4e97097ec71c98eb708b5d83767e28fd Mon Sep 17 00:00:00 2001 From: Yosi Levy <37745463+yosilevy@users.noreply.github.com> Date: Sat, 7 May 2022 06:31:39 +0300 Subject: [PATCH 12/15] ID is not needed --- src/components/ha-button-menu.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/ha-button-menu.ts b/src/components/ha-button-menu.ts index 04727f778842..12e2da946acc 100644 --- a/src/components/ha-button-menu.ts +++ b/src/components/ha-button-menu.ts @@ -38,7 +38,6 @@ export class HaButtonMenu extends LitElement { Date: Tue, 10 May 2022 21:40:09 +0300 Subject: [PATCH 13/15] Fixes following review --- src/components/ha-button-menu.ts | 4 +--- src/state/translations-mixin.ts | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/components/ha-button-menu.ts b/src/components/ha-button-menu.ts index 04727f778842..4acae4529221 100644 --- a/src/components/ha-button-menu.ts +++ b/src/components/ha-button-menu.ts @@ -55,10 +55,8 @@ export class HaButtonMenu extends LitElement { protected firstUpdated(changedProps): void { super.firstUpdated(changedProps); - document.querySelector("home-assistant")!.provideHass(this); - // @ts-ignore - if (computeRTL(this.hass!)) { + if (document.dir === "rtl") { this.updateComplete.then(() => { this.querySelectorAll("mwc-list-item").forEach((item) => { const style = document.createElement("style"); diff --git a/src/state/translations-mixin.ts b/src/state/translations-mixin.ts index 5a118b67cc70..76a37c6640b1 100644 --- a/src/state/translations-mixin.ts +++ b/src/state/translations-mixin.ts @@ -1,6 +1,6 @@ import { atLeastVersion } from "../common/config/version"; import { computeLocalize, LocalizeFunc } from "../common/translations/localize"; -import { computeRTL } from "../common/util/compute_rtl"; +import { computeRTLDirection } from "../common/util/compute_rtl"; import { debounce } from "../common/util/debounce"; import { getHassTranslations, @@ -180,7 +180,7 @@ export default >(superClass: T) => private _applyTranslations(hass: HomeAssistant) { document.querySelector("html")!.setAttribute("lang", hass.language); - this.style.direction = computeRTL(hass) ? "rtl" : "ltr"; + document.dir = computeRTLDirection(hass); this._loadCoreTranslations(hass.language); this.__loadedFragmetTranslations = new Set(); this._loadFragmentTranslations(hass.language, hass.panelUrl); From bfcf0899fdb36d580bcc9768221243d9b1e0b9d0 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Tue, 10 May 2022 21:11:56 +0200 Subject: [PATCH 14/15] Update src/components/ha-button-menu.ts --- src/components/ha-button-menu.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/ha-button-menu.ts b/src/components/ha-button-menu.ts index 0bdc7a9c4c3c..fd1123c185f9 100644 --- a/src/components/ha-button-menu.ts +++ b/src/components/ha-button-menu.ts @@ -2,7 +2,6 @@ import "@material/mwc-menu"; import type { Corner, Menu, MenuCorner } from "@material/mwc-menu"; import { css, CSSResultGroup, html, LitElement, TemplateResult } from "lit"; import { customElement, property, query } from "lit/decorators"; -import { computeRTL } from "../common/util/compute_rtl"; @customElement("ha-button-menu") export class HaButtonMenu extends LitElement { From 1e505116538a4d900edd8d222ee0bdeeca6569bc Mon Sep 17 00:00:00 2001 From: Yosi Levy Date: Wed, 11 May 2022 11:35:55 +0300 Subject: [PATCH 15/15] Lint fix --- src/components/ha-button-menu.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/ha-button-menu.ts b/src/components/ha-button-menu.ts index 0bdc7a9c4c3c..cf7cfc4d2689 100644 --- a/src/components/ha-button-menu.ts +++ b/src/components/ha-button-menu.ts @@ -54,7 +54,6 @@ export class HaButtonMenu extends LitElement { protected firstUpdated(changedProps): void { super.firstUpdated(changedProps); - // @ts-ignore if (document.dir === "rtl") { this.updateComplete.then(() => { this.querySelectorAll("mwc-list-item").forEach((item) => {