From 29ea355493da9f7d6d8d654d99adc135c0d58378 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Wed, 8 Apr 2026 19:49:14 +0000 Subject: [PATCH] [jules] style: Consistent hover/focus states across all buttons - Add `focus-visible` classes to `web/components/ui/Button.tsx` to provide clear keyboard focus indicators. - Implement theme-specific styles for both Neobrutalism (`focus-visible:ring-black dark:focus-visible:ring-white`) and Glassmorphism (`focus-visible:ring-white/50`). - Mark task as completed in `.Jules/todo.md`. - Document feature addition in `.Jules/changelog.md`. Co-authored-by: Devasy23 <110348311+Devasy23@users.noreply.github.com> --- .Jules/changelog.md | 5 +++++ .Jules/todo.md | 5 +++-- web/components/ui/Button.tsx | 4 ++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.Jules/changelog.md b/.Jules/changelog.md index 11fc864e..186cb7e6 100644 --- a/.Jules/changelog.md +++ b/.Jules/changelog.md @@ -55,6 +55,11 @@ - Captures errors in `AppRoutes` and displays a user-friendly message instead of a white screen. - **Technical:** Created `web/components/ErrorBoundary.tsx` using a hybrid Class+Functional approach to support Hooks in the fallback UI. Integrated into `web/App.tsx`. +- **Consistent Button Focus States:** Added `focus-visible` states to `Button` components to ensure a professional and accessible experience for keyboard users. + - **Features:** + - Neobrutalism theme: `focus-visible:ring-black` (and white in dark mode) with offsets. + - Glassmorphism theme: `focus-visible:ring-white/50` with offsets. + - **Technical:** Modified `web/components/ui/Button.tsx`. - Inline form validation in Auth page with real-time feedback and proper ARIA accessibility support (`aria-invalid`, `aria-describedby`, `role="alert"`). - Dashboard skeleton loading state (`DashboardSkeleton`) to improve perceived performance during data fetch. - Comprehensive `EmptyState` component for Groups and Friends pages to better guide new users. diff --git a/.Jules/todo.md b/.Jules/todo.md index ebb0c7a5..d4bc49b5 100644 --- a/.Jules/todo.md +++ b/.Jules/todo.md @@ -78,8 +78,9 @@ ### Web -- [ ] **[style]** Consistent hover/focus states across all buttons - - Files: `web/components/ui/Button.tsx`, usage across pages +- [x] **[style]** Consistent hover/focus states across all buttons + - Completed: 2026-02-09 + - Files: `web/components/ui/Button.tsx` - Context: Ensure all buttons have proper hover + focus-visible styles - Impact: Professional feel, keyboard users know where they are - Size: ~35 lines diff --git a/web/components/ui/Button.tsx b/web/components/ui/Button.tsx index f80c514c..e0851ad6 100644 --- a/web/components/ui/Button.tsx +++ b/web/components/ui/Button.tsx @@ -31,7 +31,7 @@ export const Button: React.FC = ({ let themeStyles = ""; if (style === THEMES.NEOBRUTALISM) { - themeStyles = "border-2 border-black shadow-[4px_4px_0px_0px_rgba(0,0,0,1)] hover:translate-x-[2px] hover:translate-y-[2px] hover:shadow-[2px_2px_0px_0px_rgba(0,0,0,1)] active:translate-x-[4px] active:translate-y-[4px] active:shadow-none rounded-none uppercase tracking-wider font-mono"; + themeStyles = "border-2 border-black shadow-[4px_4px_0px_0px_rgba(0,0,0,1)] hover:translate-x-[2px] hover:translate-y-[2px] hover:shadow-[2px_2px_0px_0px_rgba(0,0,0,1)] active:translate-x-[4px] active:translate-y-[4px] active:shadow-none rounded-none uppercase tracking-wider font-mono focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-black focus-visible:ring-offset-2 dark:focus-visible:ring-white dark:focus-visible:ring-offset-zinc-900"; if (variant === 'primary') themeStyles += " bg-neo-main text-white"; if (variant === 'secondary') themeStyles += " bg-neo-second text-black"; @@ -40,7 +40,7 @@ export const Button: React.FC = ({ } else { // Glassmorphism - themeStyles = "rounded-xl backdrop-blur-md border border-white/20 shadow-lg hover:shadow-xl active:scale-95"; + themeStyles = "rounded-xl backdrop-blur-md border border-white/20 shadow-lg hover:shadow-xl active:scale-95 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/50 focus-visible:ring-offset-2 focus-visible:ring-offset-transparent"; if (variant === 'primary') themeStyles += " bg-gradient-to-r from-blue-500 to-purple-600 text-white shadow-blue-500/30"; if (variant === 'secondary') themeStyles += " bg-white/10 text-white hover:bg-white/20";