refactor: remove transition effects from various components for improved performance and consistency

This commit is contained in:
Julien Froidefond
2025-12-20 11:02:11 +01:00
parent 4445a38380
commit dff2a9061f
16 changed files with 44 additions and 101 deletions

View File

@@ -85,8 +85,7 @@ function SidebarContent({
<Button
variant={isActive ? "secondary" : "ghost"}
className={cn(
"w-full justify-start gap-4 h-12 rounded-2xl transition-all duration-300",
"hover:bg-muted/70 hover:scale-[1.02] hover:shadow-md",
"w-full justify-start gap-4 h-12 rounded-2xl",
isActive &&
"bg-gradient-to-r from-primary/15 via-primary/10 to-primary/5 border-2 border-primary/30 shadow-lg shadow-primary/10 backdrop-blur-sm",
collapsed && "justify-center px-2 w-12 mx-auto",
@@ -94,8 +93,8 @@ function SidebarContent({
>
<item.icon
className={cn(
"w-5 h-5 shrink-0 transition-all duration-300",
isActive && "text-primary scale-110",
"w-5 h-5 shrink-0",
isActive && "text-primary",
)}
/>
{!collapsed && (
@@ -124,7 +123,7 @@ function SidebarContent({
<Button
variant="ghost"
className={cn(
"w-full justify-start gap-4 h-12 rounded-2xl transition-all duration-300 hover:bg-muted/70 hover:scale-[1.02] hover:shadow-md",
"w-full justify-start gap-4 h-12 rounded-2xl",
collapsed && "justify-center px-2 w-12 mx-auto",
)}
>
@@ -138,8 +137,8 @@ function SidebarContent({
variant="ghost"
onClick={handleSignOut}
className={cn(
"w-full justify-start gap-4 h-12 rounded-2xl transition-all duration-300",
"text-destructive hover:text-destructive hover:bg-destructive/15 hover:scale-[1.02] hover:shadow-md",
"w-full justify-start gap-4 h-12 rounded-2xl",
"text-destructive",
collapsed && "justify-center px-2 w-12 mx-auto",
)}
>
@@ -180,14 +179,14 @@ export function Sidebar({ open, onOpenChange }: SidebarProps) {
return (
<aside
className={cn(
"hidden md:flex flex-col h-screen glass border-r border-border transition-all duration-300",
"hidden md:flex flex-col h-screen glass border-r border-border",
"backdrop-blur-xl",
collapsed ? "w-16" : "w-64",
)}
>
<div
className={cn(
"flex items-center border-b border-border/30 transition-all duration-300",
"flex items-center border-b border-border/30",
collapsed ? "justify-center p-4" : "justify-between p-6",
)}
>
@@ -206,7 +205,7 @@ export function Sidebar({ open, onOpenChange }: SidebarProps) {
size="icon"
onClick={() => setCollapsed(!collapsed)}
className={cn(
"hover:bg-muted/60 rounded-xl transition-all duration-300 hover:scale-110",
"rounded-xl",
collapsed ? "" : "ml-auto",
)}
>