mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-02 08:33:36 +00:00
refactor: optimize button animations and interval checks for performance
This commit introduces several performance improvements across the UI components: - Updated the Button component to enhance hover animations by grouping styles for better GPU efficiency. - Adjusted the interval timing in the BoardView and WorktreePanel components from 1 second to 3 and 5 seconds respectively, reducing CPU/GPU usage. - Replaced the continuous gradient rotation animation with a subtle pulse effect in global CSS to further optimize rendering performance. These changes aim to improve the overall responsiveness and efficiency of the UI components.
This commit is contained in:
@@ -597,15 +597,13 @@
|
||||
}
|
||||
|
||||
/* Animated border for in-progress cards */
|
||||
@keyframes border-rotate {
|
||||
0% {
|
||||
background-position: 0% 50%;
|
||||
/* Using a subtle pulse animation instead of continuous gradient rotation for GPU efficiency */
|
||||
@keyframes border-pulse {
|
||||
0%, 100% {
|
||||
opacity: 0.7;
|
||||
}
|
||||
50% {
|
||||
background-position: 100% 50%;
|
||||
}
|
||||
100% {
|
||||
background-position: 0% 50%;
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -614,15 +612,20 @@
|
||||
border-radius: 0.75rem;
|
||||
padding: 2px;
|
||||
background: linear-gradient(
|
||||
90deg,
|
||||
135deg,
|
||||
var(--running-indicator),
|
||||
color-mix(in oklch, var(--running-indicator), transparent 50%),
|
||||
var(--running-indicator),
|
||||
color-mix(in oklch, var(--running-indicator), transparent 50%),
|
||||
color-mix(in oklch, var(--running-indicator), transparent 30%),
|
||||
var(--running-indicator)
|
||||
);
|
||||
background-size: 200% 100%;
|
||||
animation: border-rotate 3s ease infinite;
|
||||
animation: border-pulse 2s ease-in-out infinite;
|
||||
}
|
||||
|
||||
/* Pause animation when user prefers reduced motion */
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.animated-border-wrapper {
|
||||
animation: none;
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.animated-border-wrapper > * {
|
||||
|
||||
Reference in New Issue
Block a user