1
0
mirror of https://github.com/home-assistant/frontend.git synced 2025-12-20 02:38:53 +00:00

Revert "Add basic view transitions between tab UIs (#28374)" (#28451)

This commit is contained in:
Aidan Timson
2025-12-09 11:18:51 +00:00
committed by GitHub
parent 4030ce3f88
commit 2ce1eaf8c6
3 changed files with 6 additions and 17 deletions

View File

@@ -13,7 +13,6 @@ import "../components/ha-svg-icon";
import "../components/ha-tab";
import { haStyleScrollbar } from "../resources/styles";
import type { HomeAssistant, Route } from "../types";
import { withViewTransition } from "../common/util/view-transition";
export interface PageNavigation {
path: string;
@@ -113,11 +112,9 @@ class HassTabsSubpage extends LitElement {
public willUpdate(changedProperties: PropertyValues) {
if (changedProperties.has("route")) {
withViewTransition(() => {
this._activeTab = this.tabs.find((tab) =>
`${this.route.prefix}${this.route.path}`.includes(tab.path)
);
});
this._activeTab = this.tabs.find((tab) =>
`${this.route.prefix}${this.route.path}`.includes(tab.path)
);
}
super.willUpdate(changedProperties);
}

View File

@@ -4,7 +4,6 @@ import type { CSSResultGroup, TemplateResult } from "lit";
import { css, html, LitElement } from "lit";
import { customElement, property } from "lit/decorators";
import { navigate } from "../../common/navigate";
import { withViewTransition } from "../../common/util/view-transition";
import "../../components/ha-button-menu";
import "../../components/ha-icon-button";
import "../../components/ha-list-item";
@@ -117,9 +116,7 @@ class PanelDeveloperTools extends LitElement {
return;
}
if (newPage !== this._page) {
withViewTransition(() => {
navigate(`/developer-tools/${newPage}`);
});
navigate(`/developer-tools/${newPage}`);
} else {
scrollTo({ behavior: "smooth", top: 0 });
}
@@ -128,9 +125,7 @@ class PanelDeveloperTools extends LitElement {
private async _handleMenuAction(ev: CustomEvent<ActionDetail>) {
switch (ev.detail.index) {
case 0:
withViewTransition(() => {
navigate(`/developer-tools/debug`);
});
navigate(`/developer-tools/debug`);
break;
}
}

View File

@@ -99,7 +99,6 @@ import type { HUIView } from "./views/hui-view";
import "./views/hui-view-background";
import "./views/hui-view-container";
import { UndoRedoController } from "../../common/controllers/undo-redo-controller";
import { withViewTransition } from "../../common/util/view-transition";
interface ActionItem {
icon: string;
@@ -1246,9 +1245,7 @@ class HUIRoot extends LitElement {
const viewIndex = Number(ev.detail.name);
if (viewIndex !== this._curView) {
const path = this.config.views[viewIndex].path || viewIndex;
withViewTransition(() => {
this._navigateToView(path);
});
this._navigateToView(path);
} else if (!this._editMode) {
scrollTo({ behavior: "smooth", top: 0 });
}