fix(ui): honor the application animation setting globally
This commit is contained in:
@@ -29,6 +29,7 @@ function getServerShellMode(): ResponsiveShellMode {
|
||||
|
||||
export interface AppShellProps {
|
||||
activeView: MainView;
|
||||
animationsEnabled?: boolean;
|
||||
onViewChange: (view: MainView) => void;
|
||||
sidebar: ReactNode;
|
||||
sidebarStatus: ReactNode;
|
||||
@@ -43,6 +44,7 @@ export interface AppShellProps {
|
||||
|
||||
export function AppShell({
|
||||
activeView,
|
||||
animationsEnabled = true,
|
||||
onViewChange,
|
||||
sidebar,
|
||||
sidebarStatus,
|
||||
@@ -74,7 +76,7 @@ export function AppShell({
|
||||
|
||||
return (
|
||||
<div
|
||||
className={`md-shell is-${responsiveMode}${hasSidebar ? " has-sidebar" : ""}${hasSidebar && effectiveSidebarCollapsed ? " has-collapsed-sidebar" : ""}`}
|
||||
className={`md-shell is-${responsiveMode}${animationsEnabled ? " is-runtime-motion-enabled" : " is-runtime-motion-disabled"}${hasSidebar ? " has-sidebar" : ""}${hasSidebar && effectiveSidebarCollapsed ? " has-collapsed-sidebar" : ""}`}
|
||||
data-responsive-mode={responsiveMode}
|
||||
>
|
||||
<AppHeader activeView={activeView} actions={headerActions} onViewChange={onViewChange} />
|
||||
|
||||
@@ -55,8 +55,8 @@
|
||||
padding: 0 16px;
|
||||
color: var(--ui-text);
|
||||
font-size: 16px;
|
||||
font-weight: 700;
|
||||
line-height: 20px;
|
||||
font-weight: 700;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.md-shell-brand-mark {
|
||||
@@ -919,50 +919,7 @@
|
||||
}
|
||||
|
||||
.md-dialog-actions,
|
||||
.md-update-dialog-actions {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.md-shell *,
|
||||
.md-shell *::before,
|
||||
.md-shell *::after {
|
||||
animation-duration: 0.01ms !important;
|
||||
animation-iteration-count: 1 !important;
|
||||
scroll-behavior: auto !important;
|
||||
transition-duration: 0.01ms !important;
|
||||
}
|
||||
|
||||
.md-shell-workspace {
|
||||
transition-duration: 520ms !important;
|
||||
}
|
||||
|
||||
.md-shell-sidebar-panel {
|
||||
transition-duration: 260ms, 520ms, 0s !important;
|
||||
}
|
||||
|
||||
.md-shell-navigation::before {
|
||||
transition-duration: 420ms, 420ms, 420ms, 120ms !important;
|
||||
}
|
||||
|
||||
.md-application-menu-tree .menu-dropdown {
|
||||
transition-property: opacity, transform, visibility !important;
|
||||
transition-duration: 150ms, 180ms, 0s !important;
|
||||
transition-timing-function: ease, cubic-bezier(0.2, 0.8, 0.2, 1), linear !important;
|
||||
transition-delay: 0s, 0s, 180ms !important;
|
||||
}
|
||||
|
||||
.md-application-menu-tree .menu-dropdown.is-open {
|
||||
transition-delay: 0s !important;
|
||||
}
|
||||
|
||||
.md-application-menu-tree .menu-submenu-dropdown {
|
||||
transition-duration: 0.01ms !important;
|
||||
transition-delay: 0s !important;
|
||||
}
|
||||
|
||||
.md-application-menu-tree .menu-submenu-dropdown.is-open {
|
||||
transition-delay: 0s !important;
|
||||
.md-update-dialog-actions {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user