From c71fd055a483373626e911dd9a0bfe4f4fecb05f Mon Sep 17 00:00:00 2001 From: Steve Repsher Date: Tue, 18 Jul 2023 11:16:33 -0400 Subject: [PATCH] Expand use of prettier to all tracked files (#17311) --- .github/release-drafter.yml | 4 +- .github/workflows/codeql-analysis.yml | 60 ++--- .prettierignore | 3 + .vscode/launch.json | 6 +- .vscode/tasks.json | 2 +- cast/public/service_worker.js | 2 +- demo/public/service_worker.js | 2 +- .../Text/remove-delete-add-create.markdown | 58 +++-- gallery/src/pages/brand/logo.markdown | 3 +- .../src/pages/components/ha-alert.markdown | 46 ++-- .../src/pages/components/ha-dialogs.markdown | 30 ++- .../src/pages/components/ha-gauge.markdown | 1 - .../src/pages/components/ha-switch.markdown | 2 +- gallery/src/pages/concepts/home.markdown | 5 +- .../date-time/date-time-numeric.markdown | 2 +- .../date-time/date-time-seconds.markdown | 2 +- .../date-time/date-time-short-year.markdown | 2 +- .../pages/date-time/date-time-short.markdown | 2 +- .../src/pages/date-time/date-time.markdown | 2 +- gallery/src/pages/date-time/date.markdown | 2 +- .../src/pages/date-time/time-seconds.markdown | 2 +- .../src/pages/date-time/time-weekday.markdown | 2 +- gallery/src/pages/date-time/time.markdown | 2 +- .../src/pages/lovelace/introduction.markdown | 1 + .../user-test/configuration-menu.markdown | 222 ++++++++++-------- .../src/pages/user-test/user-types.markdown | 2 +- lint-staged.config.js | 2 +- package.json | 4 +- 28 files changed, 258 insertions(+), 215 deletions(-) create mode 100644 .prettierignore diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index 82a06ab923..26ef3a0753 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -1,8 +1,8 @@ categories: - - title: 'Dependency updates' + - title: "Dependency updates" collapse-after: 3 labels: - - 'Dependencies' + - "Dependencies" template: | ## What's Changed diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index fda71956ed..bd200e208e 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -17,44 +17,44 @@ jobs: matrix: # Override automatic language detection by changing the below list # Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python'] - language: ['javascript'] + language: ["javascript"] # Learn more... # https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection steps: - - name: Checkout repository - uses: actions/checkout@v3.5.3 - with: - # We must fetch at least the immediate parents so that if this is - # a pull request then we can checkout the head. - fetch-depth: 2 + - name: Checkout repository + uses: actions/checkout@v3.5.3 + with: + # We must fetch at least the immediate parents so that if this is + # a pull request then we can checkout the head. + fetch-depth: 2 - # If this run was triggered by a pull request event, then checkout - # the head of the pull request instead of the merge commit. - - run: git checkout HEAD^2 - if: ${{ github.event_name == 'pull_request' }} + # If this run was triggered by a pull request event, then checkout + # the head of the pull request instead of the merge commit. + - run: git checkout HEAD^2 + if: ${{ github.event_name == 'pull_request' }} - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v2 - with: - languages: ${{ matrix.language }} + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v2 + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v2 - # ℹ️ Command-line programs to run using the OS shell. - # 📚 https://git.io/JvXDl + # ℹ️ Command-line programs to run using the OS shell. + # 📚 https://git.io/JvXDl - # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines - # and modify them (or add more) to build your code if your project - # uses a compiled language + # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines + # and modify them (or add more) to build your code if your project + # uses a compiled language - #- run: | - # make bootstrap - # make release + #- run: | + # make bootstrap + # make release - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000000..bd7a779fea --- /dev/null +++ b/.prettierignore @@ -0,0 +1,3 @@ +CLA.md +CODE_OF_CONDUCT.md +LICENSE.md diff --git a/.vscode/launch.json b/.vscode/launch.json index e3be0de9c7..9b3f7b48ad 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -9,9 +9,7 @@ "webRoot": "${workspaceFolder}/hass_frontend", "disableNetworkCache": true, "preLaunchTask": "Develop Frontend", - "outFiles": [ - "${workspaceFolder}/hass_frontend/frontend_latest/*.js" - ] + "outFiles": ["${workspaceFolder}/hass_frontend/frontend_latest/*.js"] }, { "name": "Debug Gallery", @@ -39,6 +37,6 @@ "webRoot": "${workspaceFolder}/cast/dist", "disableNetworkCache": true, "preLaunchTask": "Develop Cast" - }, + } ] } diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 5e5bddec9c..91f8252e8f 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -197,7 +197,7 @@ "type": "gulp", "task": "setup-and-fetch-nightly-translations", "problemMatcher": [] - } + } ], "inputs": [ { diff --git a/cast/public/service_worker.js b/cast/public/service_worker.js index 9cd535c9fc..04c7fbdc2c 100644 --- a/cast/public/service_worker.js +++ b/cast/public/service_worker.js @@ -1,3 +1,3 @@ -self.addEventListener("fetch", function(event) { +self.addEventListener("fetch", (event) => { event.respondWith(fetch(event.request)); }); diff --git a/demo/public/service_worker.js b/demo/public/service_worker.js index 9cd535c9fc..04c7fbdc2c 100644 --- a/demo/public/service_worker.js +++ b/demo/public/service_worker.js @@ -1,3 +1,3 @@ -self.addEventListener("fetch", function(event) { +self.addEventListener("fetch", (event) => { event.respondWith(fetch(event.request)); }); diff --git a/gallery/src/pages/Text/remove-delete-add-create.markdown b/gallery/src/pages/Text/remove-delete-add-create.markdown index 395adc673c..89c61db638 100644 --- a/gallery/src/pages/Text/remove-delete-add-create.markdown +++ b/gallery/src/pages/Text/remove-delete-add-create.markdown @@ -4,53 +4,63 @@ subtitle: The difference between remove/delete and add/create. --- # Remove vs Delete + Remove and Delete are quite similar, but can be frustrating if used inconsistently. ## Remove + Take away and set aside, but kept in existence. For example: -* Removing a user's permission -* Removing a user from a group -* Removing links between items -* Removing a widget -* Removing a link -* Removing an item from a cart + +- Removing a user's permission +- Removing a user from a group +- Removing links between items +- Removing a widget +- Removing a link +- Removing an item from a cart ## Delete + Erase, rendered nonexistent or nonrecoverable. For example: -* Deleting a field -* Deleting a value in a field -* Deleting a task -* Deleting a group -* Deleting a permission -* Deleting a calendar event + +- Deleting a field +- Deleting a value in a field +- Deleting a task +- Deleting a group +- Deleting a permission +- Deleting a calendar event # Add vs Create + In most cases, Create can be paired with Delete, and Add can be paired with Remove. ## Add + An already-exisiting item. For example: -* Adding a permission to a user -* Adding a user to a group -* Adding links between items -* Adding a widget -* Adding a link -* Adding an item to a cart + +- Adding a permission to a user +- Adding a user to a group +- Adding links between items +- Adding a widget +- Adding a link +- Adding an item to a cart ## Create + Something made from scratch. For example: -* Creating a new field -* Creating a new value in a field -* Creating a new task -* Creating a new group -* Creating a new permission -* Creating a new calendar event + +- Creating a new field +- Creating a new value in a field +- Creating a new task +- Creating a new group +- Creating a new permission +- Creating a new calendar event Based on this is [UX magazine article](https://uxmag.com/articles/ui-copy-remove-vs-delete2-banner). diff --git a/gallery/src/pages/brand/logo.markdown b/gallery/src/pages/brand/logo.markdown index 550b1e056d..9cd8722f7c 100644 --- a/gallery/src/pages/brand/logo.markdown +++ b/gallery/src/pages/brand/logo.markdown @@ -10,7 +10,6 @@ As a community, we are proud of our logo. Follow these guidelines to ensure it a ![Logo](/images/logo.png) - ## Using the icon Our icon is a shorter and most used version of our logo. The icon can exist without the wordmark, the wordmark should never exist without the icon. @@ -21,7 +20,7 @@ Our icon is a shorter and most used version of our logo. The icon can exist with The pretty blue logo with a background shadow, pictured top left, is our primary logo. It should only be used with black, white, and non-duotone photography. -When needed you can use our logo without a shadow, as seen as the second variant. +When needed you can use our logo without a shadow, as seen as the second variant. The outlined logo should only be used on packaging. diff --git a/gallery/src/pages/components/ha-alert.markdown b/gallery/src/pages/components/ha-alert.markdown index 89f2aa39d8..9d2eced805 100644 --- a/gallery/src/pages/components/ha-alert.markdown +++ b/gallery/src/pages/components/ha-alert.markdown @@ -11,6 +11,7 @@ subtitle: An alert displays a short, important message in a way that attracts th # Alert `` + The alert offers four severity levels that set a distinctive icon and color. @@ -35,38 +36,46 @@ The alert offers four severity levels that set a distinctive icon and color. 2. [Implementation](#implementation) ### Resources -| Type | Link | Status | -|----------------|----------------------------------|-----------| + +| Type | Link | Status | +| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | | Design | Home Assistant DesignKit (Figma) | Available | -| Implementation | Web Component (GitHub) | Available | +| Implementation | Web Component (GitHub) | Available | ## Guidelines + ### Usage + An alert displays a short, important message in a way that attracts the user's attention without interrupting the user's task. ### Anatomy -*Documentation coming soon* + +_Documentation coming soon_ ### Error alert + Error alerts -*Real world example coming soon* +_Real world example coming soon_ ### Warning alert + Warning alerts -*Real world example coming soon* +_Real world example coming soon_ ### Info alert + Info alerts -*Real world example coming soon* +_Real world example coming soon_ ### Success alert + Success alerts -*Real world example coming soon* +_Real world example coming soon_ ### Placement - ### Accessibility + (WAI-ARIA: [https://www.w3.org/TR/wai-aria-practices/#alert](https://www.w3.org/TR/wai-aria-practices/#alert)) When the component is dynamically displayed, the content is automatically announced by most screen readers. At this time, screen readers do not inform users of alerts that are present when the page loads. @@ -78,6 +87,7 @@ Actions must have a tab index of 0 so that they can be reached by keyboard-only ## Implementation ### Example Usage + **Alert type** @@ -96,17 +106,12 @@ Actions must have a tab index of 0 so that they can be reached by keyboard-only This is an success alert — check it out! - ```html - - This is an error alert — check it out! - + This is an error alert — check it out! This is a warning alert — check it out! - - This is an info alert — check it out! - + This is an info alert — check it out! This is a success alert — check it out! @@ -154,13 +159,14 @@ The `title ` option should not be used without a description. **Slotted icon** -*Documentation coming soon* +_Documentation coming soon_ ### API + **Properties/Attributes** | Name | Type | Default | Description | -|-------------|---------|---------|-------------------------------------------------------| +| ----------- | ------- | ------- | ----------------------------------------------------- | | title | string | `` | Title to display. | | alertType | string | `info` | Severity level that set a distinctive icon and color. | | dismissable | boolean | `false` | Gives the option to close the alert. | @@ -170,8 +176,8 @@ The `title ` option should not be used without a description. **Events** -*Documentation coming soon* +_Documentation coming soon_ **CSS Custom Properties** -*Documentation coming soon* +_Documentation coming soon_ diff --git a/gallery/src/pages/components/ha-dialogs.markdown b/gallery/src/pages/components/ha-dialogs.markdown index f3736d213a..1f9c5b65c0 100644 --- a/gallery/src/pages/components/ha-dialogs.markdown +++ b/gallery/src/pages/components/ha-dialogs.markdown @@ -5,28 +5,32 @@ subtitle: Dialogs provide important prompts in a user flow. # Material Design 3 -Our dialogs are based on the latest version of Material Design. Specs and guidelines can be found on its [website](https://m3.material.io/components/dialogs/overview). +Our dialogs are based on the latest version of Material Design. Specs and guidelines can be found on its [website](https://m3.material.io/components/dialogs/overview). # Highlighted guidelines ## Content -* A best practice is to always use a title, even if it is optional by Material guidelines. -* People mainly read the title and a button. Put the most important information in those two. -* Try to avoid user generated content in the title, this could make the title unreadable long. -* If users become unsure, they read the description. Make sure this explains what will happen. -* Strive for minimalism. + +- A best practice is to always use a title, even if it is optional by Material guidelines. +- People mainly read the title and a button. Put the most important information in those two. +- Try to avoid user generated content in the title, this could make the title unreadable long. +- If users become unsure, they read the description. Make sure this explains what will happen. +- Strive for minimalism. ## Buttons and X-icon -* Keep the labels short, for example `Save`, `Delete`, `Enable`. -* Dialog with actions must always have a discard button. On desktop a `Cancel` button and X-icon, on mobile only the X-icon. -* Destructive actions should be a red warning button. -* Alert or confirmation dialogs only have buttons and no X-icon. -* Try to avoid three buttons in one dialog. Especially when you leave the dialog task unfinished. + +- Keep the labels short, for example `Save`, `Delete`, `Enable`. +- Dialog with actions must always have a discard button. On desktop a `Cancel` button and X-icon, on mobile only the X-icon. +- Destructive actions should be a red warning button. +- Alert or confirmation dialogs only have buttons and no X-icon. +- Try to avoid three buttons in one dialog. Especially when you leave the dialog task unfinished. ## Example + ### Confirmation dialog + > **Delete dashboard?** -> +> > Dashboard [dashboard name] will be permanently deleted from Home Assistant. -> +> > Cancel / Delete diff --git a/gallery/src/pages/components/ha-gauge.markdown b/gallery/src/pages/components/ha-gauge.markdown index 33419c9588..6261408c72 100644 --- a/gallery/src/pages/components/ha-gauge.markdown +++ b/gallery/src/pages/components/ha-gauge.markdown @@ -32,7 +32,6 @@ Error color gauge Gauge with background color - ## CSS variables ### Gauge diff --git a/gallery/src/pages/components/ha-switch.markdown b/gallery/src/pages/components/ha-switch.markdown index d281c3b0e8..266160bd98 100644 --- a/gallery/src/pages/components/ha-switch.markdown +++ b/gallery/src/pages/components/ha-switch.markdown @@ -30,7 +30,7 @@ For the switch / toggle there are always two variables, one for the on / checked The track element (background rounded rectangle that the round circular handle travels on) is set to being half transparent, so the final color will also be impacted by the color behind the track. `switch-checked-color` / `switch-unchecked-color` -Set both the color of the round handle and the track behind it. If you want to control them separately, use the variables below instead. +Set both the color of the round handle and the track behind it. If you want to control them separately, use the variables below instead. `switch-checked-button-color` / `switch-unchecked-button-color` Color of the round handle diff --git a/gallery/src/pages/concepts/home.markdown b/gallery/src/pages/concepts/home.markdown index 666e567455..7b8cb4ab3f 100644 --- a/gallery/src/pages/concepts/home.markdown +++ b/gallery/src/pages/concepts/home.markdown @@ -7,18 +7,21 @@ title: Home This portal aims to aid designers and developers on improving the Home Assistant interface. It consists of working code, resources and guidelines. ## Home Assistant interface + The Home Assistant frontend allows users to browse and control the state of their home, manage their automations and configure integrations. The frontend is designed as a mobile-first experience. It is a progressive web application and offers an app-like experience to our users. The Home Assistant frontend needs to be fast. But it also needs to work on a wide range of old devices. ### Material Design + The Home Assistant interface is based on Material Design. It's a design system created by Google to quickly build high-quality digital experiences. Components and guidelines that are custom made for Home Assistant are documented on this portal. For all other components check material.io. ## Designers + We want to make it as easy for designers to contribute as it is for developers. There’s a lot a designer can contribute to: - Meet us at devs_ux Discord. Feel free to share your designs, user test or strategic ideas. - Start designing with our Figma DesignKit. - Find the lates UX discussions and issues on GitHub. Everyone can start a new issue or discussion! - ## Developers + Everything you need to get started developing can be found in our Home Assistant Developer Docs. diff --git a/gallery/src/pages/date-time/date-time-numeric.markdown b/gallery/src/pages/date-time/date-time-numeric.markdown index 3310f315a1..cb52101530 100644 --- a/gallery/src/pages/date-time/date-time-numeric.markdown +++ b/gallery/src/pages/date-time/date-time-numeric.markdown @@ -4,4 +4,4 @@ title: Date-Time Format (Numeric) This pages lists all supported languages with their available date-time formats. -Formatting function: `const formatDateTimeNumeric: (dateObj: Date, locale: FrontendLocaleData) => string` \ No newline at end of file +Formatting function: `const formatDateTimeNumeric: (dateObj: Date, locale: FrontendLocaleData) => string` diff --git a/gallery/src/pages/date-time/date-time-seconds.markdown b/gallery/src/pages/date-time/date-time-seconds.markdown index 01cfa6c729..8db31b8d3a 100644 --- a/gallery/src/pages/date-time/date-time-seconds.markdown +++ b/gallery/src/pages/date-time/date-time-seconds.markdown @@ -4,4 +4,4 @@ title: Date-Time Format (Seconds) This pages lists all supported languages with their available date-time formats. -Formatting function: `const formatDateTimeWithSeconds: (dateObj: Date, locale: FrontendLocaleData) => string` \ No newline at end of file +Formatting function: `const formatDateTimeWithSeconds: (dateObj: Date, locale: FrontendLocaleData) => string` diff --git a/gallery/src/pages/date-time/date-time-short-year.markdown b/gallery/src/pages/date-time/date-time-short-year.markdown index 19e77b55b9..a69677daae 100644 --- a/gallery/src/pages/date-time/date-time-short-year.markdown +++ b/gallery/src/pages/date-time/date-time-short-year.markdown @@ -4,4 +4,4 @@ title: Date-Time Format (Short w/ Year) This pages lists all supported languages with their available date-time formats. -Formatting function: `const formatShortDateTimeWithYear: (dateObj: Date, locale: FrontendLocaleData) => string` \ No newline at end of file +Formatting function: `const formatShortDateTimeWithYear: (dateObj: Date, locale: FrontendLocaleData) => string` diff --git a/gallery/src/pages/date-time/date-time-short.markdown b/gallery/src/pages/date-time/date-time-short.markdown index 3564a7afa0..b4f5ae4ddb 100644 --- a/gallery/src/pages/date-time/date-time-short.markdown +++ b/gallery/src/pages/date-time/date-time-short.markdown @@ -4,4 +4,4 @@ title: Date-Time Format (Short) This pages lists all supported languages with their available date-time formats. -Formatting function: `const formatShortDateTime: (dateObj: Date, locale: FrontendLocaleData) => string` \ No newline at end of file +Formatting function: `const formatShortDateTime: (dateObj: Date, locale: FrontendLocaleData) => string` diff --git a/gallery/src/pages/date-time/date-time.markdown b/gallery/src/pages/date-time/date-time.markdown index cef6195ab1..0b9651125e 100644 --- a/gallery/src/pages/date-time/date-time.markdown +++ b/gallery/src/pages/date-time/date-time.markdown @@ -4,4 +4,4 @@ title: Date-Time Format This pages lists all supported languages with their available date-time formats. -Formatting function: `const formatDateTime: (dateObj: Date, locale: FrontendLocaleData) => string` \ No newline at end of file +Formatting function: `const formatDateTime: (dateObj: Date, locale: FrontendLocaleData) => string` diff --git a/gallery/src/pages/date-time/date.markdown b/gallery/src/pages/date-time/date.markdown index 599921e1c7..282160b0c2 100644 --- a/gallery/src/pages/date-time/date.markdown +++ b/gallery/src/pages/date-time/date.markdown @@ -4,4 +4,4 @@ title: Date Format (Numeric) This pages lists all supported languages with their available (numeric) date formats. -Formatting function: `const formatDateNumeric: (dateObj: Date, locale: FrontendLocaleData) => string` \ No newline at end of file +Formatting function: `const formatDateNumeric: (dateObj: Date, locale: FrontendLocaleData) => string` diff --git a/gallery/src/pages/date-time/time-seconds.markdown b/gallery/src/pages/date-time/time-seconds.markdown index 23136c29f4..d12a5a6616 100644 --- a/gallery/src/pages/date-time/time-seconds.markdown +++ b/gallery/src/pages/date-time/time-seconds.markdown @@ -4,4 +4,4 @@ title: Time Format (Seconds) This pages lists all supported languages with their available time formats. -Formatting function: `const formatTimeWithSeconds: (dateObj: Date, locale: FrontendLocaleData) => string` \ No newline at end of file +Formatting function: `const formatTimeWithSeconds: (dateObj: Date, locale: FrontendLocaleData) => string` diff --git a/gallery/src/pages/date-time/time-weekday.markdown b/gallery/src/pages/date-time/time-weekday.markdown index 637be6afe3..afb2df2904 100644 --- a/gallery/src/pages/date-time/time-weekday.markdown +++ b/gallery/src/pages/date-time/time-weekday.markdown @@ -4,4 +4,4 @@ title: Time Format (Weekday) This pages lists all supported languages with their available time formats. -Formatting function: `const formatTimeWeekday: (dateObj: Date, locale: FrontendLocaleData) => string` \ No newline at end of file +Formatting function: `const formatTimeWeekday: (dateObj: Date, locale: FrontendLocaleData) => string` diff --git a/gallery/src/pages/date-time/time.markdown b/gallery/src/pages/date-time/time.markdown index df90d8931a..c7def99887 100644 --- a/gallery/src/pages/date-time/time.markdown +++ b/gallery/src/pages/date-time/time.markdown @@ -4,4 +4,4 @@ title: Time Format This pages lists all supported languages with their available time formats. -Formatting function: `const formatTime: (dateObj: Date, locale: FrontendLocaleData) => string` \ No newline at end of file +Formatting function: `const formatTime: (dateObj: Date, locale: FrontendLocaleData) => string` diff --git a/gallery/src/pages/lovelace/introduction.markdown b/gallery/src/pages/lovelace/introduction.markdown index c7bfc791d9..8710ec1618 100644 --- a/gallery/src/pages/lovelace/introduction.markdown +++ b/gallery/src/pages/lovelace/introduction.markdown @@ -1,6 +1,7 @@ --- title: Introduction --- + Dashboards have many different cards. Each card allows the user to tell a different story about what is going on in their house. These cards are very customizable, as no household is the same. diff --git a/gallery/src/pages/user-test/configuration-menu.markdown b/gallery/src/pages/user-test/configuration-menu.markdown index 2abf0d5e3c..0adb2f2e35 100644 --- a/gallery/src/pages/user-test/configuration-menu.markdown +++ b/gallery/src/pages/user-test/configuration-menu.markdown @@ -6,197 +6,217 @@ title: "User Test: Configuration menu" At the end of last year, we created one Configuration menu by merging Supervisor. In the next iteration, we want to organize our menu by creating logical grouping and combining duplicated features. We are conducting this test to see if we are on the right track. -* Anyone could join -* Respondents recruited on Twitter, Reddit and Home Assistant Forum -* This test is open for 10 days -* UsabilityHub for user test -* Figma for prototype -* 6 questions -* 3 tasks -* Due to some limitations by UsabilityHub, it only worked on desktop +- Anyone could join +- Respondents recruited on Twitter, Reddit and Home Assistant Forum +- This test is open for 10 days +- UsabilityHub for user test +- Figma for prototype +- 6 questions +- 3 tasks +- Due to some limitations by UsabilityHub, it only worked on desktop # Results + 915 respondents took part in this test and they gave 407 comments. In general there isn’t a significant difference between: -* How long a respondent has been using Home Assistant -* Installation method -* How many visits to its Home Assistant in the past 3 months -* Home Assistant expertise +- How long a respondent has been using Home Assistant +- Installation method +- How many visits to its Home Assistant in the past 3 months +- Home Assistant expertise ## Overall menu change + This prototype organized our menu by creating logical grouping and combining duplicated features. What do people think of this change? ### Stats -* 2% (21) Like extremely -* 30% (276) Like very much -* 53% (481) Neutral -* 12% (108) Dislike very much -* 3% (26) Dislike extremely -*3 respondents passed* +- 2% (21) Like extremely +- 30% (276) Like very much +- 53% (481) Neutral +- 12% (108) Dislike very much +- 3% (26) Dislike extremely + +_3 respondents passed_ ### Comments summary + **Like** -* Clean and decluttered -* Style looks better -* Faster to use -* Merging Supervisor into different pages -* Moving Developer tools to Settings +- Clean and decluttered +- Style looks better +- Faster to use +- Merging Supervisor into different pages +- Moving Developer tools to Settings **Dislike** -* Moving Developer tools to Settings -* More clicks for scripts and helpers -* Too many changes at once causes a high learning curve -* Removing the word `Integrations` makes it harder to find them -* Difference between `Addons` and `Services` is a bit subtle -* No clear distinction between `Developer` and `System` -* Material Design got the Google image +- Moving Developer tools to Settings +- More clicks for scripts and helpers +- Too many changes at once causes a high learning curve +- Removing the word `Integrations` makes it harder to find them +- Difference between `Addons` and `Services` is a bit subtle +- No clear distinction between `Developer` and `System` +- Material Design got the Google image **Suggestions** -* More top level menu items for example logs. -* What are settings and what not? Maybe better to name it `Configuration` -* Devices are a first-class citizen in the domain of Home Assistant, and so shouldn't be tucked away in "Settings" -* Rename Developer tools (or make it only for Home Assistant developers) -* Separate administration (for instance creating users / adding lights etc) from development activities (creating automations and scripts) -* Search Bar in Settings -* Feature to put menu items in sidebar -* Unification of add-ons and integrations -* Adding ‘New’ hints to show what changed -* Give `About` a less prominent size -* Accordion view option which puts every tab below -* Dev mode and a Prod Mode -* Always show config menu (on bigger screens) +- More top level menu items for example logs. +- What are settings and what not? Maybe better to name it `Configuration` +- Devices are a first-class citizen in the domain of Home Assistant, and so shouldn't be tucked away in "Settings" +- Rename Developer tools (or make it only for Home Assistant developers) +- Separate administration (for instance creating users / adding lights etc) from development activities (creating automations and scripts) +- Search Bar in Settings +- Feature to put menu items in sidebar +- Unification of add-ons and integrations +- Adding ‘New’ hints to show what changed +- Give `About` a less prominent size +- Accordion view option which puts every tab below +- Dev mode and a Prod Mode +- Always show config menu (on bigger screens) ### Conclusion + We should keep our focus on organizing our menu by creating logical grouping and combining duplicated features. With these changes we make more people happy: -* Reconsider putting `Logs` as a top-level menu item -* Add a search bar -* Use the word `Integrations` with `Devices & Services` -* Moving `Developer tools` to `Settings` is a good idea -* Rename `Developer tools` to for example `Tools` -* Add `New` explanation popups to what has changed -* We could rename `Configuration` to `Settings` -* Give `About` a less prominent size +- Reconsider putting `Logs` as a top-level menu item +- Add a search bar +- Use the word `Integrations` with `Devices & Services` +- Moving `Developer tools` to `Settings` is a good idea +- Rename `Developer tools` to for example `Tools` +- Add `New` explanation popups to what has changed +- We could rename `Configuration` to `Settings` +- Give `About` a less prominent size ## Helpers + In Home Assistant you can create toggles, text fields, number sliders, timers and counters. Also known as `Helpers`. Where should they be placed? ### Stats -* 78% (709) respondents are using helpers. They use it for: -* 92% (645) automations and scenes -* 62% (422) dashboards -* 43% (296) virtual devices + +- 78% (709) respondents are using helpers. They use it for: +- 92% (645) automations and scenes +- 62% (422) dashboards +- 43% (296) virtual devices ### Comments summary + Some respondents commented that they think `Helpers` shouldn’t be listed under `Automations & Services`. Although almost all respondents use it for that specific purpose. ### Conclusion -Helpers is, in addition to `Automations & Services`, also partly seen as virtual devices and dashboard entities. -* We might consider promoting them in their own top-level menu item -* Rename `Helpers` to something with `controls` +Helpers is, in addition to `Automations & Services`, also partly seen as virtual devices and dashboard entities. + +- We might consider promoting them in their own top-level menu item +- Rename `Helpers` to something with `controls` ## Add person + The first task in this user test was to add a person. Since this has not changed in the current menu structure, this should be an easy assignment. How do people experience the navigation to this feature? ### Stats + 95% reached the goal screen and 98% marked the task as completed. There were 18 common paths. After the task we asked how easy it was to add a person. -* 41% (378) Extremely easy -* 48% (440) Fairly easy -* 7% (67) Neutral -* 2% (19) Somewhat difficult -* 1% (11) Very difficult +- 41% (378) Extremely easy +- 48% (440) Fairly easy +- 7% (67) Neutral +- 2% (19) Somewhat difficult +- 1% (11) Very difficult ### Comments summary -*No mentionable comments * + +_No mentionable comments _ ### Conclusion + This test showed that the current navigation design works. ## YAML + In Home Assistant you can make configuration changes in YAML files. To make these changes take effect you have to reload your YAML in the UI or do a restart. How are people doing this and can they find it in this new design? ### Stats + 83% reached the goal screen and 87% marked the task as completed. There were 59 common paths. After the task we asked how easy it was to reload the YAML changes. -* 4% (40) Extremely easy -* 22% (204) Fairly easy -* 20% (179) Neutral -* 37% (336) Somewhat difficult -* 17% (156) Very difficult +- 4% (40) Extremely easy +- 22% (204) Fairly easy +- 20% (179) Neutral +- 37% (336) Somewhat difficult +- 17% (156) Very difficult And we asked if they have seen that we've moved some functionality from current `Server Controls` to `Developer Tools`. -* 57% (517) Yes -* 43% (398) No +- 57% (517) Yes +- 43% (398) No ### Comments summary + **Like** -* YAML in Developer tools +- YAML in Developer tools **Dislike** -* Hidden restart and reload -* YAML in Developer Tools -* Combining `Developer tools` with `Server management` -* Reload Home Assistant button isn't clear what it does -* Reload/restart Home Assistant in Developer Tools +- Hidden restart and reload +- YAML in Developer Tools +- Combining `Developer tools` with `Server management` +- Reload Home Assistant button isn't clear what it does +- Reload/restart Home Assistant in Developer Tools **Suggestions** -* Reload all YAML button -* Dev mode and a Prod Mode -* Show restart/reload as buttons in System instead of overflow menu -* Explain that you can reload YAML when you want to restart your system -* YAML reloading under System +- Reload all YAML button +- Dev mode and a Prod Mode +- Show restart/reload as buttons in System instead of overflow menu +- Explain that you can reload YAML when you want to restart your system +- YAML reloading under System ### Conclusion -This test showed two different kinds of user groups: UI and YAML users. -* Moving `Developer tools` to `Settings` is a good idea -* YAML users want reload YAML and Home Assistant restart in `System` -* Move the restart and reload button to the `System` page from the overflow menu -* Add suggestion to reload YAML when a user wants to restart -* Add reload all YAML button +This test showed two different kinds of user groups: UI and YAML users. + +- Moving `Developer tools` to `Settings` is a good idea +- YAML users want reload YAML and Home Assistant restart in `System` +- Move the restart and reload button to the `System` page from the overflow menu +- Add suggestion to reload YAML when a user wants to restart +- Add reload all YAML button ## Logs + ### Stats + 70% reached the goal screen and 77% marked the task as completed. There were 48 common paths. After the task we asked to find out why your Elgato light isn't working. -* 6% (57) Extremely easy -* 28% (254) Fairly easy -* 21% (188) Neutral -* 21% (196) Somewhat difficult -* 24% (220) Very difficult +- 6% (57) Extremely easy +- 28% (254) Fairly easy +- 21% (188) Neutral +- 21% (196) Somewhat difficult +- 24% (220) Very difficult ### Comments summary **Suggestions** -* Log errors on the integration page -* Problem solving center +- Log errors on the integration page +- Problem solving center ### Conclusion + Although this test shows that a large number of respondents manage to complete the task, they find it difficult to find out the light isn’t working. -* Add logs errors/warnings to the integration page -* Reconsider putting `Logs` as a top-level menu item +- Add logs errors/warnings to the integration page +- Reconsider putting `Logs` as a top-level menu item ## Learnings for next user test -* Explain that topic is closed for comments so that you can do this test without any influence -* Mobile test should work on mobile -* Testing on an iPad got some bugs -* People like doing these kind of test and we should do them more often +- Explain that topic is closed for comments so that you can do this test without any influence +- Mobile test should work on mobile +- Testing on an iPad got some bugs +- People like doing these kind of test and we should do them more often diff --git a/gallery/src/pages/user-test/user-types.markdown b/gallery/src/pages/user-test/user-types.markdown index eacc108cd4..9dda7f4f13 100644 --- a/gallery/src/pages/user-test/user-types.markdown +++ b/gallery/src/pages/user-test/user-types.markdown @@ -2,7 +2,7 @@ title: "User types" --- -We have defined three user types for Home Assistant. They are a lean segmentation of users that helps us make decisions throughout the product. User types differ from traditional personas in that the segmentation criteria aren’t demographic and don’t personify a group into a single character with a fictitious background story. +We have defined three user types for Home Assistant. They are a lean segmentation of users that helps us make decisions throughout the product. User types differ from traditional personas in that the segmentation criteria aren’t demographic and don’t personify a group into a single character with a fictitious background story. # Outgrowers diff --git a/lint-staged.config.js b/lint-staged.config.js index be7d7f2094..27204507ea 100644 --- a/lint-staged.config.js +++ b/lint-staged.config.js @@ -1,6 +1,6 @@ export default { "*.?(c|m){js,ts}": ["eslint --fix", "prettier --write"], - "!(/translations)*.{json,css,md,html}": "prettier --write", + "*.{json,css,md,markdown,html,y?aml}": "prettier --write", "translations/*/*.json": (files) => 'printf "%s\n" "Translation files should not be added or modified here. Instead, make the necessary modifications in src/translations/en.json. Other languages are managed externally. Please see https://developers.home-assistant.io/docs/translations/ for details." ' + files.join(" ") + diff --git a/package.json b/package.json index ddfc3fd498..e1223da8e1 100644 --- a/package.json +++ b/package.json @@ -10,8 +10,8 @@ "build": "script/build_frontend", "lint:eslint": "eslint \"**/src/**/*.{js,ts,html}\" --ignore-path .gitignore", "format:eslint": "eslint \"**/src/**/*.{js,ts,html}\" --fix --ignore-path .gitignore", - "lint:prettier": "prettier \"**/src/**/*.{js,ts,json,css,md}\" --check", - "format:prettier": "prettier \"**/src/**/*.{js,ts,json,css,md}\" --write", + "lint:prettier": "prettier . --check", + "format:prettier": "prettier . --write", "lint:types": "tsc", "lint:lit": "lit-analyzer \"**/src/**/*.ts\" --format markdown --outFile result.md", "lint": "yarn run lint:eslint && yarn run lint:prettier && yarn run lint:types",