-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Remove Safari 14.0 patch for delegatesFocus #21247
Conversation
WalkthroughWalkthroughThe overall change involves the removal of the import statement for the Changes
Tip AI model upgrade
|
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.
Actionable comments posted: 1
Outside diff range comments (10)
src/entrypoints/custom-panel.ts (7)
Line range hint
93-93
: Avoid non-null assertion.Replace the non-null assertion operator with the optional chaining operator.
- panelEl!.addEventListener("hass-toggle-menu", forwardEvent); + panelEl?.addEventListener("hass-toggle-menu", forwardEvent);
Line range hint
94-94
: Specify a different type instead ofany
.Avoid using
any
as it disables many type checking rules.- window.addEventListener("location-changed", (ev: any) => { + window.addEventListener("location-changed", (ev: Event) => {
Line range hint
103-103
: Avoid non-null assertion.Replace the non-null assertion operator with the optional chaining operator.
- document.body.appendChild(panelEl!); + document.body.appendChild(panelEl);
Line range hint
108-108
: Specify a different type instead ofany
.Avoid using
any
as it disables many type checking rules.- let errorScreen; + let errorScreen: HTMLElement;
Line range hint
113-113
: Specify a different type instead ofany
.Avoid using
any
as it disables many type checking rules.- "supervisor-error-screen" + "supervisor-error-screen" as unknown as HTMLElement
Line range hint
116-116
: Specify a different type instead ofany
.Avoid using
any
as it disables many type checking rules.- "hass-error-screen" + "hass-error-screen" as unknown as HTMLElement
Line range hint
139-139
: Avoid non-null assertion.Replace the non-null assertion operator with the optional chaining operator.
- () => window.parent.customPanel!.registerIframe(initialize, setProperties), + () => window.parent.customPanel?.registerIframe(initialize, setProperties),src/entrypoints/core.ts (3)
Line range hint
76-76
: Specify a different type instead ofany
.Avoid using
any
as it disables many type checking rules.- } catch (err: any) { + } catch (err: unknown) {Tools
Biome
[error] 30-30: Unexpected any. Specify a different type.
any disables many type checking rules. Its use should be avoided.
(lint/suspicious/noExplicitAny)
Line range hint
89-89
: Avoid reassigning a function parameter.Reassigning a function parameter is confusing. Use a local variable instead.
- auth = await authProm(); + const newAuth = await authProm(); const conn = await createConnection({ auth: newAuth }); clearUrlParams(); return { auth: newAuth, conn };Tools
Biome
[error] 30-30: Unexpected any. Specify a different type.
any disables many type checking rules. Its use should be avoided.
(lint/suspicious/noExplicitAny)
Line range hint
99-99
: Avoid the delete operator which can impact performance.Use an undefined assignment instead.
- delete Document.prototype.adoptedStyleSheets; + Document.prototype.adoptedStyleSheets = undefined;Tools
Biome
[error] 30-30: Unexpected any. Specify a different type.
any disables many type checking rules. Its use should be avoided.
(lint/suspicious/noExplicitAny)
27c7799
to
d7e65e6
Compare
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.
Actionable comments posted: 1
@@ -25,7 +25,6 @@ import { subscribePanels } from "../data/ws-panels"; | |||
import { subscribeThemes } from "../data/ws-themes"; | |||
import { subscribeUser } from "../data/ws-user"; | |||
import type { ExternalAuth } from "../external_app/external_auth"; | |||
import "../resources/safari-14-attachshadow-patch"; | |||
|
|||
window.name = MAIN_WINDOW_NAME; | |||
(window as any).frontendVersion = __VERSION__; |
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.
Specify a different type instead of any
.
Avoid using any
as it disables many type checking rules.
-const connProm = async (auth) => {
+const connProm = async (auth: Auth | ExternalAuth) => {
Committable suggestion was skipped due to low confidence.
Proposed change
Deletes the patch added back in #7031. I believe this was fixed in 14.0.1 (and no devices should be stuck on 14.0), so it seems safe to bid farewell to this. ⛵
Type of change
Example configuration
Additional information
Checklist
If user exposed functionality or configuration variables are added/changed:
Summary by CodeRabbit
These changes enhance the maintainability of the code without impacting the user experience directly.