feat: visual hierarchy in dashboard — primary widgets (tasks, calendar) span 2 columns

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Ulas Kalayci
2026-04-29 16:42:09 +02:00
parent f973601922
commit 593ca9009e
2 changed files with 24 additions and 3 deletions
+9 -3
View File
@@ -110,7 +110,8 @@ function showOnboarding(appContainer) {
// Widget-Definitionen (Reihenfolge = Standard-Layout)
// --------------------------------------------------------
const WIDGET_IDS = ['weather', 'tasks', 'calendar', 'birthdays', 'budget', 'family', 'shopping', 'meals', 'notes'];
// NEU — primäre Inhalte (tasks, calendar) ganz oben
const WIDGET_IDS = ['tasks', 'calendar', 'weather', 'meals', 'shopping', 'birthdays', 'budget', 'family', 'notes'];
const DEFAULT_WIDGET_CONFIG = WIDGET_IDS.map((id, i) => ({ id, visible: true, order: i }));
@@ -552,8 +553,13 @@ function renderDashboardOverview(user) {
}
function widgetTileClass(id) {
const wideIds = ['tasks', 'budget', 'notes', 'weather'];
return wideIds.includes(id) ? 'widget--wide' : '';
// Primär: immer 2 Spalten breit (die wichtigsten Inhalte)
const primaryIds = ['tasks', 'calendar'];
// Sekundär: 2 Spalten ab 3-Spalten-Breakpoint (1024px)
const secondaryIds = ['weather', 'shopping'];
if (primaryIds.includes(id)) return 'widget--wide';
if (secondaryIds.includes(id)) return 'widget--secondary';
return '';
}
function renderDashboardLayout(cfg, data, weather, currency) {