From dff2a9061ff13eef263b53839f99d0c7f7fee269 Mon Sep 17 00:00:00 2001 From: Julien Froidefond Date: Sat, 20 Dec 2025 11:02:11 +0100 Subject: [PATCH] refactor: remove transition effects from various components for improved performance and consistency --- app/globals.css | 57 ++----------------- components/accounts/account-card.tsx | 1 - components/categories/category-card.tsx | 4 +- components/categories/parent-category-row.tsx | 2 +- components/dashboard/accounts-summary.tsx | 8 +-- components/dashboard/overview-cards.tsx | 18 +++--- components/dashboard/recent-transactions.tsx | 6 +- components/dashboard/sidebar.tsx | 19 +++---- components/rules/rule-group-card.tsx | 2 +- components/ui/breadcrumb.tsx | 2 +- components/ui/button.tsx | 17 +++--- components/ui/card.tsx | 1 - components/ui/dialog.tsx | 2 +- components/ui/icon-picker.tsx | 2 +- components/ui/sheet.tsx | 2 +- components/ui/table.tsx | 2 +- 16 files changed, 44 insertions(+), 101 deletions(-) diff --git a/app/globals.css b/app/globals.css index a606e9a..39322ea 100644 --- a/app/globals.css +++ b/app/globals.css @@ -273,13 +273,9 @@ scroll-behavior: smooth; } - /* Amélioration des transitions globales avec easing fintech */ + /* Transitions globales désactivées */ * { - transition-property: - color, background-color, border-color, text-decoration-color, fill, - stroke, opacity, box-shadow, transform, filter; - transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); - transition-duration: 200ms; + transition: none !important; } /* Désactiver COMPLÈTEMENT toutes les animations pour les popovers et selects - APPROCHE AGRESSIVE */ @@ -358,42 +354,13 @@ font-weight: 700; } - /* Card hover effect avec élévation */ + /* Card hover effect désactivé */ .card-hover { - transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); position: relative; } .card-hover::before { - content: ""; - position: absolute; - inset: 0; - border-radius: inherit; - padding: 1px; - background: linear-gradient( - 135deg, - color-mix(in srgb, var(--primary) 30%, transparent) 0%, - color-mix(in srgb, var(--chart-2) 20%, transparent) 100% - ); - -webkit-mask: - linear-gradient(#fff 0 0) content-box, - linear-gradient(#fff 0 0); - -webkit-mask-composite: xor; - mask-composite: exclude; - opacity: 0; - transition: opacity 0.4s ease; - } - - .card-hover:hover { - transform: translateY(-4px) scale(1.01); - box-shadow: - 0 20px 40px -12px color-mix(in srgb, var(--primary) 20%, transparent), - 0 8px 16px -8px color-mix(in srgb, var(--foreground) 10%, transparent), - inset 0 1px 0 0 color-mix(in srgb, white 30%, transparent); - } - - .card-hover:hover::before { - opacity: 1; + display: none; } /* Background fintech moderne avec dégradés animés et formes abstraites */ @@ -446,8 +413,6 @@ background-size: 200% 200%; pointer-events: none; opacity: 1; - transition: opacity 0.5s ease; - animation: gradient-shift 25s ease infinite; } .dark .page-background { @@ -505,7 +470,6 @@ 0 8px 32px -8px color-mix(in srgb, var(--primary) 8%, transparent), 0 2px 8px -2px color-mix(in srgb, var(--foreground) 3%, transparent), inset 0 1px 0 0 color-mix(in srgb, white 25%, transparent); - transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); position: relative; overflow: hidden; } @@ -526,15 +490,6 @@ opacity: 0.5; } - .fintech-card:hover { - transform: translateY(-6px) scale(1.01); - box-shadow: - 0 24px 48px -12px color-mix(in srgb, var(--primary) 25%, transparent), - 0 8px 24px -8px color-mix(in srgb, var(--foreground) 8%, transparent), - inset 0 1px 0 0 color-mix(in srgb, white 40%, transparent); - border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); - } - /* Gradient backgrounds for stat cards très vibrants */ .stat-card-gradient-1 { background: linear-gradient( @@ -560,7 +515,6 @@ transparent 70% ); opacity: 0.3; - animation: gradient-shift 8s ease infinite; } .stat-card-gradient-2 { @@ -587,7 +541,6 @@ transparent 70% ); opacity: 0.3; - animation: gradient-shift 8s ease infinite; } .stat-card-gradient-3 { @@ -614,7 +567,6 @@ transparent 70% ); opacity: 0.3; - animation: gradient-shift 8s ease infinite; } .stat-card-gradient-4 { @@ -641,6 +593,5 @@ transparent 70% ); opacity: 0.3; - animation: gradient-shift 8s ease infinite; } } diff --git a/components/accounts/account-card.tsx b/components/accounts/account-card.tsx index a635ede..b6c01f1 100644 --- a/components/accounts/account-card.tsx +++ b/components/accounts/account-card.tsx @@ -82,7 +82,6 @@ export function AccountCard({ "relative group", isSelected && "ring-2 ring-primary shadow-lg shadow-primary/10", isDragging && "bg-muted/80 opacity-60", - "hover:scale-[1.02] transition-transform duration-200", )} > diff --git a/components/categories/category-card.tsx b/components/categories/category-card.tsx index 6ed84e2..b7853fd 100644 --- a/components/categories/category-card.tsx +++ b/components/categories/category-card.tsx @@ -25,7 +25,7 @@ export function CategoryCard({ const isMobile = useIsMobile(); return ( -
+
-
+