diff --git a/docs/development/CENTRAL.md b/docs/development/CENTRAL.md index 26293c2..05e0fd6 100644 --- a/docs/development/CENTRAL.md +++ b/docs/development/CENTRAL.md @@ -67,3 +67,7 @@ - [Change Default Filter Flags](./devlog/2025-12-17-025500_change_default_flags.md): Completed. Updated client and server defaults for "Ignore Basic Lands", "Ignore Commander Sets", and "Ignore Tokens" to be unchecked (false). - [Sidebar Max Width](./devlog/2025-12-17-031000_sidebar_max_width.md): Completed. Constrained the left sidebar in Cube Manager to a maximum width of 400px on large screens to improve layout balance. - [Strict Pack Generation Logic](./devlog/2025-12-17-030600_fix_strict_pack_generation.md): Succeeded. Enforced strict 14-card (Standard) and 13-card (Peasant) limits, removing fallback logic to prevent invalid pack generation. +- [Toast Notification Replacement](./devlog/2025-12-17-022000_replace_alert_with_toast.md): Completed. Replaced invasive alerts with a custom Toast notification system for smoother UX. +- [Enhanced Toast Visibility](./devlog/2025-12-17-023000_enhanced_toast_visibility.md): Completed. Updated toasts to be top-center, animated, and highly visible with premium styling. +- [Unified Toast Design](./devlog/2025-12-17-023500_unified_toast_design.md): Completed. Refined toast aesthetics to match the global dark/slate theme with subtle colored accents. +- [Animated Copy Button](./devlog/2025-12-17-024000_animated_copy_button.md): Completed. Replaced copy toast with an in-place animated tick button for immediate feedback. diff --git a/docs/development/devlog/2025-12-17-022000_replace_alert_with_toast.md b/docs/development/devlog/2025-12-17-022000_replace_alert_with_toast.md new file mode 100644 index 0000000..aa3b88d --- /dev/null +++ b/docs/development/devlog/2025-12-17-022000_replace_alert_with_toast.md @@ -0,0 +1,16 @@ + +### Replaced Alert with Toast Notification + +**Status**: Completed +**Date**: 2025-12-17 + +**Description** +Replaced the invasive `alert()` on the "Copy Pack" button with a non-intrusive Toast notification. + +**Changes** +1. Created `src/client/src/components/Toast.tsx` with a `ToastProvider` and `useToast` hook. +2. Wrapped `App.tsx` with `ToastProvider`. +3. Updated `PackCard.tsx` to use `showToast` instead of `alert`. + +**Next Steps** +- Consider replacing other alerts in `CubeManager` with Toasts for consistency. diff --git a/docs/development/devlog/2025-12-17-023000_enhanced_toast_visibility.md b/docs/development/devlog/2025-12-17-023000_enhanced_toast_visibility.md new file mode 100644 index 0000000..047c16e --- /dev/null +++ b/docs/development/devlog/2025-12-17-023000_enhanced_toast_visibility.md @@ -0,0 +1,21 @@ + +### Enhanced Toast Visibility + +**Status**: Completed +**Date**: 2025-12-17 + +**Description** +Updated the Toast notification to be more prominent and centrally located, as per user feedback. + +**Changes** +1. **Position**: Moved from bottom-right to top-center (`top-6 left-1/2 -translate-x-1/2`). +2. **Animation**: Changed to `slide-in-from-top-full` with a slight zoom-in effect. +3. **Styling**: + - Increased padding (`px-6 py-4`). + - Increased border width (`border-2`) and brightness. + - Added stronger shadows (`shadow-2xl`). + - Increased contrast for text and background. + - Increased font weight to `bold`. + +**Effect** +Notifications are now impossible to miss, appearing top-center with a premium, game-like alert style. diff --git a/docs/development/devlog/2025-12-17-023500_unified_toast_design.md b/docs/development/devlog/2025-12-17-023500_unified_toast_design.md new file mode 100644 index 0000000..e810a21 --- /dev/null +++ b/docs/development/devlog/2025-12-17-023500_unified_toast_design.md @@ -0,0 +1,17 @@ + +### Unified Toast Design + +**Status**: Completed +**Date**: 2025-12-17 + +**Description** +Refined the Toast notification design to align perfectly with the "Dark Gaming Aesthetic" of the platform. + +**Changes** +1. **Consistent Palette**: Switched to `bg-slate-800` (cards) with `border-slate-700` equivalents, using colored accents only for borders and icons. +2. **Icon Enclosure**: Icons are now housed in a circular, semi-transparent colored background (`bg-emerald-500/10`) for a polished look. +3. **Typography**: Reverted to standard font weights used in other UI cards (`font-medium`) for better readability and consistency. +4. **Shadows**: Tuned shadows to be deep but subtle (`shadow-2xl shadow-emerald-900/20`), matching the ambient lighting of the app. + +**Effect** +The Toast now feels like a native part of the UI rather than a generic alert overlay. diff --git a/docs/development/devlog/2025-12-17-024000_animated_copy_button.md b/docs/development/devlog/2025-12-17-024000_animated_copy_button.md new file mode 100644 index 0000000..55f2e95 --- /dev/null +++ b/docs/development/devlog/2025-12-17-024000_animated_copy_button.md @@ -0,0 +1,20 @@ + +### Animated Copy Button + +**Status**: Completed +**Date**: 2025-12-17 + +**Description** +Replaced the toast notification for the copy action with a self-contained, animated button state. + +**Changes** +1. **Removed Toast Usage**: Detached `useToast` from `PackCard.tsx`. +2. **Local State**: Implemented `copied` state in `PackCard`. +3. **UI Feedback**: + - Button transitions from "Copy" (slate) to "Check" (emerald/green) on click. + - Added `animate-in zoom-in spin-in-12` for a satisfying "tick" animation. + - Button background and border glow green to confirm success. + - Auto-reverts after 2 seconds. + +**Effect** +Provides immediate, localized feedback for the copy action without clogging the global UI with notifications. diff --git a/src/client/src/App.tsx b/src/client/src/App.tsx index 4827ddc..da1a2d9 100644 --- a/src/client/src/App.tsx +++ b/src/client/src/App.tsx @@ -5,6 +5,7 @@ import { TournamentManager } from './modules/tournament/TournamentManager'; import { LobbyManager } from './modules/lobby/LobbyManager'; import { DeckTester } from './modules/tester/DeckTester'; import { Pack } from './services/PackGeneratorService'; +import { ToastProvider } from './components/Toast'; export const App: React.FC = () => { const [activeTab, setActiveTab] = useState<'draft' | 'bracket' | 'lobby' | 'tester'>(() => { @@ -35,58 +36,60 @@ export const App: React.FC = () => { }, [generatedPacks]); return ( -
Pack Generator & Tournament Manager
+Pack Generator & Tournament Manager
+