From dee0e517cabb6d11eb0c6da8309e48cf0910e8b4 Mon Sep 17 00:00:00 2001 From: Aidan Timson Date: Fri, 13 Feb 2026 15:52:16 +0000 Subject: [PATCH] Cleanup --- .github/copilot-instructions.md | 78 --------------------------------- 1 file changed, 78 deletions(-) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 42a30476a7..8c1dfc307c 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -372,81 +372,6 @@ export class HaPanelMyFeature extends SubscribeMixin(LitElement) { } ``` -### Creating a Dialog - -```typescript -@customElement("dialog-my-feature") -export class DialogMyFeature - extends LitElement - implements HassDialog -{ - @property({ attribute: false }) - hass!: HomeAssistant; - - @state() - private _params?: MyDialogParams; - - @state() - private _open = false; - - public async showDialog(params: MyDialogParams): Promise { - this._params = params; - this._open = true; - } - - public closeDialog(): void { - this._open = false; - } - - private _dialogClosed(): void { - this._params = undefined; - fireEvent(this, "dialog-closed", { dialog: this.localName }); - } - - protected render() { - if (!this._params) { - return nothing; - } - - return html` - -

Dialog content

- - - ${this.hass.localize("ui.common.cancel")} - - - ${this.hass.localize("ui.common.save")} - - -
- `; - } - - static styles = [haStyleDialog, css``]; -} -``` - -### Dialog Design Guidelines - -- Max width: 560px (Alert/confirmation: 320px fixed width) -- Close X-icon on top left (all screen sizes) -- Submit button grouped with cancel at bottom right -- Keep button labels short: "Save", "Delete", "Enable" -- Destructive actions use red warning button -- Always use a title (best practice) -- Strive for minimalism - #### Creating a Lovelace Card **Purpose**: Cards allow users to tell different stories about their house (based on gallery) @@ -698,9 +623,6 @@ this.hass.localize("ui.panel.config.automation.delete_confirm", { ### Component-Specific Checks -- [ ] Dialogs implement HassDialog interface -- [ ] Dialog styling uses haStyleDialog -- [ ] Dialog accessibility includes dialogInitialFocus - [ ] ha-alert used correctly for messages - [ ] ha-form uses proper schema structure - [ ] Components handle all states (loading, error, unavailable)