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.tsxarrow-up-right

Final Colors:

  • Drawer background: bg-white dark:bg-gray-950 (fully opaque)

  • Header background: bg-white dark:bg-gray-950

  • Content background: bg-white dark:bg-gray-950

  • Title text: text-gray-900 dark:text-gray-100

  • Close button: text-gray-700 dark:text-gray-400

  • Borders: border-gray-300 dark:border-gray-800


2. VehicleDetailsDrawer

File: Robo-Dapp/src/components/fleet/VehicleDetailsDrawer.tsxarrow-up-right

All text elements updated:

  • Section headings: text-gray-900 dark:text-gray-100

  • Field labels: text-gray-600 dark:text-gray-400

  • Data values: text-gray-900 dark:text-gray-100

  • Revenue (green): text-green-600 dark:text-green-400

  • Costs (red): text-red-600 dark:text-red-400

  • Separators: bg-gray-200 dark:bg-gray-800


3. VehicleDrawer (Schedule Action)

File: Robo-Dapp/src/components/fleet/VehicleDrawer.tsxarrow-up-right

Components updated:

  • Action dropdown button: bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100

  • Dropdown menu: bg-white dark:bg-gray-900 border-gray-300 dark:border-gray-700

  • Menu items: hover:bg-gray-50 dark:hover:bg-gray-800 text-gray-900 dark:text-gray-100

  • Labels: text-gray-900 dark:text-gray-100

  • Textarea: bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100

  • Tabs: bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-gray-100

  • Vehicle info border: border-gray-200 dark:border-gray-800


4. AutoScheduleDrawer

File: Robo-Dapp/src/components/fleet/AutoScheduleDrawer.tsxarrow-up-right

All sections updated:

  • Template buttons: border-gray-300 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-800

  • Rule cards: border-gray-300 dark:border-gray-700 bg-white dark:bg-gray-900

  • Form inputs: bg-white dark:bg-gray-800 border-gray-300 dark:border-gray-700 text-gray-900 dark:text-gray-100

  • Statistics box: bg-blue-50 dark:bg-blue-950/30 border-blue-200 dark:border-blue-800

  • All text: text-gray-900 dark:text-gray-100 for headings, text-gray-600 dark:text-gray-400 for labels


5. BulkVehicleDrawer

File: Robo-Dapp/src/components/fleet/BulkVehicleDrawer.tsxarrow-up-right

Complete dark mode coverage:

  • Vehicle list: border-gray-300 dark:border-gray-700 bg-white dark:bg-gray-900

  • Action buttons (selected): border-blue-500 dark:border-blue-600 bg-blue-50 dark:bg-blue-950/30

  • Action buttons (unselected): border-gray-200 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-800

  • Textarea: bg-white dark:bg-gray-900 border-gray-300 dark:border-gray-700 text-gray-900 dark:text-gray-100

  • Date/time inputs: bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100

  • Action summary: bg-gray-50 dark:bg-gray-900 border-gray-300 dark:border-gray-700


Color Scheme

Light Mode

  • Background: #ffffff (white) - 100% opaque

  • Text 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% opaque

  • Text 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

  1. Removed all Radix color props - No more color="gray" on Text components

  2. Added explicit Tailwind classes - Every text element has className="text-gray-900 dark:text-gray-100"

  3. Made backgrounds fully opaque - Changed from bg-gray-50 to bg-white and dark:bg-[#0a0a0a] to dark:bg-gray-950

  4. Applied 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:

  1. Vehicle Details Drawer

    • Click any vehicle row

    • Should show: Vehicle ID, Basic Info, Current Status, Financial Performance

    • All text should be readable

  2. Vehicle Actions Drawer

    • Click row dropdown β†’ "Action"

    • Should show: Two tabs (Schedule Action / Scheduled)

    • Action dropdown, message field, all labels visible

  3. Bulk Actions Drawer

    • Select multiple vehicles

    • Click "Actions" β†’ "Bulk Actions"

    • Should show: Selected vehicles list, action buttons, scheduling inputs

  4. Auto Schedule Drawer

    • Click "Actions" β†’ "Auto Schedule"

    • Should show: Quick templates, active rules, statistics

    • All form fields and text readable


Verification Checklist


Files Changed

  1. Robo-Dapp/src/components/ui/app-shell-drawer.tsx - Base drawer shell

  2. Robo-Dapp/src/components/fleet/VehicleDetailsDrawer.tsx - Vehicle details

  3. Robo-Dapp/src/components/fleet/VehicleDrawer.tsx - Schedule actions

  4. Robo-Dapp/src/components/fleet/AutoScheduleDrawer.tsx - Automation rules

  5. Robo-Dapp/src/components/fleet/BulkVehicleDrawer.tsx - Bulk operations

  6. Robo-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?