Fix HomeView notification migration to use proper constants pattern

- Add NOTIFY_CONTACT_LOADING_ISSUE, NOTIFY_FEED_LOADING_ISSUE, and NOTIFY_CONFIRMATION_ERROR constants to notifications.ts
- Update HomeView.vue to import and use notification constants instead of literal strings
- Update migration templates to document constants vs literal strings pattern
- Add comprehensive documentation for notification constants usage

Ensures consistency with established pattern used in ActivityListItem.vue and other migrated components. Linter passes without errors.
This commit is contained in:
Matthew Raymer
2025-07-07 04:49:30 +00:00
parent 223e497b85
commit 41a8e4e7a8
9 changed files with 765 additions and 149 deletions

View File

@@ -259,7 +259,10 @@ import {
import { containsHiddenDid, isHiddenDid } from "../libs/endorserServer";
import ProjectIcon from "./ProjectIcon.vue";
import { createNotifyHelpers } from "@/utils/notify";
import { NOTIFY_PERSON_HIDDEN, NOTIFY_UNKNOWN_PERSON } from "@/constants/notifications";
import {
NOTIFY_PERSON_HIDDEN,
NOTIFY_UNKNOWN_PERSON,
} from "@/constants/notifications";
import { TIMEOUTS } from "@/utils/notify";
@Component({
@@ -284,17 +287,11 @@ export default class ActivityListItem extends Vue {
}
notifyHiddenPerson() {
this.notify.warning(
NOTIFY_PERSON_HIDDEN.message,
TIMEOUTS.STANDARD,
);
this.notify.warning(NOTIFY_PERSON_HIDDEN.message, TIMEOUTS.STANDARD);
}
notifyUnknownPerson() {
this.notify.warning(
NOTIFY_UNKNOWN_PERSON.message,
TIMEOUTS.STANDARD,
);
this.notify.warning(NOTIFY_UNKNOWN_PERSON.message, TIMEOUTS.STANDARD);
}
@Emit()
@@ -340,7 +337,7 @@ export default class ActivityListItem extends Vue {
handleConfirmClick() {
if (!this.canConfirm) {
notifyWhyCannotConfirm(
(msg, timeout) => this.notify.info(msg.text ?? '', timeout),
(msg, timeout) => this.notify.info(msg.text ?? "", timeout),
this.isRegistered,
this.record.fullClaim?.["@type"],
this.record,