perf(dashboard): optimize CSS transitions and add entrance animations

Performance and polish improvements across dashboard components:

Transition optimizations (reduces reflow/repaint overhead):
- OptionButton: transition-all → transition-[transform,border-color,
  background-color,box-shadow]
- QuestionBlock: Add transition-colors to textarea, transition-all →
  transition-[transform,filter] on send button
- SimpleInput: Same pattern as QuestionBlock
- Sidebar: transition-all → transition-colors for project buttons

Animation additions:
- App: Add animate-fade-in-up to loading and error state containers
- MessageBubble: Make fade-in-up animation conditional on non-compact
  mode to avoid animation spam in card preview

Using specific transition properties instead of transition-all tells
the browser exactly which properties to watch, avoiding unnecessary
style recalculation on unrelated property changes.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
teernisse
2026-02-25 16:32:08 -05:00
parent 4740922b8d
commit 31862f3a40
6 changed files with 10 additions and 10 deletions

View File

@@ -46,7 +46,7 @@ export function Sidebar({ projectGroups, selectedProject, onSelectProject, total
<!-- All Projects -->
<button
onClick=${() => onSelectProject(null)}
class="group flex w-full items-center gap-2.5 rounded-lg px-3 py-2 text-left transition-all ${
class="group flex w-full items-center gap-2.5 rounded-lg px-3 py-2 text-left transition-colors duration-150 ${
selectedProject === null
? 'bg-selection/50'
: 'hover:bg-selection/25'
@@ -77,7 +77,7 @@ export function Sidebar({ projectGroups, selectedProject, onSelectProject, total
<button
key=${group.projectDir}
onClick=${() => onSelectProject(group.projectDir)}
class="group flex w-full items-center gap-2.5 rounded-lg px-3 py-2 text-left transition-all ${
class="group flex w-full items-center gap-2.5 rounded-lg px-3 py-2 text-left transition-colors duration-150 ${
isSelected
? 'bg-selection/50'
: 'hover:bg-selection/25'