Skip to content

Commit 7a16c51

Browse files
committed
Remove sidebar code
1 parent d72ace6 commit 7a16c51

File tree

2 files changed

+1
-29
lines changed

2 files changed

+1
-29
lines changed

src/components/ha-sidebar.ts

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ import {
2828
import { classMap } from "lit/directives/class-map";
2929
import memoizeOne from "memoize-one";
3030
import { fireEvent } from "../common/dom/fire_event";
31-
import { applyViewTransitionOnLoad } from "../common/dom/view_transition";
3231
import { toggleAttribute } from "../common/dom/toggle_attribute";
3332
import { stringCompare } from "../common/string/compare";
3433
import { throttle } from "../common/util/throttle";
@@ -42,7 +41,7 @@ import { updateCanInstall } from "../data/update";
4241
import { showEditSidebarDialog } from "../dialogs/sidebar/show-dialog-edit-sidebar";
4342
import { SubscribeMixin } from "../mixins/subscribe-mixin";
4443
import { actionHandler } from "../panels/lovelace/common/directives/action-handler-directive";
45-
import { haStyleScrollbar, haStyleViewTransitions } from "../resources/styles";
44+
import { haStyleScrollbar } from "../resources/styles";
4645
import type { HomeAssistant, PanelInfo, Route } from "../types";
4746
import "./ha-fade-in";
4847
import "./ha-icon";
@@ -307,9 +306,6 @@ class HaSidebar extends SubscribeMixin(LitElement) {
307306
protected firstUpdated(changedProps: PropertyValues) {
308307
super.firstUpdated(changedProps);
309308
this._subscribePersistentNotifications();
310-
311-
// Trigger view transition on initial load
312-
applyViewTransitionOnLoad(this);
313309
}
314310

315311
private _subscribePersistentNotifications(): void {
@@ -330,11 +326,6 @@ class HaSidebar extends SubscribeMixin(LitElement) {
330326
toggleAttribute(this, "expanded", this.alwaysExpand);
331327
}
332328

333-
// Set up view transition names for staggered animations
334-
this._listItems.forEach((item, index) => {
335-
(item as HTMLElement).style.viewTransitionName = `sidebar-item-${index}`;
336-
});
337-
338329
if (!changedProps.has("hass")) {
339330
return;
340331
}
@@ -706,7 +697,6 @@ class HaSidebar extends SubscribeMixin(LitElement) {
706697
static get styles(): CSSResultGroup {
707698
return [
708699
haStyleScrollbar,
709-
haStyleViewTransitions,
710700
css`
711701
:host {
712702
overflow: visible;
@@ -753,7 +743,6 @@ class HaSidebar extends SubscribeMixin(LitElement) {
753743
}
754744
.menu ha-icon-button {
755745
color: var(--sidebar-icon-color);
756-
view-transition-name: sidebar-menu-button;
757746
}
758747
.title {
759748
margin-left: 3px;

src/resources/styles.ts

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,6 @@ export const baseEntrypointStyles = css`
201201
`;
202202

203203
export const haStyleViewTransitions = css`
204-
/* View Transition animations for sidebar and lovelace */
205204
@media (prefers-reduced-motion: no-preference) {
206205
/* Toolbar fade in */
207206
::view-transition-group(lovelace-toolbar) {
@@ -222,22 +221,6 @@ export const haStyleViewTransitions = css`
222221
animation: fade-in-slide-down var(--ha-animation-duration) ease-out;
223222
animation-delay: var(--ha-animation-delay-base);
224223
}
225-
226-
/* Sidebar menu button */
227-
::view-transition-group(sidebar-menu-button) {
228-
animation-duration: var(--ha-animation-duration);
229-
animation-timing-function: ease-out;
230-
}
231-
::view-transition-new(sidebar-menu-button) {
232-
animation: fade-in-slide-down var(--ha-animation-duration) ease-out;
233-
animation-delay: calc(var(--ha-animation-delay-base) / 2);
234-
}
235-
236-
/* Sidebar items with staggered animation */
237-
::view-transition-group(sidebar-item-*) {
238-
animation-duration: var(--ha-animation-duration);
239-
animation-timing-function: ease-out;
240-
}
241224
}
242225
243226
@keyframes fade-in {

0 commit comments

Comments
 (0)