From 9f9bcaff656dda3d599630ce4fee9377ac1e7a6d Mon Sep 17 00:00:00 2001 From: Kacper Date: Mon, 15 Dec 2025 13:02:17 +0100 Subject: [PATCH] feat: enhanced ai profiles view - Refactored profiles view into modular components for better maintainability - Fixed input/textarea borders showing consistently when not focused (border-input -> border-border) - Added animated hover effects on profile cards (border color and icon animations) - Removed redundant Create Profile button, made empty state interactive - Added confirmation dialog for profile deletion to prevent accidental removal - Improved dialog scrolling behavior with max-height constraints - Added ARIA labels to profile card buttons for better accessibility - Created reusable DeleteConfirmDialog component --- apps/app/src/components/ui/input.tsx | 4 +- apps/app/src/components/ui/textarea.tsx | 2 +- .../src/components/views/profiles-view.tsx | 477 ++---------------- .../views/profiles-view/components/index.ts | 3 + .../profiles-view/components/profile-form.tsx | 204 ++++++++ .../components/profiles-header.tsx | 58 +++ .../components/sortable-profile-card.tsx | 127 +++++ .../views/profiles-view/constants.ts | 48 ++ .../components/views/profiles-view/utils.ts | 7 + 9 files changed, 496 insertions(+), 434 deletions(-) create mode 100644 apps/app/src/components/views/profiles-view/components/index.ts create mode 100644 apps/app/src/components/views/profiles-view/components/profile-form.tsx create mode 100644 apps/app/src/components/views/profiles-view/components/profiles-header.tsx create mode 100644 apps/app/src/components/views/profiles-view/components/sortable-profile-card.tsx create mode 100644 apps/app/src/components/views/profiles-view/constants.ts create mode 100644 apps/app/src/components/views/profiles-view/utils.ts diff --git a/apps/app/src/components/ui/input.tsx b/apps/app/src/components/ui/input.tsx index 04ee94af..9fb6f8a7 100644 --- a/apps/app/src/components/ui/input.tsx +++ b/apps/app/src/components/ui/input.tsx @@ -15,7 +15,7 @@ function Input({ className, type, startAddon, endAddon, ...props }: InputProps) type={type} data-slot="input" className={cn( - "file:text-foreground placeholder:text-muted-foreground/60 selection:bg-primary selection:text-primary-foreground bg-input border-input h-9 w-full min-w-0 rounded-md border px-3 py-1 text-base shadow-xs outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", + "file:text-foreground placeholder:text-muted-foreground/60 selection:bg-primary selection:text-primary-foreground bg-input border-border h-9 w-full min-w-0 rounded-md border px-3 py-1 text-base shadow-xs outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", // Inner shadow for depth "shadow-[inset_0_1px_2px_rgba(0,0,0,0.05)]", // Animated focus ring @@ -39,7 +39,7 @@ function Input({ className, type, startAddon, endAddon, ...props }: InputProps) return (
) {