Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .Jules/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@
## [Unreleased]

### Added
- **Button Focus States:** Implemented consistent, theme-aware hover and focus states across all buttons globally.
- **Features:**
- Distinct focus rings for keyboard navigation (`focus-visible`).
- Full support for Glassmorphism (e.g., `ring-white`, `ring-blue-500`) and Neobrutalism (e.g., `ring-black`, `ring-white`).
- Adjusts correctly based on light and dark mode variations.
- Added base semantic `focus:outline-none` style and offsets.
- **Technical:** Modified `web/components/ui/Button.tsx` and leveraged the `useTheme` hook to dynamically set `focus-visible` ring classes based on the active theme mode and style.

- **Password Strength Meter:** Added a visual password strength indicator to the signup form.
- **Features:**
- Real-time strength calculation (Length, Uppercase, Lowercase, Number, Symbol).
Expand Down
9 changes: 5 additions & 4 deletions .Jules/todo.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,11 @@

### Web

- [ ] **[style]** Consistent hover/focus states across all buttons
- Files: `web/components/ui/Button.tsx`, usage across pages
- Context: Ensure all buttons have proper hover + focus-visible styles
- Impact: Professional feel, keyboard users know where they are
- [x] **[style]** Consistent hover/focus states across all buttons
- Completed: 2026-03-17
- Files: `web/components/ui/Button.tsx`
- Context: Added dynamic, theme-aware focus rings for both Glassmorphism and Neobrutalism (light/dark)
- Impact: Professional feel, precise keyboard navigation cues
- Size: ~35 lines
- Added: 2026-01-01

Expand Down
10 changes: 6 additions & 4 deletions web/components/ui/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ export const Button: React.FC<ButtonProps> = ({
disabled,
...props
}) => {
const { style } = useTheme();
const { style, mode } = useTheme();

const baseStyles = "transition-all duration-200 font-bold flex items-center justify-center gap-2 disabled:opacity-50 disabled:cursor-not-allowed";
const baseStyles = "transition-all duration-200 font-bold flex items-center justify-center gap-2 disabled:opacity-50 disabled:cursor-not-allowed focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2";

const sizeStyles = {
sm: "px-3 py-1.5 text-sm",
Expand All @@ -31,7 +31,8 @@ export const Button: React.FC<ButtonProps> = ({
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";
const focusStyles = mode === 'dark' ? "focus-visible:ring-white focus-visible:ring-offset-black" : "focus-visible:ring-black focus-visible:ring-offset-white";
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 ${focusStyles}`;

if (variant === 'primary') themeStyles += " bg-neo-main text-white";
if (variant === 'secondary') themeStyles += " bg-neo-second text-black";
Expand All @@ -40,7 +41,8 @@ export const Button: React.FC<ButtonProps> = ({

} else {
// Glassmorphism
themeStyles = "rounded-xl backdrop-blur-md border border-white/20 shadow-lg hover:shadow-xl active:scale-95";
const focusStyles = mode === 'dark' ? "focus-visible:ring-white focus-visible:ring-offset-transparent" : "focus-visible:ring-blue-500 focus-visible:ring-offset-transparent";
themeStyles = `rounded-xl backdrop-blur-md border border-white/20 shadow-lg hover:shadow-xl active:scale-95 ${focusStyles}`;

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";
Expand Down
Loading