Skip to content

Commit

Permalink
Merge branch 'dev' into cast-launcher-colors
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremynoesen authored Feb 14, 2024
2 parents 13d1f88 + 8136cc8 commit e629e8f
Show file tree
Hide file tree
Showing 29 changed files with 311 additions and 247 deletions.
19 changes: 10 additions & 9 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
"name": "Home Assistant Frontend",
"build": {
"dockerfile": "Dockerfile",
"context": "..",
"context": ".."
},
"appPort": "8124:8123",
"postCreateCommand": "sudo apt update && sudo apt upgrade -y && sudo apt install -y libpcap-dev",
"postStartCommand": "script/bootstrap",
"containerEnv": {
"WORKSPACE_DIRECTORY": "${containerWorkspaceFolder}",
"WORKSPACE_DIRECTORY": "${containerWorkspaceFolder}"
},
"customizations": {
"vscode": {
Expand All @@ -16,7 +17,7 @@
"esbenp.prettier-vscode",
"runem.lit-plugin",
"github.vscode-pull-request-github",
"eamodio.gitlens",
"eamodio.gitlens"
],
"settings": {
"files.eol": "\n",
Expand All @@ -27,17 +28,17 @@
"editor.renderWhitespace": "boundary",
"editor.rulers": [80],
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"files.trimTrailingWhitespace": true,
"terminal.integrated.shell.linux": "/usr/bin/zsh",
"gitlens.showWelcomeOnInstall": false,
"gitlens.showWhatsNewAfterUpgrades": false,
"workbench.startupEditor": "none",
},
},
},
"workbench.startupEditor": "none"
}
}
}
}
4 changes: 2 additions & 2 deletions .github/workflows/cast_deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
ref: dev

- name: Setup Node
uses: actions/[email protected].1
uses: actions/[email protected].2
with:
node-version-file: ".nvmrc"
cache: yarn
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
ref: master

