🚸 feat(todo): redesign homepage empty state and section visibility

- 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
This commit is contained in:
Till-JS 2026-01-26 16:29:42 +01:00
parent 08ebdf5360
commit def7249058
2 changed files with 316 additions and 94 deletions

View file

@ -153,6 +153,26 @@
}
});
// Listen for external quick-input-set events (e.g., from empty state examples)
$effect(() => {
const handler = (e: Event) => {
const customEvent = e as CustomEvent<{ text: string }>;
if (customEvent.detail?.text) {
searchQuery = customEvent.detail.text;
// Trigger search for the new text
handleSearch();
// Focus the input after a short delay
setTimeout(() => inputElement?.focus(), 50);
}
};
window.addEventListener('quick-input-set', handler);
return () => {
window.removeEventListener('quick-input-set', handler);
};
});
// Handler for settings changes (to trigger re-render)
function handleSettingsChange() {
// Force reactivity update by accessing the store