- Added a Maximize/Minimize button in the chatbot header
- Uses
Maximize2andMinimize2icons from Lucide React - Located next to the Clear Chat and Close buttons
- Small Mode: 384px × 512px (24rem × 32rem) floating window
- Full-Screen Mode: Takes up most of the screen with padding
- Smooth transitions between modes
- Better message spacing in full-screen (70% max width vs 85%)
- Backdrop overlay when in full-screen mode for better focus
- Larger padding in full-screen (24px vs 16px)
- Better message width - more readable in full-screen
- Rounded corners maintained even in full-screen mode
- Escape key to exit full-screen mode
- Automatic event listener cleanup
- New
isFullScreenstate variable toggleFullScreen()function- Proper state persistence during mode switching
- Open Chatbot: Click the floating chat button
- Enter Full-Screen: Click the maximize button (⛶) in the header
- Exit Full-Screen:
- Click the minimize button (⊟) in the header, OR
- Press the Escape key
// New state
const [isFullScreen, setIsFullScreen] = useState(false);
// Container classes
className={`fixed z-50 ${
isFullScreen ? 'inset-4' : 'bottom-6 right-6'
}`}
// Window classes
className={`bg-white shadow-2xl border border-gray-200 flex flex-col overflow-hidden ${
isFullScreen ? 'w-full h-full rounded-lg' : 'rounded-xl w-96 h-[32rem]'
}`}
// Message width
className={`${isFullScreen ? 'max-w-[70%]' : 'max-w-[85%]'}`}- ✅ Better readability for long SQL responses
- ✅ More comfortable typing in full-screen
- ✅ Better code viewing with wider code blocks
- ✅ Immersive learning experience
- ✅ Maintains all existing functionality
- ✅ Smooth user experience with proper transitions
The chatbot now offers both compact floating mode for quick help and full-page mode for intensive SQL learning sessions! 🚀