diff --git a/apps/browser/src/autofill/background/abstractions/notification.background.ts b/apps/browser/src/autofill/background/abstractions/notification.background.ts index 94c31fc60c1..dc28904e108 100644 --- a/apps/browser/src/autofill/background/abstractions/notification.background.ts +++ b/apps/browser/src/autofill/background/abstractions/notification.background.ts @@ -61,13 +61,13 @@ interface AtRiskPasswordQueueMessage extends NotificationQueueMessage { passwordChangeUri?: string; } -export type GenericNotificationData = { +export type BasicNotificationData = { message: string; }; -export type GenericNotificationQueueMessage = TempNotificationQueueMessage< +export type BasicNotificationQueueMessage = TempNotificationQueueMessage< typeof StandardNotificationType.Generic, - GenericNotificationData + BasicNotificationData >; type NotificationQueueMessageItem = @@ -75,7 +75,7 @@ type NotificationQueueMessageItem = | AddChangePasswordQueueMessage | AddUnlockVaultQueueMessage | AtRiskPasswordQueueMessage - | GenericNotificationQueueMessage; + | BasicNotificationQueueMessage; type LockedVaultPendingNotificationsData = { commandToRetry: { diff --git a/apps/browser/src/autofill/background/notification.background.ts b/apps/browser/src/autofill/background/notification.background.ts index bc785da56b8..efed6c43a5b 100644 --- a/apps/browser/src/autofill/background/notification.background.ts +++ b/apps/browser/src/autofill/background/notification.background.ts @@ -70,8 +70,8 @@ import { LockedVaultPendingNotificationsData, NotificationBackgroundExtensionMessage, NotificationBackgroundExtensionMessageHandlers, - GenericNotificationData, - GenericNotificationQueueMessage, + BasicNotificationData, + BasicNotificationQueueMessage, AtRiskPasswordNotificationsData, UnlockVaultMessageData, AdjustNotificationBarMessageData, @@ -399,8 +399,8 @@ export default class NotificationBackground { * @param message NotificationBackgroundExtensionMessage * @param sender chrome.runtime.MessageSender */ - async openGenericNotification( - message: NotificationBackgroundExtensionMessage, + async triggerBasicNotification( + message: NotificationBackgroundExtensionMessage, sender: chrome.runtime.MessageSender, ) { this.removeTabFromNotificationQueue(sender.tab); @@ -408,7 +408,7 @@ export default class NotificationBackground { const addLoginIsEnabled = await this.getEnableAddedLoginPrompt(); const wasVaultLocked = AuthenticationStatus.Locked && addLoginIsEnabled; - const queueMessage: GenericNotificationQueueMessage = { + const queueMessage: BasicNotificationQueueMessage = { domain: Utils.getDomain(sender.tab.url), type: StandardNotificationType.Generic, tab: sender.tab, diff --git a/apps/browser/src/autofill/background/overlay-notifications.background.ts b/apps/browser/src/autofill/background/overlay-notifications.background.ts index 63df3bcc2f2..0c4321309a1 100644 --- a/apps/browser/src/autofill/background/overlay-notifications.background.ts +++ b/apps/browser/src/autofill/background/overlay-notifications.background.ts @@ -377,9 +377,9 @@ export class OverlayNotificationsBackground implements OverlayNotificationsBackg const tab = await BrowserApi.getTab(tabId); - await this.notificationBackground.openGenericNotification( + await this.notificationBackground.triggerBasicNotification( { - command: "bgOpenGenericNotification", + command: "bgOpenBasicNotification", data: { message: "message", }, diff --git a/apps/browser/src/autofill/content/components/lit-stories/notification/refactor/generic-notification.lit-stories.ts b/apps/browser/src/autofill/content/components/lit-stories/notification/refactor/generic-notification.lit-stories.ts index 64eb999800c..8aaf5a0a93c 100644 --- a/apps/browser/src/autofill/content/components/lit-stories/notification/refactor/generic-notification.lit-stories.ts +++ b/apps/browser/src/autofill/content/components/lit-stories/notification/refactor/generic-notification.lit-stories.ts @@ -4,10 +4,10 @@ import { ThemeTypes } from "@bitwarden/common/platform/enums/theme-type.enum"; import { PresentationalNotificationProps } from "../../../notification/presentational/notification"; import { ExampleComponent } from "../../../notification/types/example-component"; -import { GenericNotification } from "../../../notification/types/generic-notification"; +import { BasicNotification } from "../../../notification/types/generic-notification"; export default { - title: "Components/Refactor/GenericNotification", + title: "Components/Refactor/BasicNotification", argTypes: { title: { control: "text" }, message: { control: "text" }, @@ -28,7 +28,7 @@ export default { }, } as Meta; -const Template = (args: PresentationalNotificationProps) => GenericNotification(); +const Template = (args: PresentationalNotificationProps) => BasicNotification(); export const Default: StoryObj = { render: Template, diff --git a/apps/browser/src/autofill/content/components/notification/types/generic-notification.ts b/apps/browser/src/autofill/content/components/notification/types/generic-notification.ts index 252de707a23..35d4f3e9990 100644 --- a/apps/browser/src/autofill/content/components/notification/types/generic-notification.ts +++ b/apps/browser/src/autofill/content/components/notification/types/generic-notification.ts @@ -5,7 +5,7 @@ import { ThemeTypes } from "@bitwarden/common/platform/enums"; import { ActionButton } from "../../buttons/action-button"; import "../presentational/notification"; -export function GenericNotification() { +export function BasicNotification() { const header = "Header text"; const body = "Body text"; const footer = html`${ActionButton({