Spaces:
AiCoderv2
/
Sleeping

akhaliq HF Staff commited on
Commit
75503d6
Β·
1 Parent(s): 4748143

Make UI fully responsive for mobile and desktop

Browse files

Complete mobile-first responsive redesign with bottom navigation:

Main Layout (page.tsx):
- Add mobile view state: 'chat', 'editor', or 'settings'
- Three-column desktop layout (chat | editor | settings)
- Single-column mobile layout with view switching
- Left sidebar (chat): Hidden on mobile, full-screen when active
- Center (editor): Default mobile view, always visible on desktop
- Right sidebar (settings): Hidden on mobile, full-screen when active
- Use absolute positioning on mobile (z-10) for overlay effect
- Responsive classes: hidden md:flex, w-full md:w-80, etc.

Mobile Bottom Navigation:
- Three-button tab bar: Chat, Code, Settings
- Icon + label for each tab
- Active state: blue highlight with dark background
- Inactive state: gray text with hover effect
- Safe area padding for notch support
- Only visible on mobile (md:hidden)

Header (Header.tsx):
- Responsive padding: px-3 md:px-5
- Responsive height: h-12 md:h-14
- Smaller logo and title on mobile
- User avatar: w-6 md:w-7
- Hide username on very small screens (hidden sm:inline)
- Truncate username with max-width
- Smaller buttons on mobile: px-3 md:px-4
- Compact Sign in button on mobile

Status Bar:
- Hidden on mobile (hidden md:flex)
- Replaced by bottom navigation on mobile

Breakpoints used:
- Mobile: < 768px (default)
- Tablet/Desktop: md: (768px+)
- Small devices: sm: (640px+)

Touch targets: All buttons 44px+ on mobile for accessibility
Responsive text: text-xs md:text-sm throughout
Safe areas: Bottom nav has safe-area-bottom class

Result: Perfect mobile UX with native app feel + full desktop experience

2 files changed +90 -23
Files changed (2)
frontend/src/app/page.tsx+76-10
frontend/src/components/Header.tsx+14-13