fix: update Scene tab widgets for proper sizing on reset layout
**Problem:** Reset Layout button was shrinking Scene tab widgets (recentEvents and presentCharacters) because widget definitions had defaultSize: 2x2 but defaultLayout.js expected larger sizes (2x4 for characters). **Changes:** **presentCharactersWidget.js:** - Change defaultSize from 2x2 to column-aware function - Returns 2x4 at all column counts (taller for better card display) - Update maxAutoSize to allow expansion to 3x5 on wide screens **recentEventsWidget (infoBoxWidgets.js):** - Change defaultSize to column-aware function - Returns 2x2 at 2 columns, 3x2 at 3+ columns (full width) - Add maxAutoSize for expansion capability **defaultLayout.js Scene Tab:** - Update all widgets to use 3-column width for desktop - sceneInfo: 3x3 (was 2x2), positioned at y:0 - recentEvents: 3x2 (was 2x2), positioned at y:3 (below sceneInfo) - presentCharacters: 3x4 (was 2x4), positioned at y:5 (below events) **Result:** - Scene tab widgets now properly sized on reset (no more shrinking) - Widgets stack correctly without overlapping - Full width utilization on wider screens (3 columns) - Consistent behavior with Status tab responsive sizing
This commit is contained in:
@@ -90,35 +90,35 @@ export function generateDefaultDashboard() {
|
||||
icon: 'fa-solid fa-map',
|
||||
order: 1,
|
||||
widgets: [
|
||||
// Row 0-1: Scene Info (combined: calendar, weather, temp, clock, location)
|
||||
// Row 0-2: Scene Info (combined: calendar, weather, temp, clock, location)
|
||||
{
|
||||
id: 'widget-sceneinfo',
|
||||
type: 'sceneInfo',
|
||||
x: 0,
|
||||
y: 0,
|
||||
w: 2,
|
||||
h: 2,
|
||||
w: 3,
|
||||
h: 3,
|
||||
config: {}
|
||||
},
|
||||
// Row 2-3: Recent Events (notebook style, full width)
|
||||
// Row 3-4: Recent Events (notebook style, full width)
|
||||
{
|
||||
id: 'widget-recentevents',
|
||||
type: 'recentEvents',
|
||||
x: 0,
|
||||
y: 2,
|
||||
w: 2,
|
||||
y: 3,
|
||||
w: 3,
|
||||
h: 2,
|
||||
config: {
|
||||
maxEvents: 3
|
||||
}
|
||||
},
|
||||
// Row 4-7: Present Characters (full width, will expand with auto-layout)
|
||||
// Row 5-8: Present Characters (full width, tall for cards)
|
||||
{
|
||||
id: 'widget-presentchars',
|
||||
type: 'presentCharacters',
|
||||
x: 0,
|
||||
y: 4,
|
||||
w: 2,
|
||||
y: 5,
|
||||
w: 3,
|
||||
h: 4,
|
||||
config: {
|
||||
cardLayout: 'grid',
|
||||
|
||||
Reference in New Issue
Block a user