From a2b9844fa456e1490ae47f88fbccd41e21823768 Mon Sep 17 00:00:00 2001
From: Jordan Aasen <166539328+jaasen-livefront@users.noreply.github.com>
Date: Wed, 26 Feb 2025 15:57:29 -0800
Subject: [PATCH] [PM-18623][PM-18621][PM-18615] fix defects for new settings
popover (#13572)
* fix defects for new settings popover
* also check for "click items to autofill" setting
---
.../new-settings-callout.component.html | 8 +++++++-
.../new-settings-callout.component.ts | 14 +++++++++++++-
.../components/vault-v2/vault-page.service.ts | 6 ------
3 files changed, 20 insertions(+), 8 deletions(-)
diff --git a/apps/browser/src/vault/popup/components/vault-v2/new-settings-callout/new-settings-callout.component.html b/apps/browser/src/vault/popup/components/vault-v2/new-settings-callout/new-settings-callout.component.html
index 727a8e938a..a6abe8ed3a 100644
--- a/apps/browser/src/vault/popup/components/vault-v2/new-settings-callout/new-settings-callout.component.html
+++ b/apps/browser/src/vault/popup/components/vault-v2/new-settings-callout/new-settings-callout.component.html
@@ -14,7 +14,13 @@
>
diff --git a/apps/browser/src/vault/popup/components/vault-v2/new-settings-callout/new-settings-callout.component.ts b/apps/browser/src/vault/popup/components/vault-v2/new-settings-callout/new-settings-callout.component.ts
index 7154990647..713dc21c42 100644
--- a/apps/browser/src/vault/popup/components/vault-v2/new-settings-callout/new-settings-callout.component.ts
+++ b/apps/browser/src/vault/popup/components/vault-v2/new-settings-callout/new-settings-callout.component.ts
@@ -9,8 +9,10 @@ import { AccountService } from "@bitwarden/common/auth/abstractions/account.serv
import { getUserId } from "@bitwarden/common/auth/services/account.service";
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
import { UserId } from "@bitwarden/common/types/guid";
+import { VaultSettingsService } from "@bitwarden/common/vault/abstractions/vault-settings/vault-settings.service";
import { ButtonModule, PopoverModule } from "@bitwarden/components";
+import { VaultPopupCopyButtonsService } from "../../../services/vault-popup-copy-buttons.service";
import { VaultPageService } from "../vault-page.service";
@Component({
@@ -30,11 +32,18 @@ export class NewSettingsCalloutComponent implements OnInit, OnDestroy {
private vaultPageService: VaultPageService,
private router: Router,
private logService: LogService,
+ private copyButtonService: VaultPopupCopyButtonsService,
+ private vaultSettingsService: VaultSettingsService,
) {}
async ngOnInit() {
this.activeUserId = await firstValueFrom(this.accountService.activeAccount$.pipe(getUserId));
+ const showQuickCopyActions = await firstValueFrom(this.copyButtonService.showQuickCopyActions$);
+ const clickItemsToAutofillVaultView = await firstValueFrom(
+ this.vaultSettingsService.clickItemsToAutofillVaultView$,
+ );
+
let profileCreatedDate: Date;
try {
@@ -50,7 +59,10 @@ export class NewSettingsCalloutComponent implements OnInit, OnDestroy {
);
this.showNewCustomizationSettingsCallout =
- !hasCalloutBeenDismissed && profileCreatedDate < new Date("2024-12-25");
+ !showQuickCopyActions &&
+ !clickItemsToAutofillVaultView &&
+ !hasCalloutBeenDismissed &&
+ profileCreatedDate < new Date("2024-12-25");
}
async goToAppearance() {
diff --git a/apps/browser/src/vault/popup/components/vault-v2/vault-page.service.ts b/apps/browser/src/vault/popup/components/vault-v2/vault-page.service.ts
index 75354298c2..a7c52ed4c5 100644
--- a/apps/browser/src/vault/popup/components/vault-v2/vault-page.service.ts
+++ b/apps/browser/src/vault/popup/components/vault-v2/vault-page.service.ts
@@ -21,12 +21,6 @@ export const NEW_CUSTOMIZATION_OPTIONS_CALLOUT_DISMISSED_KEY = new UserKeyDefini
export class VaultPageService {
private stateProvider = inject(StateProvider);
- async unDismissCallout(userId: UserId): Promise {
- await this.stateProvider
- .getUser(userId, NEW_CUSTOMIZATION_OPTIONS_CALLOUT_DISMISSED_KEY)
- .update(() => false);
- }
-
isCalloutDismissed(userId: UserId): Observable {
return this.stateProvider
.getUser(userId, NEW_CUSTOMIZATION_OPTIONS_CALLOUT_DISMISSED_KEY)