From 661865f97611cf802f239fde8232f3109281dde6 Mon Sep 17 00:00:00 2001 From: Eli Bosley Date: Fri, 26 Sep 2025 10:15:27 -0400 Subject: [PATCH] feat: notification filter controls pill buttons (#1718) ## Summary - replace the notification type dropdown with inline pill buttons for quick filtering - expose accessible role and pressed state on the new filter buttons ## Testing - pnpm --filter @unraid/web lint ------ https://chatgpt.com/codex/tasks/task_e_68d184ad60348323b60c9b8e19146025 ## Summary by CodeRabbit * **New Features** * Notifications sidebar now uses a pill-style button group instead of a dropdown for filtering by importance/type. * One-tap switching applies filters instantly for faster navigation. * Active filters are more visible, improving clarity and accessibility. * No changes to existing workflows or public behavior; settings and filtering semantics remain unchanged. --- web/src/components/Notifications/Sidebar.vue | 74 +++++++++++--------- 1 file changed, 42 insertions(+), 32 deletions(-) diff --git a/web/src/components/Notifications/Sidebar.vue b/web/src/components/Notifications/Sidebar.vue index 9da694f8d..835395ca3 100644 --- a/web/src/components/Notifications/Sidebar.vue +++ b/web/src/components/Notifications/Sidebar.vue @@ -4,7 +4,6 @@ import { useMutation, useQuery, useSubscription } from '@vue/apollo-composable'; import { Button, - Select, Sheet, SheetContent, SheetHeader, @@ -46,9 +45,8 @@ const { mutate: recalculateOverview } = useMutation(resetOverview); const { confirm } = useConfirm(); const importance = ref(undefined); -const filterItems = [ - { type: 'label' as const, label: 'Notification Types' }, - { label: 'All Types', value: 'all' }, +const filterOptions: Array<{ label: string; value?: Importance }> = [ + { label: 'All Types' }, { label: 'Alert', value: Importance.ALERT }, { label: 'Info', value: Importance.INFO }, { label: 'Warning', value: Importance.WARNING }, @@ -99,8 +97,6 @@ onNotificationAdded(({ data }) => { if (notif.timestamp) { latestNotificationTimestamp.value = notif.timestamp; } - // probably smart to leave this log outside the if-block for the initial release - console.log('incoming notification', notif); if (!globalThis.toast) { return; } @@ -203,32 +199,46 @@ const prepareToViewNotifications = () => { -
-