refactor: standardize notification usage and document best practices

Move all user-facing notification messages to src/constants/notifications.ts
Use TIMEOUTS constants from src/utils/notify.ts for all notification durations
Refactor ActivityListItem.vue:
Use notification message and duration constants
Initialize notify helper in created() with createNotifyHelpers(this.$notify)
Add $notify property for Vue runtime injection to satisfy type checker
Use type guards or 'as any' for unknown notification payloads
Wrap notifyWhyCannotConfirm calls to match expected function signature
Fix type import for GiveRecordWithContactInfo
Add 'Notification Best Practices and Nuances' section to migration-progress-tracker.md:
Document message/duration constants, notify helper pattern, type safety, and wrapper function usage
Remove all hardcoded notification strings and durations from components
This commit is contained in:
Matthew Raymer
2025-07-06 12:19:31 +00:00
parent 6d85c54a02
commit 938e6693b0
6 changed files with 45 additions and 26 deletions

View File

@@ -0,0 +1,12 @@
// Notification message constants for user-facing notifications
// Add new notification messages here as needed
export const NOTIFY_PERSON_HIDDEN = {
title: "Person Outside Your Network",
message: "This person is not visible to you.",
};
export const NOTIFY_UNKNOWN_PERSON = {
title: "Unidentified Person",
message: "Nobody specific was recognized.",
};