-
Notifications
You must be signed in to change notification settings - Fork 0
Notifications & Svelte Flow update #120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Deploying snoty with
|
| Latest commit: |
c7998b2
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://9ae44ed6.snoty.pages.dev |
| Branch Preview URL: | https://staging.snoty.pages.dev |
4071eb5 to
ecb0a4f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a notifications feature, including a new notifications page, server‐side loading, UI components, and API integrations for fetching, resolving, and deleting notifications.
- Adds a
/notificationspage with async loading and error handling. - Extends the user menu and layout to display a notification badge with live count.
- Implements notification model, store, API calls, and reusable components (badge, list, go‐to links, etc.).
Reviewed Changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/routes/notifications/+page.svelte | New notifications page UI with promise handling, list, and error |
| src/routes/notifications/+page.server.ts | Server‐side load function to fetch notifications |
| src/routes/UserMenu.svelte | Injects notification count badge and bell icon |
| src/routes/+layout.svelte | Passes apiProps/user into <UserMenu> |
| src/lib/utils/type_utils.ts | Introduces ReplaceDateWithString utility type |
| src/lib/model/notification.ts | Defines Notification interface |
| src/lib/components/notification/notification_store.ts | Adds Svelte store for count |
| src/lib/components/notification/NotificationGoTo.svelte | Popover links by notification attributes |
| src/lib/components/notification/NotificationBadge.svelte | Badge displaying count |
| src/lib/components/notification/Notification.svelte | List item for single notification with actions |
| src/lib/components/node/Node.svelte | Highlights a node based on URL query |
| src/lib/components/list/ListItem.svelte | Class‐merging wrapper for list items |
| src/lib/components/list/List.svelte | Class‐merging wrapper for lists |
| src/lib/api/notification_api.ts | API functions for count, list, resolve, delete |
| src/api.css | Defines keyframes and CSS variables for highlight animation |
Comments suppressed due to low confidence (4)
src/routes/notifications/+page.svelte:30
- [nitpick] The name
elementis ambiguous in the{:then}block. Renaming to something likeerrorOrNullorresultwould make its purpose clearer.
{:then element}
src/routes/notifications/+page.svelte:1
- There’s no accompanying test for the notifications page. Consider adding a test for the loading logic and list rendering (including empty state and error handling).
<script lang="ts">
src/lib/api/notification_api.ts:22
ReplaceDateWithStringis declared intype_utils.tsbut not imported here. Addimport type { ReplaceDateWithString } from '../utils/type_utils'.
const notifications = e as ReplaceDateWithString<Notification>[];
src/lib/components/node/Node.svelte:67
- The
animate-highlightclass is toggled but no corresponding CSS class is defined—only a CSS variable and keyframes exist. You may need to define.animate-highlight { animation: highlight var(--animate-highlight); }or use your tailwind plugin.
<div bind:clientWidth={widths[node._id]} bind:clientHeight={heights[node._id]} class="h-full" class:animate-highlight={isHighlighted}>
9246aa0 to
3e27901
Compare
Bumping the limit will allow users to see entire pages of no-op executions without resizing the panel.
No description provided.