From 1b8874cbd463823cb2cc486ff2169e9b7aad4086 Mon Sep 17 00:00:00 2001 From: Zack Date: Wed, 29 Jun 2022 15:27:54 -0500 Subject: [PATCH 1/5] Fix Translation on About Page --- src/panels/config/info/ha-config-info.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/panels/config/info/ha-config-info.ts b/src/panels/config/info/ha-config-info.ts index 8c9e92cd54..459531f6f1 100644 --- a/src/panels/config/info/ha-config-info.ts +++ b/src/panels/config/info/ha-config-info.ts @@ -24,6 +24,7 @@ import { haStyle } from "../../../resources/styles"; import type { HomeAssistant, Route } from "../../../types"; import { documentationUrl } from "../../../util/documentation-url"; +const JS_TYPE = __BUILD__; const JS_VERSION = __VERSION__; const PAGES: Array<{ @@ -132,7 +133,9 @@ class HaConfigInfo extends LitElement { ${this.hass.localize( "ui.panel.config.info.frontend_version", "version", - JS_VERSION + JS_VERSION, + "type", + JS_TYPE )} From 19089213e3b4c0bc439fd9a8e80aefeb44a8863e Mon Sep 17 00:00:00 2001 From: Patrick ZAJDA Date: Thu, 30 Jun 2022 11:12:35 +0200 Subject: [PATCH 2/5] Add em dash instead of blank when no fix is needed in statistics Signed-off-by: Patrick ZAJDA --- .../developer-tools/statistics/developer-tools-statistics.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/panels/developer-tools/statistics/developer-tools-statistics.ts b/src/panels/developer-tools/statistics/developer-tools-statistics.ts index 1eb71e4e05..c4f8651ac7 100644 --- a/src/panels/developer-tools/statistics/developer-tools-statistics.ts +++ b/src/panels/developer-tools/statistics/developer-tools-statistics.ts @@ -113,7 +113,7 @@ class HaPanelDevStatistics extends SubscribeMixin(LitElement) { "ui.panel.developer-tools.tabs.statistics.fix_issue.fix" )} ` - : ""}`, + : "—"}`, width: "113px", }, actions: { From 830364721b05c135218d86cceeafc621ed7d5197 Mon Sep 17 00:00:00 2001 From: piitaya Date: Thu, 30 Jun 2022 11:22:30 +0200 Subject: [PATCH 3/5] separate autocomplete options in ha-code-editor --- src/components/ha-code-editor.ts | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/src/components/ha-code-editor.ts b/src/components/ha-code-editor.ts index ff1364a934..152e7a9a6f 100644 --- a/src/components/ha-code-editor.ts +++ b/src/components/ha-code-editor.ts @@ -2,6 +2,7 @@ import type { Completion, CompletionContext, CompletionResult, + CompletionSource, } from "@codemirror/autocomplete"; import type { EditorView, KeyBinding, ViewUpdate } from "@codemirror/view"; import { HassEntities } from "home-assistant-js-websocket"; @@ -48,6 +49,9 @@ export class HaCodeEditor extends ReactiveElement { @property({ type: Boolean, attribute: "autocomplete-entities" }) public autocompleteEntities = false; + @property({ type: Boolean, attribute: "autocomplete-icons" }) + public autocompleteIcons = false; + @property() public error = false; @state() private _value = ""; @@ -160,16 +164,22 @@ export class HaCodeEditor extends ReactiveElement { ), ]; - if (!this.readOnly && this.autocompleteEntities && this.hass) { - extensions.push( - this._loadedCodeMirror.autocompletion({ - override: [ - this._entityCompletions.bind(this), - this._mdiCompletions.bind(this), - ], - maxRenderedOptions: 10, - }) - ); + if (!this.readOnly) { + const completionSources: CompletionSource[] = []; + if (this.autocompleteEntities && this.hass) { + completionSources.push(this._entityCompletions.bind(this)); + } + if (this.autocompleteIcons) { + completionSources.push(this._mdiCompletions.bind(this)); + } + if (completionSources.length > 0) { + extensions.push( + this._loadedCodeMirror.autocompletion({ + override: completionSources, + maxRenderedOptions: 10, + }) + ); + } } this.codemirror = new this._loadedCodeMirror.EditorView({ From c295ae56abbad307aa00ce48cf687a8302502114 Mon Sep 17 00:00:00 2001 From: piitaya Date: Thu, 30 Jun 2022 11:27:04 +0200 Subject: [PATCH 4/5] separate autocomplete options in ha-code-editor --- src/components/ha-selector/ha-selector-template.ts | 1 + src/components/ha-yaml-editor.ts | 1 + .../integrations/integration-panels/mqtt/mqtt-config-panel.ts | 1 + src/panels/developer-tools/template/developer-tools-template.ts | 1 + src/panels/lovelace/editor/hui-element-editor.ts | 1 + src/panels/lovelace/hui-editor.ts | 1 + 6 files changed, 6 insertions(+) diff --git a/src/components/ha-selector/ha-selector-template.ts b/src/components/ha-selector/ha-selector-template.ts index 1140ec83a7..0761473dd8 100644 --- a/src/components/ha-selector/ha-selector-template.ts +++ b/src/components/ha-selector/ha-selector-template.ts @@ -31,6 +31,7 @@ export class HaTemplateSelector extends LitElement { .readOnly=${this.disabled} autofocus autocomplete-entities + autocomplete-icons @value-changed=${this._handleChange} dir="ltr" > diff --git a/src/components/ha-yaml-editor.ts b/src/components/ha-yaml-editor.ts index a1f24f302f..bfa01b73b9 100644 --- a/src/components/ha-yaml-editor.ts +++ b/src/components/ha-yaml-editor.ts @@ -70,6 +70,7 @@ export class HaYamlEditor extends LitElement { .readOnly=${this.readOnly} mode="yaml" autocomplete-entities + autocomplete-icons .error=${this.isValid === false} @value-changed=${this._onChange} dir="ltr" diff --git a/src/panels/config/integrations/integration-panels/mqtt/mqtt-config-panel.ts b/src/panels/config/integrations/integration-panels/mqtt/mqtt-config-panel.ts index eaa03dc98f..e0f8f99319 100644 --- a/src/panels/config/integrations/integration-panels/mqtt/mqtt-config-panel.ts +++ b/src/panels/config/integrations/integration-panels/mqtt/mqtt-config-panel.ts @@ -60,6 +60,7 @@ class HaPanelDevMqtt extends LitElement { diff --git a/src/panels/lovelace/editor/hui-element-editor.ts b/src/panels/lovelace/editor/hui-element-editor.ts index e06cb7d83b..4f0483c659 100644 --- a/src/panels/lovelace/editor/hui-element-editor.ts +++ b/src/panels/lovelace/editor/hui-element-editor.ts @@ -198,6 +198,7 @@ export abstract class HuiElementEditor extends LitElement { mode="yaml" autofocus autocomplete-entities + autocomplete-icons .hass=${this.hass} .value=${this.yaml} .error=${Boolean(this._errors)} diff --git a/src/panels/lovelace/hui-editor.ts b/src/panels/lovelace/hui-editor.ts index ce6c15e99e..e59971d11f 100644 --- a/src/panels/lovelace/hui-editor.ts +++ b/src/panels/lovelace/hui-editor.ts @@ -92,6 +92,7 @@ class LovelaceFullConfigEditor extends LitElement { mode="yaml" autofocus autocomplete-entities + autocomplete-icons .hass=${this.hass} @value-changed=${this._yamlChanged} @editor-save=${this._handleSave} From b8bd15aa33845d7bae991e4394ebf59d769f845d Mon Sep 17 00:00:00 2001 From: Zack Barett Date: Thu, 30 Jun 2022 12:17:43 -0500 Subject: [PATCH 5/5] Bumped version to 20220630.0 (#13050) --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 62a5a7f846..9d88995977 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "home-assistant-frontend" -version = "20220629.0" +version = "20220630.0" license = {text = "Apache-2.0"} description = "The Home Assistant frontend" readme = "README.md"