- name: Setup Node
uses: actions/[email protected].1
uses: actions/[email protected].2
with:
node-version-file: ".nvmrc"
cache: yarn
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Check out files from GitHub
uses: actions/[email protected]
- name: Setup Node
uses: actions/[email protected].1
uses: actions/[email protected].2
with:
node-version-file: ".nvmrc"
cache: yarn
Expand Down Expand Up @@ -60,7 +60,7 @@ jobs:
- name: Check out files from GitHub
uses: actions/[email protected]
- name: Setup Node
uses: actions/[email protected].1
uses: actions/[email protected].2
with:
node-version-file: ".nvmrc"
cache: yarn
Expand All @@ -78,7 +78,7 @@ jobs:
- name: Check out files from GitHub
uses: actions/[email protected]
- name: Setup Node
uses: actions/[email protected].1
uses: actions/[email protected].2
with:
node-version-file: ".nvmrc"
cache: yarn
Expand All @@ -89,7 +89,7 @@ jobs:
env:
IS_TEST: "true"
- name: Upload bundle stats
uses: actions/[email protected].0
uses: actions/[email protected].1
with:
name: frontend-bundle-stats
path: build/stats/*.json
Expand All @@ -102,7 +102,7 @@ jobs:
- name: Check out files from GitHub
uses: actions/[email protected]
- name: Setup Node
uses: actions/[email protected].1
uses: actions/[email protected].2
with:
node-version-file: ".nvmrc"
cache: yarn
Expand All @@ -113,7 +113,7 @@ jobs:
env:
IS_TEST: "true"
- name: Upload bundle stats
uses: actions/[email protected].0
uses: actions/[email protected].1
with:
name: supervisor-bundle-stats
path: build/stats/*.json
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/demo_deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
ref: dev

- name: Setup Node
uses: actions/[email protected].1
uses: actions/[email protected].2
with:
node-version-file: ".nvmrc"
cache: yarn
Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
ref: master

- name: Setup Node
uses: actions/[email protected].1
uses: actions/[email protected].2
with:
node-version-file: ".nvmrc"
cache: yarn
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/design_deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
uses: actions/[email protected]

- name: Setup Node
uses: actions/[email protected].1
uses: actions/[email protected].2
with:
node-version-file: ".nvmrc"
cache: yarn
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/design_preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
uses: actions/[email protected]

- name: Setup Node
uses: actions/[email protected].1
uses: actions/[email protected].2
with:
node-version-file: ".nvmrc"
cache: yarn
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
python-version: ${{ env.PYTHON_VERSION }}

- name: Setup Node
uses: actions/[email protected].1
uses: actions/[email protected].2
with:
node-version-file: ".nvmrc"
cache: yarn
Expand Down Expand Up @@ -57,14 +57,14 @@ jobs:
run: tar -czvf translations.tar.gz translations

- name: Upload build artifacts
uses: actions/[email protected].0
uses: actions/[email protected].1
with:
name: wheels
path: dist/home_assistant_frontend*.whl
if-no-files-found: error

- name: Upload translations
uses: actions/[email protected].0
uses: actions/[email protected].1
with:
name: translations
path: translations.tar.gz
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
python-version: ${{ env.PYTHON_VERSION }}

- name: Setup Node
uses: actions/[email protected].1
uses: actions/[email protected].2
with:
node-version-file: ".nvmrc"
cache: yarn
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/simple-tooltip.js b/simple-tooltip.js
index 78a87f6a223925f0e29fbedb268c85a142ec6985..3d686dd6a3d5a93342b4b01408089fc316b408ca 100644
--- a/simple-tooltip.js
+++ b/simple-tooltip.js
@@ -195,6 +195,8 @@ class SimpleTooltip extends LitElement {
.hidden {
position: absolute;
left: -10000px;
+ inset-inline-start: -10000px;
+ inset-inline-end: initial;
top: auto;
width: 1px;
height: 1px;
3 changes: 0 additions & 3 deletions cast/src/receiver/layout/hc-launch-screen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ class HcLaunchScreen extends LitElement {
object-fit: cover;
}
.status {
padding-right: 54px;
padding-inline-end: 54px;
padding-inline-start: initial;
color: #1d2126;
}
`;
Expand Down
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
"@codemirror/commands": "6.3.3",
"@codemirror/language": "6.10.1",
"@codemirror/legacy-modes": "6.3.3",
"@codemirror/search": "6.5.5",
"@codemirror/search": "6.5.6",
"@codemirror/state": "6.4.0",
"@codemirror/view": "6.23.1",
"@codemirror/view": "6.24.0",
"@egjs/hammerjs": "2.0.17",
"@formatjs/intl-datetimeformat": "6.12.2",
"@formatjs/intl-displaynames": "6.6.6",
Expand All @@ -54,7 +54,7 @@
"@lit-labs/motion": "1.0.7",
"@lit-labs/observers": "2.0.2",
"@lit-labs/virtualizer": "2.0.12",
"@lrnwebcomponents/simple-tooltip": "8.0.0",
"@lrnwebcomponents/simple-tooltip": "patch:@lrnwebcomponents/simple-tooltip@npm%3A8.0.0#~/.yarn/patches/@lrnwebcomponents-simple-tooltip-npm-8.0.0-77591f2e0c.patch",
"@material/chips": "=14.0.0-canary.53b3cad2f.0",
"@material/data-table": "=14.0.0-canary.53b3cad2f.0",
"@material/mwc-base": "0.27.0",
Expand Down Expand Up @@ -89,8 +89,8 @@
"@polymer/paper-toast": "3.0.1",
"@polymer/polymer": "3.5.1",
"@thomasloven/round-slider": "0.6.0",
"@vaadin/combo-box": "24.3.5",
"@vaadin/vaadin-themable-mixin": "24.3.5",
"@vaadin/combo-box": "24.3.6",
"@vaadin/vaadin-themable-mixin": "24.3.6",
"@vibrant/color": "3.2.1-alpha.1",
"@vibrant/core": "3.2.1-alpha.1",
"@vibrant/quantizer-mmcq": "3.2.1-alpha.1",
Expand All @@ -109,7 +109,7 @@
"element-internals-polyfill": "1.3.10",
"fuse.js": "7.0.0",
"google-timezones-json": "1.2.0",
"hls.js": "1.5.3",
"hls.js": "1.5.4",
"home-assistant-js-websocket": "9.1.0",
"idb-keyval": "6.2.1",
"intl-messageformat": "10.5.11",
Expand All @@ -118,7 +118,7 @@
"leaflet-draw": "1.0.4",
"lit": "2.8.0",
"luxon": "3.4.4",
"marked": "11.2.0",
"marked": "12.0.0",
"memoize-one": "6.0.0",
"node-vibrant": "3.2.1-alpha.1",
"proxy-polyfill": "0.3.2",
Expand Down Expand Up @@ -220,11 +220,11 @@
"lodash.template": "4.5.0",
"magic-string": "0.30.7",
"map-stream": "0.0.7",
"mocha": "10.2.0",
"mocha": "10.3.0",
"object-hash": "3.0.0",
"open": "10.0.3",
"pinst": "3.0.0",
"prettier": "3.2.4",
"prettier": "3.2.5",
"rollup": "2.79.1",
"rollup-plugin-string": "3.0.0",
"rollup-plugin-terser": "7.0.2",
Expand Down
4 changes: 1 addition & 3 deletions src/common/entity/compute_attribute_display.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,7 @@ export const computeAttributeValueDisplay = (

if (domain === "weather") {
unit = getWeatherUnit(config, stateObj as WeatherEntity, attribute);
}

if (TEMPERATURE_ATTRIBUTES.has(attribute)) {
} else if (TEMPERATURE_ATTRIBUTES.has(attribute)) {
unit = config.unit_system.temperature;
}

Expand Down
4 changes: 2 additions & 2 deletions src/components/chart/ha-chart-base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,9 @@ export class HaChartBase extends LitElement {
height: `${
this.height ?? this._chartHeight ?? this.clientWidth / 2
}px`,
"padding-left": `${this._paddingYAxisInternal}`,
"padding-left": `${this._paddingYAxisInternal}px`,
"padding-right": 0,
"padding-inline-start": `${this._paddingYAxisInternal}`,
"padding-inline-start": `${this._paddingYAxisInternal}px`,
"padding-inline-end": 0,
})}
>
Expand Down
4 changes: 2 additions & 2 deletions src/components/ha-drawer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { styles } from "@material/mwc-drawer/mwc-drawer.css";
import { css, PropertyValues } from "lit";
import { customElement, property } from "lit/decorators";
import { fireEvent } from "../common/dom/fire_event";
import { mainWindow } from "../common/dom/get_main_window";

const blockingElements = (document as any).$blockingElements;

Expand Down Expand Up @@ -34,7 +33,8 @@ export class HaDrawer extends DrawerBase {
protected updated(changedProps: PropertyValues) {
super.updated(changedProps);
if (changedProps.has("direction")) {
if (mainWindow.document.dir === "rtl") {
this.mdcRoot.dir = this.direction;
if (this.direction === "rtl") {
this._rtlStyle = document.createElement("style");
this._rtlStyle.innerHTML = `
.mdc-drawer--animate {
Expand Down
3 changes: 2 additions & 1 deletion src/components/ha-form/compute-initial-ha-form-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ export const computeInitialHaFormData = (
"icon" in selector ||
"template" in selector ||
"text" in selector ||
"theme" in selector
"theme" in selector ||
"object" in selector
) {
data[field.name] = "";
} else if ("number" in selector) {
Expand Down
2 changes: 2 additions & 0 deletions src/data/cloud.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export interface CloudPreferences {
google_enabled: boolean;
alexa_enabled: boolean;
remote_enabled: boolean;
remote_allow_remote_enable: boolean;
google_secure_devices_pin: string | undefined;
cloudhooks: { [webhookId: string]: CloudWebhook };
alexa_report_state: boolean;
Expand Down Expand Up @@ -139,6 +140,7 @@ export const updateCloudPref = (
google_report_state?: CloudPreferences["google_report_state"];
google_secure_devices_pin?: CloudPreferences["google_secure_devices_pin"];
tts_default_voice?: CloudPreferences["tts_default_voice"];
remote_allow_remote_enable?: CloudPreferences["remote_allow_remote_enable"];
}
) =>
hass.callWS({
Expand Down
8 changes: 7 additions & 1 deletion src/dialogs/notifications/notification-drawer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import "./notification-item";
import "../../components/ha-header-bar";
import "../../components/ha-drawer";
import type { HaDrawer } from "../../components/ha-drawer";
import { computeRTLDirection } from "../../common/util/compute_rtl";

@customElement("notification-drawer")
export class HuiNotificationDrawer extends LitElement {
Expand Down Expand Up @@ -92,7 +93,12 @@ export class HuiNotificationDrawer extends LitElement {
});

return html`
<ha-drawer type="modal" open @MDCDrawer:closed=${this._dialogClosed}>
<ha-drawer
type="modal"
open
@MDCDrawer:closed=${this._dialogClosed}
.direction=${computeRTLDirection(this.hass)}
>
<ha-header-bar>
<div slot="title">
${this.hass.localize("ui.notification_drawer.title")}
Expand Down
Loading

0 comments on commit e629e8f

Please sign in to comment.