v13.1.0
This release is a minor one and it doesn't represent a breaking change. It introduces new themable options, a new JavaScript method and an improvement to the logic to decide which item to select in the sidebar taking into account the URL of the visited panel.
1. New themeable options
This release adds new themable options related to the sidebar menu button.
| Options | Type | Required | Description |
|---|---|---|---|
| sidebar_button_color_hover* | String | no | Sets the color of the sidebar hamburger menu in a hover state |
| sidebar_button_background_hover* | String | no | Sets the background of the sidebar hamburger menu in a hover state. It could be a color or a background declaration. If it is not specified, the sidebar_button_color_hover will be used, and if this one is not specified too, the sidebar_button_color will be used |
| sidebar_button_background_hover_opacity* | Number or String | no | Sets the opacity of the background of the sidebar hamburger menu in a hover state. It should be a number between 0 (fully transparent) and 1 (fully opaque). If it is not specified, the default 0.1 will be used |
Note: * These options allow JavaScript or Jinja templates.
2. A new JavaScript method to show notification toasts
In this release a new method will be available in the JavaScript templates:
showToast
This method shows a notification toast using a string or a translation resource. Optionally, it is possible to add a button with an action to the notification tost.
// Show a notification toast with a string message
showToast({
message: 'Toast example'
});
// Show a notification toast with a translation key
showToast({
message: {
translationKey: 'ui.dialogs.restart.reboot.action_toast'
}
});
// Show a notification toast with an action
showToast({
message: 'Toast example',
action: {
action: () => {
console.log('action clicked!!');
},
text: 'Action example'
}
});
// Show a notification toast with a longer duration
showToast({
message: 'Toast example',
duration: 10000 // 10 seconds
});3. Improved the logic to highlight the selected item
The logic to highlight the sidebar item depending on the selected URL has been improved. Now, it excludes the items that are hidden, so if there are hidden items with the same URL that visible ones, they will not be taken into account for the selection logic.
4. Updated direct dependencies
The direct dependencies of the plugin have been updated:
home-assistant-javascript-templates: from6.0.1to7.0.0home-assistant-query-selector: from5.0.0to6.0.1home-assistant-styles-manager: from4.0.0to4.1.0
🚀 Features
- Custom sidebar next release
- PR: #597 by @elchininet
🧩 Dependencies
- Solve vulnerabilities through pnpm overrides
- PR: #583 by @elchininet
- [Dependencies]: Bump the dependencies-dev group with 2 updates
- PR: #586 by @dependabot[bot]
- [Dependencies]: Bump the dependencies-dev group with 2 updates
- PR: #591 by @dependabot[bot]
- [Dependencies]: Bump home-assistant-javascript-templates from 6.0.0 to 6.0.1 in the dependencies-prod group
- PR: #589 by @dependabot[bot]
- [Dependencies]: Bump the dependencies-dev group with 3 updates
- PR: #593 by @dependabot[bot]
- [Dependencies]: Bump the dependencies-dev group with 1 update
- PR: #600 by @dependabot[bot]
- [Dependencies]: Bump home-assistant-styles-manager from 3.1.0 to 4.0.0 in the dependencies-prod group across 1 directory
- PR: #598 by @dependabot[bot]
- Migrate project to TypeScript 6
- PR: #601 by @elchininet
- Custom sidebar next release
- PR: #597 by @elchininet
⚙️ Configuration
- [Github Actions]: Bump dorny/paths-filter from 3 to 4 in the actions-deps group
- PR: #590 by @dependabot[bot]
- [Github Actions]: Bump the actions-deps group across 1 directory with 2 updates
- PR: #594 by @dependabot[bot]
- [Github Actions]: Bump actions/deploy-pages from 4 to 5 in the actions-deps group across 1 directory
- PR: #599 by @dependabot[bot]
- Migrate project to TypeScript 6
- PR: #601 by @elchininet