From 72258b7225e22d46839bbeca853253921ad737e6 Mon Sep 17 00:00:00 2001 From: "Jan C. Borchardt" <925062+jancborchardt@users.noreply.github.com> Date: Thu, 5 Nov 2026 12:21:27 +0100 Subject: [PATCH 1/2] fix(NotificationItem): remove entry and close menu when an app handles a link action Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Jan C. Borchardt <925062+jancborchardt@users.noreply.github.com> --- src/Components/NotificationItem.vue | 4 +++- src/NotificationsApp.vue | 21 ++++++++++++++++++++- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/src/Components/NotificationItem.vue b/src/Components/NotificationItem.vue index 5023a4ff2..4fed10958 100644 --- a/src/Components/NotificationItem.vue +++ b/src/Components/NotificationItem.vue @@ -155,7 +155,7 @@ export default { }, }, - emits: ['remove', 'dismiss'], + emits: ['remove', 'dismiss', 'close'], expose: ['focus'], @@ -252,7 +252,9 @@ export default { if (action.type === 'WEB') { if (executeEvent.cancelAction) { + // The app handled the link itself, so the page stays and the menu has to close event.preventDefault() + this.$emit('close') } return } diff --git a/src/NotificationsApp.vue b/src/NotificationsApp.vue index 4ef7b5467..f1b29faf4 100644 --- a/src/NotificationsApp.vue +++ b/src/NotificationsApp.vue @@ -27,6 +27,7 @@ class="notification-wrapper" name="list" tag="ul" + :css="listAnimated" @beforeLeave="onBeforeLeave"> + @dismiss="onDismiss(notification, index)" + @close="onClose(index)" /> @@ -219,6 +221,8 @@ export default { pushEndpoints: null, open: false, + /** Whether adding and removing list items is animated */ + listAnimated: true, /** Highest notification ID seen when the popup was last opened; items above this are "new" */ lastOpenMaxId: 0, @@ -433,6 +437,21 @@ export default { this.notifications.splice(index, 1) }, + /** + * Close the menu and remove the notification without animation, + * as the list is hidden before the animation could play + * + * @param {number} index Index of the notification + */ + async onClose(index) { + this.listAnimated = false + this.open = false + this.notifications.splice(index, 1) + setCurrentTabAsActive(this.tabId) + await this.$nextTick() + this.listAnimated = true + }, + /** * Update the title to show * if there are new notifications * From e581c008ed047731771f1671180951e6b03cf8a4 Mon Sep 17 00:00:00 2001 From: Maksim Sukharev Date: Mon, 9 Nov 2026 18:04:49 +0100 Subject: [PATCH 2/2] fixup!: keep animations when open, close on intercept Signed-off-by: Maksim Sukharev --- src/NotificationsApp.vue | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/src/NotificationsApp.vue b/src/NotificationsApp.vue index f1b29faf4..2abf26eea 100644 --- a/src/NotificationsApp.vue +++ b/src/NotificationsApp.vue @@ -27,7 +27,7 @@ class="notification-wrapper" name="list" tag="ul" - :css="listAnimated" + :css="open" @beforeLeave="onBeforeLeave"> + @close="open = false" /> @@ -221,8 +221,6 @@ export default { pushEndpoints: null, open: false, - /** Whether adding and removing list items is animated */ - listAnimated: true, /** Highest notification ID seen when the popup was last opened; items above this are "new" */ lastOpenMaxId: 0, @@ -437,21 +435,6 @@ export default { this.notifications.splice(index, 1) }, - /** - * Close the menu and remove the notification without animation, - * as the list is hidden before the animation could play - * - * @param {number} index Index of the notification - */ - async onClose(index) { - this.listAnimated = false - this.open = false - this.notifications.splice(index, 1) - setCurrentTabAsActive(this.tabId) - await this.$nextTick() - this.listAnimated = true - }, - /** * Update the title to show * if there are new notifications *