cd gridstack.js
python3 -m http.server 8080http://localhost:8080/demo/shipces-micro.html
Click the "📋 Load RFQ Cards" button
- Larkinexpress - Standard, Straight Truck, 1547 mi (Lynchburg → Laredo)
- Chrobinson - Standard, Cargo Van, HAZMAT, Unknown distance (Jamestown → Laredo) [FLAGGED]
- Easyflyers - Expedite, Sprinter, 850 mi (Aguascalientes → El Paso)
- XPO - Hot Shot, Cargo Van, 239 mi (Dallas → Houston) [FLAGGED]
- TQL - Team, Tractor, Temperature Control, 2789 mi (Los Angeles → New York)
- Total RFQs: 5
- Flagged: 2
- Expired: 0
- Total Widgets: 90 (18 per card)
| Widget | What Happens |
|---|---|
| ⚐ Flag | Toggles to 🚩, count increases |
| <|> Move | Opens workflow menu (7 states) |
| 📝 Feedback | Opens feedback modal (demo) |
| ➕ Add RFQ Card | Adds new card to grid |
| 🔓 Lock | Toggles micro-widget dragging |
| 💾 Save | Saves layout to localStorage |
| 📂 Load Saved | Restores saved layout |
- RFQ Cards: Drag entire card
- Micro-Widgets: Drag individual elements (company name, flags, timers, etc.)
- Lock/Unlock: Use 🔓 button to enable/disable micro-widget dragging
- 🏢 Company Name - Purple badge
- 🕐 Timestamp - "2h ago" format
- 🚩 Flag - Toggle button
- <|> Move Icon - Workflow menu
- 📝 Feedback - Iteration count
- ⏱️ Expiry Timer - Phase-based countdown
- 📍 Origin - City, State
- → Arrow - Direction indicator
- 📍 Destination - City, State
- 📏 Distance - Miles
- 🚚 Service Type - Expedite/Hot Shot/Standard/Scheduled/Team
- 🚛 Vehicle Type - Cargo Van/Sprinter/Cube/Straight Truck/Flatbed/Tractor
- ☢️ Special Instructions - HAZMAT/Temperature badges
- 🎯 Confidence - AI recommendation %
- ⚡ Expedite: Red (#dc2626)
- 🔥 Hot Shot: Orange (#f97316)
- 🚚 Standard: Gray (#6b7280)
- 📅 Scheduled: Teal (#0d9488)
- 👥 Team: Purple (#9333ea)
- 🟢 Normal: Green (> 50% time remaining)
- 🟡 Warning: Yellow (30-50%)
- 🟠 Urgent: Orange (15-30%)
- 🔴 Critical: Red (5-15%)
- 🔴 Final: Dark Red (0-5%)
- ⚫ Expired: Gray (0%)
# Install Playwright (if not installed)
npm install -D @playwright/test
# Run all tests
npx playwright test tests/shipces-micro.spec.js
# Run in headed mode (see browser)
npx playwright test tests/shipces-micro.spec.js --headed
# Run specific test
npx playwright test tests/shipces-micro.spec.js -g "flag toggle"gridstack.js/demo/shipces-data.js- Mock RFQ datagridstack.js/demo/shipces-micro-widgets.js- Widget renderersgridstack.js/demo/shipces-micro.css- Micro-widget stylesgridstack.js/demo/shipces-micro.html- Main demo page
tests/shipces-micro.spec.js- Playwright E2E tests
MICRO_WIDGET_ARCHITECTURE.md- Complete architecture docsMICRO_WIDGET_TESTING.md- Testing strategyIMPLEMENTATION_COMPLETE.md- Implementation summaryQUICKSTART.md- This file
Solution: Click "📋 Load RFQ Cards" button
Solution: Ignore - using CDN version instead
Solution: Click "🔓 Lock Micro-Widgets" to unlock
Solution: Check browser console, localStorage may be disabled
Solution:
- Check server is running (
python3 -m http.server 8080) - Navigate to correct URL (
http://localhost:8080/demo/shipces-micro.html) - Check browser console for errors
- GitHub Issues: https://github.com/yourusername/gridstack_test/issues
- Documentation: See
MICRO_WIDGET_ARCHITECTURE.md - Testing: See
MICRO_WIDGET_TESTING.md
Run this checklist to verify everything works:
- Server starts on port 8080
- Page loads with title "ShipCES Micro-Widgets"
- "Load RFQ Cards" button loads 5 cards
- Statistics show: 5 RFQs, 2 flagged, 90 widgets
- Clicking flag toggles icon and increases count
- Clicking move icon shows workflow menu
- "Add RFQ Card" increases total to 6 RFQs
- All widgets have correct data (company names, cities, etc.)
- Timer shows phase colors
- HAZMAT badge visible on Chrobinson card
- AI badges visible on recommended vehicles
- Save/Load layout works
Ready? Let's Go! 🚀
- Start server:
python3 -m http.server 8080 - Open:
http://localhost:8080/demo/shipces-micro.html - Click: 📋 Load RFQ Cards
- Enjoy exploring the micro-widget architecture!