feat(dashboard): redesign Scene Info widget with compact grid layout
Complete redesign of Scene Info widget following UX best practices: BEFORE: - Tab-based interface with 5 separate views - Only 1 data point visible at a time (poor scannability) - Size: 2×3 (oversized, wasted vertical space) - Didn't fit in desktop side panel - Poor information density AFTER: - Grid-based layout showing all 5 data points simultaneously - High information density and scannability - Compact size: 2×2 (reduced from 2×3) - Inspired by Apple Widgets / Material Design patterns - Mobile-responsive with breakpoints at 1000px and 340px - Zero interaction needed - all data visible at once Changes: - sceneInfoWidget.js: Complete rewrite (390→309 lines) - Removed tab logic and state management - Added data formatting helpers (formatDate, formatTime, etc.) - Grid HTML structure with semantic CSS classes - Maintained inline editing for all fields - Simplified configuration - style.css: Added comprehensive grid styling (lines 2647-2811) - CSS Grid layout with named areas - Responsive typography and spacing - Hover states and focus styles - 2 mobile breakpoints for optimal scaling - defaultLayout.js: Updated Scene Info widget - Changed height: 3→2 rows - Adjusted Y positions for widgets below - Simplified config (removed view selection) Design Principles: - All information visible simultaneously (zero interaction) - High scannability for quick information gathering - Proper information density for simple data points - Grid structure: 2 columns, 3 rows (location full-width header) - Mobile-first responsive design Layout: ┌─────────────────────────────────┐ │ 📍 Location │ ├──────────────────┬──────────────┤ │ 📅 Date │ 🕐 Time │ ├──────────────────┼──────────────┤ │ 🌤️ Weather │ 🌡️ Temp │ └──────────────────┴──────────────┘
This commit is contained in:
@@ -89,38 +89,34 @@ export function generateDefaultDashboard() {
|
||||
icon: 'fa-solid fa-map',
|
||||
order: 1,
|
||||
widgets: [
|
||||
// Row 0-2: Scene Info (combined: calendar, weather, temp, clock, location)
|
||||
// Row 0-1: Scene Info (combined: calendar, weather, temp, clock, location)
|
||||
{
|
||||
id: 'widget-sceneinfo',
|
||||
type: 'sceneInfo',
|
||||
x: 0,
|
||||
y: 0,
|
||||
w: 2,
|
||||
h: 3,
|
||||
config: {
|
||||
views: ['calendar', 'weather', 'temperature', 'clock', 'location'],
|
||||
defaultView: 'calendar',
|
||||
showEmptyViews: false
|
||||
}
|
||||
h: 2,
|
||||
config: {}
|
||||
},
|
||||
// Row 3-4: Recent Events (notebook style, full width)
|
||||
// Row 2-3: Recent Events (notebook style, full width)
|
||||
{
|
||||
id: 'widget-recentevents',
|
||||
type: 'recentEvents',
|
||||
x: 0,
|
||||
y: 3,
|
||||
y: 2,
|
||||
w: 2,
|
||||
h: 2,
|
||||
config: {
|
||||
maxEvents: 3
|
||||
}
|
||||
},
|
||||
// Row 5-8: Present Characters (full width, will expand with auto-layout)
|
||||
// Row 4-7: Present Characters (full width, will expand with auto-layout)
|
||||
{
|
||||
id: 'widget-presentchars',
|
||||
type: 'presentCharacters',
|
||||
x: 0,
|
||||
y: 5,
|
||||
y: 4,
|
||||
w: 2,
|
||||
h: 4,
|
||||
config: {
|
||||
|
||||
Reference in New Issue
Block a user