From 8942adbb4c963d5cece5a8b61af2448ccabac97d Mon Sep 17 00:00:00 2001 From: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com> Date: Thu, 23 May 2024 10:01:23 +0200 Subject: [PATCH] frontend: apply sentence-style capitalization to headings (#2189) - to comply with MS Style Guide on [capitalization](https://learn.microsoft.com/en-us/style-guide/capitalization) --- docs/frontend/architecture.md | 4 ++-- docs/frontend/custom-ui/custom-card.md | 2 +- docs/frontend/custom-ui/custom-strategy.md | 8 ++++---- docs/frontend/custom-ui/custom-view.md | 8 ++++---- docs/frontend/custom-ui/registering-resources.md | 2 +- docs/frontend/external-authentication.md | 6 +++--- docs/frontend/external-bus.md | 16 ++++++++-------- 7 files changed, 23 insertions(+), 23 deletions(-) diff --git a/docs/frontend/architecture.md b/docs/frontend/architecture.md index d27e874d..614a42d7 100644 --- a/docs/frontend/architecture.md +++ b/docs/frontend/architecture.md @@ -1,5 +1,5 @@ --- -title: "Frontend Architecture" +title: "Frontend architecture" sidebar_label: "Architecture" --- @@ -35,7 +35,7 @@ Folder: `src/dialogs` Certain information and data entry is presented to users in flows. Dialogs can be triggered on any page. The most common one is the entity more info dialog, which allows users to dig into an entity's state, history, and settings. -## Data Flow +## Data flow The frontend leverages the [Websocket API](api/websocket.md) and the [Rest API](api/rest.md) to interact with Home Assistant. diff --git a/docs/frontend/custom-ui/custom-card.md b/docs/frontend/custom-ui/custom-card.md index 51ce5942..0f9d2e89 100644 --- a/docs/frontend/custom-ui/custom-card.md +++ b/docs/frontend/custom-ui/custom-card.md @@ -1,5 +1,5 @@ --- -title: "Custom Cards" +title: "Custom cards" --- [Dashboards](https://www.home-assistant.io/dashboards/) are our approach to defining your user interface for Home Assistant. We offer a lot of built-in cards, but you're not just limited to the ones that we decided to include in Home Assistant. You can build and use your own! diff --git a/docs/frontend/custom-ui/custom-strategy.md b/docs/frontend/custom-ui/custom-strategy.md index f4dd5baa..a9406be9 100644 --- a/docs/frontend/custom-ui/custom-strategy.md +++ b/docs/frontend/custom-ui/custom-strategy.md @@ -1,5 +1,5 @@ --- -title: "Custom Strategies" +title: "Custom strategies" --- _Introduced in Home Assistant 2021.5._ @@ -12,7 +12,7 @@ A strategy can be applied to the whole configuration or to a specific view. Strategies are defined as a custom element in a JavaScript file, and included [via dashboard resources](./registering-resources.md). Home Assistant will call static functions on the class instead of rendering it as a custom element. -## Dashboard Strategies +## Dashboard strategies A dashboard strategy is responsible for generating a full dashboard configuration. This can either be from scratch, or based on an existing dashboard configuration that is passed in. @@ -52,7 +52,7 @@ strategy: type: custom:my-demo ``` -## View Strategies +## View strategies A view strategy is responsible for generating the configuration of a specific dashboard view. The strategy is invoked when the user opens the specific view. @@ -88,7 +88,7 @@ views: type: custom:my-demo ``` -## Full Example +## Full example It's recommended for a dashboard strategy to leave as much work to be done to the view strategies. That way the dashboard will show up for the user as fast as possible. This can be done by having the dashboard generate a configuration with views that rely on its own strategy. diff --git a/docs/frontend/custom-ui/custom-view.md b/docs/frontend/custom-ui/custom-view.md index c7065cd7..1ce731b0 100644 --- a/docs/frontend/custom-ui/custom-view.md +++ b/docs/frontend/custom-ui/custom-view.md @@ -1,8 +1,8 @@ --- -title: "Custom View Layout" +title: "Custom view layout" --- -By default Home Assistant will try to show the cards in a masonry layout (like Pinterest). A Custom View Layout allows developers to override this and define the layout mechanism (like a grid). +By default Home Assistant will try to show the cards in a masonry layout (like Pinterest). A custom view layout allows developers to override this and define the layout mechanism (like a grid). ## API @@ -63,7 +63,7 @@ A custom view can be used by adding the following to the definition of your view The default masonry view is an example of a layout element. ([source](https://github.com/home-assistant/frontend/blob/master/src/panels/lovelace/views/hui-masonry-view.ts)). -## Store Custom Data +## Store custom data If your view requires data to persist at a card level, there is a `view_layout` in the card configuration that can be used to store information. Example: Key, X and Y coordinates, width and height, etc. This can be useful when you need to store the location or dimensions of a card for your view. @@ -75,7 +75,7 @@ If your view requires data to persist at a card level, there is a `view_layout` entity: weather.my_weather ``` -## Edit, Delete, or Add a Card +## Edit, delete, or add a card To call the core frontend dialogs to edit, delete or add a card, you can simply call these three events: diff --git a/docs/frontend/custom-ui/registering-resources.md b/docs/frontend/custom-ui/registering-resources.md index 841f3712..d81a6166 100644 --- a/docs/frontend/custom-ui/registering-resources.md +++ b/docs/frontend/custom-ui/registering-resources.md @@ -1,5 +1,5 @@ --- -title: "Registering Resources" +title: "Registering resources" --- If you want to extend the Home Assistant interface with custom cards, strategies or views you need to load external resources. diff --git a/docs/frontend/external-authentication.md b/docs/frontend/external-authentication.md index 94506e06..47ca3632 100644 --- a/docs/frontend/external-authentication.md +++ b/docs/frontend/external-authentication.md @@ -1,5 +1,5 @@ --- -title: "External Authentication" +title: "External authentication" --- By default, the frontend will take care of its own authentication tokens. If none are found, it will redirect the user to the login page and it will take care of updating the token. @@ -8,7 +8,7 @@ If you want to embed the Home Assistant frontend in an external app, you will wa To activate this API, load the frontend with `?external_auth=1` appended to the URL. If this is passed in, Home Assistant will expect either `window.externalApp` (for Android) or `window.webkit.messageHandlers` (for iOS) to be defined containing the methods described below. -## Get Access Token +## Get access token _This API has been introduced in Home Assistant 0.78._ @@ -43,7 +43,7 @@ window.externalAuthSetToken(false); The frontend will call this method when the page first loads and whenever it needs a valid token but the previous received token has expired. -## Revoke Token +## Revoke token _This API has been introduced in Home Assistant 0.78._ diff --git a/docs/frontend/external-bus.md b/docs/frontend/external-bus.md index 2bb0ba67..4316fba1 100644 --- a/docs/frontend/external-bus.md +++ b/docs/frontend/external-bus.md @@ -1,5 +1,5 @@ --- -title: "External Bus" +title: "External bus" --- The frontend is able to set up a message bus with an external app that is embedding the Home Assistant frontend. This system is a generalization of the [external authentication](frontend/external-authentication.md), making it easier to add more commands in the future without extensive plumbing on either the app or frontend side. @@ -32,7 +32,7 @@ window.externalBus(message: string) The message describes an action or a piece of information that the sender wants the receiver to do or know about. If it's an action, the sender will expect a response with the result of that action. A response to a command can either be successful or failed. -### Action and Info Message format +### Action and info message format The format of a message that contains or provides information is the same. It contains an identifier, a type and an optional payload (depending on the type). @@ -57,7 +57,7 @@ An example message: } ``` -### Result Message Format +### Result message format If the message was an action, the sender will expect a response with the result. The response is either success or failure. @@ -86,7 +86,7 @@ interface ErrorResult { ## Supported messages -### Get External Config +### Get external config Available in: Home Assistant 0.92 Type: `config/get` @@ -107,7 +107,7 @@ Expected response payload: - `hasSettingsScreen` set to true if the external app will show a configuration screen when it receives the command `config_screen/show`. If so, a new option will be added to the sidebar to trigger the configuration screen. - `canWriteTag` set to true if the external app is able to write tags and so can support the `tag/write` command. -### Show Config Screen `config_screen/show` +### Show config screen `config_screen/show` Available in: Home Assistant 0.92 Type: `config_screen/show` @@ -116,7 +116,7 @@ Expect answer: no Show the configuration screen of the external app. -### Connection Status update `connection-status` +### Connection status update `connection-status` Available in: Home Assistant 0.92 Type: `connection-status` @@ -133,7 +133,7 @@ Payload structure: } ``` -### Trigger Haptic `haptic` +### Trigger haptic `haptic` Available in: Home Assistant 0.92 Type: `haptic` @@ -158,7 +158,7 @@ Payload structure: } ``` -### Write Tag `tag/write` +### Write tag `tag/write` Available in: Home Assistant 0.115 Type: `tag/write`