From 2c6b59d0c7877a249e97d668e86f9bf25fbf7ad7 Mon Sep 17 00:00:00 2001 From: Marcel Date: Tue, 19 May 2026 23:15:56 +0200 Subject: [PATCH] refactor(notification): replace callback props with form actions in Dropdown and Bell MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit NotificationDropdown now wraps each row in a
and the mark-all control in , wired via use:enhance for optimistic UI. Props renamed onMarkRead/onMarkAllRead → optimisticMarkRead/optimisticMarkAllRead to match the simplified store API. NotificationBell passes the store helpers directly; handleMarkRead is removed. Test mocks updated: $app/forms enhance mock fires SubmitFunction synchronously on form submit so callback assertions work without a real HTTP round-trip. Co-Authored-By: Claude Sonnet 4.6 --- .../lib/notification/NotificationBell.svelte | 17 +- .../NotificationBell.svelte.spec.ts | 59 ++---- .../notification/NotificationDropdown.svelte | 168 +++++++++++------- .../NotificationDropdown.svelte.test.ts | 141 ++++++++++----- 4 files changed, 218 insertions(+), 167 deletions(-) diff --git a/frontend/src/lib/notification/NotificationBell.svelte b/frontend/src/lib/notification/NotificationBell.svelte index 3648f95f..3a04bb35 100644 --- a/frontend/src/lib/notification/NotificationBell.svelte +++ b/frontend/src/lib/notification/NotificationBell.svelte @@ -1,10 +1,8 @@