Drawer Dark Mode Fix - Complete
Final Status: β
ALL DRAWERS FIXED
All 4 right-side drawers in Robo-Dapp fleet page now have proper dark mode styling with readable text in both light and dark themes.
Fixed Components
1. AppShellDrawer (Base Component)
File: Robo-Dapp/src/components/ui/app-shell-drawer.tsx
Final Colors:
Drawer background:
bg-white dark:bg-gray-950(fully opaque)Header background:
bg-white dark:bg-gray-950Content background:
bg-white dark:bg-gray-950Title text:
text-gray-900 dark:text-gray-100Close button:
text-gray-700 dark:text-gray-400Borders:
border-gray-300 dark:border-gray-800
2. VehicleDetailsDrawer
File: Robo-Dapp/src/components/fleet/VehicleDetailsDrawer.tsx
All text elements updated:
Section headings:
text-gray-900 dark:text-gray-100Field labels:
text-gray-600 dark:text-gray-400Data values:
text-gray-900 dark:text-gray-100Revenue (green):
text-green-600 dark:text-green-400Costs (red):
text-red-600 dark:text-red-400Separators:
bg-gray-200 dark:bg-gray-800
3. VehicleDrawer (Schedule Action)
File: Robo-Dapp/src/components/fleet/VehicleDrawer.tsx
Components updated:
Action dropdown button:
bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100Dropdown menu:
bg-white dark:bg-gray-900 border-gray-300 dark:border-gray-700Menu items:
hover:bg-gray-50 dark:hover:bg-gray-800 text-gray-900 dark:text-gray-100Labels:
text-gray-900 dark:text-gray-100Textarea:
bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100Tabs:
bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-gray-100Vehicle info border:
border-gray-200 dark:border-gray-800
4. AutoScheduleDrawer
File: Robo-Dapp/src/components/fleet/AutoScheduleDrawer.tsx
All sections updated:
Template buttons:
border-gray-300 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-800Rule cards:
border-gray-300 dark:border-gray-700 bg-white dark:bg-gray-900Form inputs:
bg-white dark:bg-gray-800 border-gray-300 dark:border-gray-700 text-gray-900 dark:text-gray-100Statistics box:
bg-blue-50 dark:bg-blue-950/30 border-blue-200 dark:border-blue-800All text:
text-gray-900 dark:text-gray-100for headings,text-gray-600 dark:text-gray-400for labels
5. BulkVehicleDrawer
File: Robo-Dapp/src/components/fleet/BulkVehicleDrawer.tsx
Complete dark mode coverage:
Vehicle list:
border-gray-300 dark:border-gray-700 bg-white dark:bg-gray-900Action buttons (selected):
border-blue-500 dark:border-blue-600 bg-blue-50 dark:bg-blue-950/30Action buttons (unselected):
border-gray-200 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-800Textarea:
bg-white dark:bg-gray-900 border-gray-300 dark:border-gray-700 text-gray-900 dark:text-gray-100Date/time inputs:
bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100Action summary:
bg-gray-50 dark:bg-gray-900 border-gray-300 dark:border-gray-700
Color Scheme
Light Mode
Background:
#ffffff(white) - 100% opaqueText Primary:
#111827(gray-900)Text Secondary:
#4b5563(gray-600)Border:
#d1d5db(gray-300)Hover:
#f9fafb(gray-50)Input Background:
#ffffff(white)
Dark Mode
Background:
#030712(gray-950) - 100% opaqueText Primary:
#f3f4f6(gray-100)Text Secondary:
#9ca3af(gray-400)Border:
#1f2937(gray-800)Hover:
#1f2937(gray-800)Input Background:
#111827(gray-900)
Key Technical Details
Root Cause
Radix UI components (Text, Box, Flex, Heading) don't automatically inherit dark mode styles. Using color="gray" prop resulted in light gray text that was invisible on light backgrounds in light mode and slightly visible but poor contrast in dark mode.
Solution Applied
Removed all Radix color props - No more
color="gray"on Text componentsAdded explicit Tailwind classes - Every text element has
className="text-gray-900 dark:text-gray-100"Made backgrounds fully opaque - Changed from
bg-gray-50tobg-whiteanddark:bg-[#0a0a0a]todark:bg-gray-950Applied to ALL elements - Headings, labels, inputs, buttons, borders, separators
Current Server
URL: http://localhost:3002 Status: Running with clean build
Testing the Drawers
Visit http://localhost:3002/fleet and test each drawer:
Vehicle Details Drawer
Click any vehicle row
Should show: Vehicle ID, Basic Info, Current Status, Financial Performance
All text should be readable
Vehicle Actions Drawer
Click row dropdown β "Action"
Should show: Two tabs (Schedule Action / Scheduled)
Action dropdown, message field, all labels visible
Bulk Actions Drawer
Select multiple vehicles
Click "Actions" β "Bulk Actions"
Should show: Selected vehicles list, action buttons, scheduling inputs
Auto Schedule Drawer
Click "Actions" β "Auto Schedule"
Should show: Quick templates, active rules, statistics
All form fields and text readable
Verification Checklist
Files Changed
Robo-Dapp/src/components/ui/app-shell-drawer.tsx- Base drawer shellRobo-Dapp/src/components/fleet/VehicleDetailsDrawer.tsx- Vehicle detailsRobo-Dapp/src/components/fleet/VehicleDrawer.tsx- Schedule actionsRobo-Dapp/src/components/fleet/AutoScheduleDrawer.tsx- Automation rulesRobo-Dapp/src/components/fleet/BulkVehicleDrawer.tsx- Bulk operationsRobo-Dapp/app/fleet/page.tsx- Added drawer component imports
Completed: 2025-12-17 08:05 UTC Server: http://localhost:3002 Status: β All drawers fully functional with proper dark mode support
Last updated
Was this helpful?