From def724905863dc192256d5da6de84d4f541a45b9 Mon Sep 17 00:00:00 2001 From: Till-JS <101404291+Till-JS@users.noreply.github.com> Date: Mon, 26 Jan 2026 16:29:42 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=B8=20feat(todo):=20redesign=20homepag?= =?UTF-8?q?e=20empty=20state=20and=20section=20visibility?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Remove "Meine Aufgaben" header (sections are self-explanatory) - Add enhanced empty state with animated sparkle icon, motivational message, and clickable syntax examples that insert into input bar - Implement smart section visibility (only show sections with tasks, but always show "Today" as primary workspace) - Add onboarding tip for users with 1-3 tasks showing #tags and !priority syntax - Add quick-input-set event listener to InputBar for example clicks --- .../apps/web/src/routes/(app)/+page.svelte | 390 +++++++++++++----- .../shared-ui/src/quick-input/InputBar.svelte | 20 + 2 files changed, 316 insertions(+), 94 deletions(-) diff --git a/apps/todo/apps/web/src/routes/(app)/+page.svelte b/apps/todo/apps/web/src/routes/(app)/+page.svelte index 01b88780c..5921fd03a 100644 --- a/apps/todo/apps/web/src/routes/(app)/+page.svelte +++ b/apps/todo/apps/web/src/routes/(app)/+page.svelte @@ -2,7 +2,7 @@ import { onMount } from 'svelte'; import { format, addDays, subDays, startOfDay } from 'date-fns'; import { de } from 'date-fns/locale'; - import { ListChecks } from '@manacore/shared-icons'; + import { ListChecks, Sparkle, ArrowDown } from '@manacore/shared-icons'; import { tasksStore } from '$lib/stores/tasks.svelte'; import { viewStore } from '$lib/stores/view.svelte'; import TaskList from '$lib/components/TaskList.svelte'; @@ -80,6 +80,30 @@ completedTasks.length === 0 ); + // Section visibility logic - show only sections with tasks (except "Today" which is always shown when not all empty) + let showTodaySection = $derived(todayTasks.length > 0 || !allEmpty); + let showTomorrowSection = $derived(tomorrowTasks.length > 0); + let showUpcomingSection = $derived(upcomingCount > 0); + let showCompletedSection = $derived(completedTasks.length > 0); + + // Onboarding tip: show when user has 1-3 active tasks + let totalActiveTasks = $derived( + overdueTasks.length + todayTasks.length + tomorrowTasks.length + upcomingCount + ); + let showOnboardingTip = $derived(totalActiveTasks > 0 && totalActiveTasks <= 3); + + // Syntax example snippets for empty state + const syntaxExamples = [ + { text: 'Meeting morgen 14 Uhr', description: 'Datum & Uhrzeit' }, + { text: 'Einkaufen #privat', description: 'Mit Label' }, + { text: 'Wichtig erledigen !hoch', description: 'Mit Priorität' }, + ]; + + // Handle clicking a syntax example + function handleExampleClick(text: string) { + window.dispatchEvent(new CustomEvent('quick-input-set', { detail: { text } })); + } + // Modal handlers function openEditModal(task: Task) { editingTask = task; @@ -152,11 +176,6 @@
Alle deine Aufgaben auf einen Blick
-Tippe unten um loszulegen...
+Schnellstart-Tipps
+Erstelle deine erste Aufgabe mit dem Eingabefeld oben.
#tags und !priorität für bessere Organisation
+