From 1ede507f3dc3a6268c83fe62201834b93e96b5c1 Mon Sep 17 00:00:00 2001 From: Oscar Hinton Date: Fri, 20 Jun 2025 14:35:46 +0200 Subject: [PATCH 1/6] [PM-22631] Move platform popup utils out from popup. (#15206) First step in resolving angular being imported in background.js. Removes the dependency of angular from PlatformPopupUtils and moves it out of popup. --- .../account-security.component.spec.ts | 2 +- .../settings/account-security.component.ts | 2 +- .../popup/utils/auth-popout-window.spec.ts | 2 +- .../src/auth/popup/utils/auth-popout-window.ts | 2 +- ...n-two-factor-auth-component.service.spec.ts | 6 ++---- ...ension-two-factor-auth-component.service.ts | 4 +--- ...factor-auth-email-component.service.spec.ts | 6 ++---- ...-two-factor-auth-email-component.service.ts | 4 +--- .../extension-lock-component.service.spec.ts | 4 +--- .../extension-lock-component.service.ts | 4 +--- .../browser-popup-utils.abstractions.ts | 0 .../browser-popup-utils.spec.ts | 2 +- .../{popup => browser}/browser-popup-utils.ts | 16 ++++++++++++++-- .../popup/components/pop-out.component.ts | 2 +- .../popup/layout/popup-size.service.ts | 18 ++++-------------- .../view-cache/popup-router-cache.service.ts | 2 +- apps/browser/src/popup/app-routing.module.ts | 2 +- .../browser/src/popup/services/init.service.ts | 2 +- .../file-popout-callout.component.ts | 2 +- .../send-file-popout-dialog.component.ts | 2 +- .../services/file-popout-utils.service.ts | 2 +- .../add-edit/add-edit-v2.component.spec.ts | 2 +- .../vault-v2/add-edit/add-edit-v2.component.ts | 2 +- .../open-attachments.component.spec.ts | 2 +- .../open-attachments.component.ts | 2 +- .../autofill-vault-list-items.component.ts | 2 +- .../new-item-dropdown-v2.component.spec.ts | 2 +- .../new-item-dropdown-v2.component.ts | 2 +- .../vault-list-items-container.component.ts | 2 +- .../components/vault-v2/vault-v2.component.ts | 2 +- .../vault-v2/view-v2/view-v2.component.spec.ts | 2 +- .../vault-v2/view-v2/view-v2.component.ts | 2 +- .../browser-totp-capture.service.spec.ts | 2 +- .../services/browser-totp-capture.service.ts | 2 +- .../vault-popup-autofill.service.spec.ts | 2 +- .../services/vault-popup-autofill.service.ts | 2 +- .../popup/settings/appearance-v2.component.ts | 6 ++---- .../settings/vault-settings-v2.component.ts | 2 +- .../popup/utils/vault-popout-window.spec.ts | 2 +- .../vault/popup/utils/vault-popout-window.ts | 2 +- 40 files changed, 58 insertions(+), 70 deletions(-) rename apps/browser/src/platform/{popup => browser}/abstractions/browser-popup-utils.abstractions.ts (100%) rename apps/browser/src/platform/{popup => browser}/browser-popup-utils.spec.ts (99%) rename apps/browser/src/platform/{popup => browser}/browser-popup-utils.ts (96%) diff --git a/apps/browser/src/auth/popup/settings/account-security.component.spec.ts b/apps/browser/src/auth/popup/settings/account-security.component.spec.ts index 15c4dbee98b..b50e1f55032 100644 --- a/apps/browser/src/auth/popup/settings/account-security.component.spec.ts +++ b/apps/browser/src/auth/popup/settings/account-security.component.spec.ts @@ -36,7 +36,7 @@ import { DialogService, ToastService } from "@bitwarden/components"; import { BiometricStateService, BiometricsService, KeyService } from "@bitwarden/key-management"; import { BrowserApi } from "../../../platform/browser/browser-api"; -import BrowserPopupUtils from "../../../platform/popup/browser-popup-utils"; +import BrowserPopupUtils from "../../../platform/browser/browser-popup-utils"; import { PopOutComponent } from "../../../platform/popup/components/pop-out.component"; import { PopupRouterCacheService } from "../../../platform/popup/view-cache/popup-router-cache.service"; diff --git a/apps/browser/src/auth/popup/settings/account-security.component.ts b/apps/browser/src/auth/popup/settings/account-security.component.ts index 19f2d94e451..7c5bb38ec49 100644 --- a/apps/browser/src/auth/popup/settings/account-security.component.ts +++ b/apps/browser/src/auth/popup/settings/account-security.component.ts @@ -70,7 +70,7 @@ import { import { BiometricErrors, BiometricErrorTypes } from "../../../models/biometricErrors"; import { BrowserApi } from "../../../platform/browser/browser-api"; -import BrowserPopupUtils from "../../../platform/popup/browser-popup-utils"; +import BrowserPopupUtils from "../../../platform/browser/browser-popup-utils"; import { PopOutComponent } from "../../../platform/popup/components/pop-out.component"; import { PopupHeaderComponent } from "../../../platform/popup/layout/popup-header.component"; import { PopupPageComponent } from "../../../platform/popup/layout/popup-page.component"; diff --git a/apps/browser/src/auth/popup/utils/auth-popout-window.spec.ts b/apps/browser/src/auth/popup/utils/auth-popout-window.spec.ts index b2c20ba2849..af850c9a7bc 100644 --- a/apps/browser/src/auth/popup/utils/auth-popout-window.spec.ts +++ b/apps/browser/src/auth/popup/utils/auth-popout-window.spec.ts @@ -1,6 +1,6 @@ import { createChromeTabMock } from "../../../autofill/spec/autofill-mocks"; import { BrowserApi } from "../../../platform/browser/browser-api"; -import BrowserPopupUtils from "../../../platform/popup/browser-popup-utils"; +import BrowserPopupUtils from "../../../platform/browser/browser-popup-utils"; import { AuthPopoutType, diff --git a/apps/browser/src/auth/popup/utils/auth-popout-window.ts b/apps/browser/src/auth/popup/utils/auth-popout-window.ts index 0646b684b22..0611891b61e 100644 --- a/apps/browser/src/auth/popup/utils/auth-popout-window.ts +++ b/apps/browser/src/auth/popup/utils/auth-popout-window.ts @@ -1,7 +1,7 @@ // FIXME: Update this file to be type safe and remove this and next line // @ts-strict-ignore import { BrowserApi } from "../../../platform/browser/browser-api"; -import BrowserPopupUtils from "../../../platform/popup/browser-popup-utils"; +import BrowserPopupUtils from "../../../platform/browser/browser-popup-utils"; const AuthPopoutType = { unlockExtension: "auth_unlockExtension", diff --git a/apps/browser/src/auth/services/extension-two-factor-auth-component.service.spec.ts b/apps/browser/src/auth/services/extension-two-factor-auth-component.service.spec.ts index e8a7953ddb8..52b2e1bf4c5 100644 --- a/apps/browser/src/auth/services/extension-two-factor-auth-component.service.spec.ts +++ b/apps/browser/src/auth/services/extension-two-factor-auth-component.service.spec.ts @@ -13,7 +13,7 @@ jest.mock("../popup/utils/auth-popout-window", () => { }; }); -jest.mock("../../platform/popup/browser-popup-utils", () => ({ +jest.mock("../../platform/browser/browser-popup-utils", () => ({ inSingleActionPopout: jest.fn(), inPopout: jest.fn(), })); @@ -22,9 +22,7 @@ import { DuoLaunchAction } from "@bitwarden/auth/angular"; import { TwoFactorProviderType } from "@bitwarden/common/auth/enums/two-factor-provider-type"; import { BrowserApi } from "../../platform/browser/browser-api"; -// FIXME (PM-22628): Popup imports are forbidden in background -// eslint-disable-next-line no-restricted-imports -import BrowserPopupUtils from "../../platform/popup/browser-popup-utils"; +import BrowserPopupUtils from "../../platform/browser/browser-popup-utils"; // FIXME (PM-22628): Popup imports are forbidden in background // eslint-disable-next-line no-restricted-imports import { diff --git a/apps/browser/src/auth/services/extension-two-factor-auth-component.service.ts b/apps/browser/src/auth/services/extension-two-factor-auth-component.service.ts index d0a0048bed1..154abe13448 100644 --- a/apps/browser/src/auth/services/extension-two-factor-auth-component.service.ts +++ b/apps/browser/src/auth/services/extension-two-factor-auth-component.service.ts @@ -6,9 +6,7 @@ import { import { TwoFactorProviderType } from "@bitwarden/common/auth/enums/two-factor-provider-type"; import { BrowserApi } from "../../platform/browser/browser-api"; -// FIXME (PM-22628): Popup imports are forbidden in background -// eslint-disable-next-line no-restricted-imports -import BrowserPopupUtils from "../../platform/popup/browser-popup-utils"; +import BrowserPopupUtils from "../../platform/browser/browser-popup-utils"; // FIXME (PM-22628): Popup imports are forbidden in background // eslint-disable-next-line no-restricted-imports import { diff --git a/apps/browser/src/auth/services/extension-two-factor-auth-email-component.service.spec.ts b/apps/browser/src/auth/services/extension-two-factor-auth-email-component.service.spec.ts index 310c5c872c6..432d00047a2 100644 --- a/apps/browser/src/auth/services/extension-two-factor-auth-email-component.service.spec.ts +++ b/apps/browser/src/auth/services/extension-two-factor-auth-email-component.service.spec.ts @@ -13,16 +13,14 @@ jest.mock("../popup/utils/auth-popout-window", () => { }; }); -jest.mock("../../platform/popup/browser-popup-utils", () => ({ +jest.mock("../../platform/browser/browser-popup-utils", () => ({ inPopup: jest.fn(), })); // FIXME (PM-22628): Popup imports are forbidden in background // eslint-disable-next-line no-restricted-imports import { openTwoFactorAuthEmailPopout } from "../../auth/popup/utils/auth-popout-window"; -// FIXME (PM-22628): Popup imports are forbidden in background -// eslint-disable-next-line no-restricted-imports -import BrowserPopupUtils from "../../platform/popup/browser-popup-utils"; +import BrowserPopupUtils from "../../platform/browser/browser-popup-utils"; import { ExtensionTwoFactorAuthEmailComponentService } from "./extension-two-factor-auth-email-component.service"; diff --git a/apps/browser/src/auth/services/extension-two-factor-auth-email-component.service.ts b/apps/browser/src/auth/services/extension-two-factor-auth-email-component.service.ts index 5f785ed2131..e9cb53f935e 100644 --- a/apps/browser/src/auth/services/extension-two-factor-auth-email-component.service.ts +++ b/apps/browser/src/auth/services/extension-two-factor-auth-email-component.service.ts @@ -9,9 +9,7 @@ import { DialogService } from "@bitwarden/components"; // FIXME (PM-22628): Popup imports are forbidden in background // eslint-disable-next-line no-restricted-imports import { openTwoFactorAuthEmailPopout } from "../../auth/popup/utils/auth-popout-window"; -// FIXME (PM-22628): Popup imports are forbidden in background -// eslint-disable-next-line no-restricted-imports -import BrowserPopupUtils from "../../platform/popup/browser-popup-utils"; +import BrowserPopupUtils from "../../platform/browser/browser-popup-utils"; // TODO: popup state persistence should eventually remove the need for this service export class ExtensionTwoFactorAuthEmailComponentService diff --git a/apps/browser/src/key-management/lock/services/extension-lock-component.service.spec.ts b/apps/browser/src/key-management/lock/services/extension-lock-component.service.spec.ts index 612db49acab..86781474b67 100644 --- a/apps/browser/src/key-management/lock/services/extension-lock-component.service.spec.ts +++ b/apps/browser/src/key-management/lock/services/extension-lock-component.service.spec.ts @@ -20,9 +20,7 @@ import { import { UnlockOptions } from "@bitwarden/key-management-ui"; import { BrowserApi } from "../../../platform/browser/browser-api"; -// FIXME (PM-22628): Popup imports are forbidden in background -// eslint-disable-next-line no-restricted-imports -import BrowserPopupUtils from "../../../platform/popup/browser-popup-utils"; +import BrowserPopupUtils from "../../../platform/browser/browser-popup-utils"; // FIXME (PM-22628): Popup imports are forbidden in background // eslint-disable-next-line no-restricted-imports import { BrowserRouterService } from "../../../platform/popup/services/browser-router.service"; diff --git a/apps/browser/src/key-management/lock/services/extension-lock-component.service.ts b/apps/browser/src/key-management/lock/services/extension-lock-component.service.ts index 520a0e7571b..52ad5a56c89 100644 --- a/apps/browser/src/key-management/lock/services/extension-lock-component.service.ts +++ b/apps/browser/src/key-management/lock/services/extension-lock-component.service.ts @@ -17,9 +17,7 @@ import { LockComponentService, UnlockOptions } from "@bitwarden/key-management-u import { BiometricErrors, BiometricErrorTypes } from "../../../models/biometricErrors"; import { BrowserApi } from "../../../platform/browser/browser-api"; -// FIXME (PM-22628): Popup imports are forbidden in background -// eslint-disable-next-line no-restricted-imports -import BrowserPopupUtils from "../../../platform/popup/browser-popup-utils"; +import BrowserPopupUtils from "../../../platform/browser/browser-popup-utils"; // FIXME (PM-22628): Popup imports are forbidden in background // eslint-disable-next-line no-restricted-imports import { BrowserRouterService } from "../../../platform/popup/services/browser-router.service"; diff --git a/apps/browser/src/platform/popup/abstractions/browser-popup-utils.abstractions.ts b/apps/browser/src/platform/browser/abstractions/browser-popup-utils.abstractions.ts similarity index 100% rename from apps/browser/src/platform/popup/abstractions/browser-popup-utils.abstractions.ts rename to apps/browser/src/platform/browser/abstractions/browser-popup-utils.abstractions.ts diff --git a/apps/browser/src/platform/popup/browser-popup-utils.spec.ts b/apps/browser/src/platform/browser/browser-popup-utils.spec.ts similarity index 99% rename from apps/browser/src/platform/popup/browser-popup-utils.spec.ts rename to apps/browser/src/platform/browser/browser-popup-utils.spec.ts index 73f0d23f4f2..9f9a6e313c8 100644 --- a/apps/browser/src/platform/popup/browser-popup-utils.spec.ts +++ b/apps/browser/src/platform/browser/browser-popup-utils.spec.ts @@ -1,6 +1,6 @@ import { createChromeTabMock } from "../../autofill/spec/autofill-mocks"; -import { BrowserApi } from "../browser/browser-api"; +import { BrowserApi } from "./browser-api"; import BrowserPopupUtils from "./browser-popup-utils"; describe("BrowserPopupUtils", () => { diff --git a/apps/browser/src/platform/popup/browser-popup-utils.ts b/apps/browser/src/platform/browser/browser-popup-utils.ts similarity index 96% rename from apps/browser/src/platform/popup/browser-popup-utils.ts rename to apps/browser/src/platform/browser/browser-popup-utils.ts index 33a1ff4016d..e9fe3dd1ea3 100644 --- a/apps/browser/src/platform/popup/browser-popup-utils.ts +++ b/apps/browser/src/platform/browser/browser-popup-utils.ts @@ -1,9 +1,21 @@ // FIXME: Update this file to be type safe and remove this and next line // @ts-strict-ignore -import { BrowserApi } from "../browser/browser-api"; import { ScrollOptions } from "./abstractions/browser-popup-utils.abstractions"; -import { PopupWidthOptions } from "./layout/popup-size.service"; +import { BrowserApi } from "./browser-api"; + +/** + * + * Value represents width in pixels + */ +export const PopupWidthOptions = Object.freeze({ + default: 380, + wide: 480, + "extra-wide": 600, +}); + +type PopupWidthOptions = typeof PopupWidthOptions; +export type PopupWidthOption = keyof PopupWidthOptions; class BrowserPopupUtils { /** diff --git a/apps/browser/src/platform/popup/components/pop-out.component.ts b/apps/browser/src/platform/popup/components/pop-out.component.ts index 12e32efb77c..320fa6f05ab 100644 --- a/apps/browser/src/platform/popup/components/pop-out.component.ts +++ b/apps/browser/src/platform/popup/components/pop-out.component.ts @@ -5,7 +5,7 @@ import { JslibModule } from "@bitwarden/angular/jslib.module"; import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { IconButtonModule } from "@bitwarden/components"; -import BrowserPopupUtils from "../browser-popup-utils"; +import BrowserPopupUtils from "../../browser/browser-popup-utils"; @Component({ selector: "app-pop-out", diff --git a/apps/browser/src/platform/popup/layout/popup-size.service.ts b/apps/browser/src/platform/popup/layout/popup-size.service.ts index 69d3102d24e..0e4aacb9a97 100644 --- a/apps/browser/src/platform/popup/layout/popup-size.service.ts +++ b/apps/browser/src/platform/popup/layout/popup-size.service.ts @@ -7,20 +7,10 @@ import { POPUP_STYLE_DISK, } from "@bitwarden/common/platform/state"; -import BrowserPopupUtils from "../browser-popup-utils"; - -/** - * - * Value represents width in pixels - */ -export const PopupWidthOptions = Object.freeze({ - default: 380, - wide: 480, - "extra-wide": 600, -}); - -type PopupWidthOptions = typeof PopupWidthOptions; -export type PopupWidthOption = keyof PopupWidthOptions; +import BrowserPopupUtils, { + PopupWidthOption, + PopupWidthOptions, +} from "../../browser/browser-popup-utils"; const POPUP_WIDTH_KEY_DEF = new KeyDefinition(POPUP_STYLE_DISK, "popup-width", { deserializer: (s) => s, diff --git a/apps/browser/src/platform/popup/view-cache/popup-router-cache.service.ts b/apps/browser/src/platform/popup/view-cache/popup-router-cache.service.ts index bac435e2e8d..b666e49c964 100644 --- a/apps/browser/src/platform/popup/view-cache/popup-router-cache.service.ts +++ b/apps/browser/src/platform/popup/view-cache/popup-router-cache.service.ts @@ -15,7 +15,7 @@ import { filter, first, firstValueFrom, map, Observable, of, switchMap, tap } fr import { GlobalStateProvider } from "@bitwarden/common/platform/state"; import { POPUP_ROUTE_HISTORY_KEY } from "../../../platform/services/popup-view-cache-background.service"; -import BrowserPopupUtils from "../browser-popup-utils"; +import BrowserPopupUtils from "../../browser/browser-popup-utils"; /** * Preserves route history when opening and closing the popup diff --git a/apps/browser/src/popup/app-routing.module.ts b/apps/browser/src/popup/app-routing.module.ts index fbf4afaf14a..e3574c4e142 100644 --- a/apps/browser/src/popup/app-routing.module.ts +++ b/apps/browser/src/popup/app-routing.module.ts @@ -53,7 +53,7 @@ import { ExcludedDomainsComponent } from "../autofill/popup/settings/excluded-do import { NotificationsSettingsComponent } from "../autofill/popup/settings/notifications.component"; import { PremiumV2Component } from "../billing/popup/settings/premium-v2.component"; import { RemovePasswordComponent } from "../key-management/key-connector/remove-password.component"; -import BrowserPopupUtils from "../platform/popup/browser-popup-utils"; +import BrowserPopupUtils from "../platform/browser/browser-popup-utils"; import { popupRouterCacheGuard } from "../platform/popup/view-cache/popup-router-cache.service"; import { CredentialGeneratorHistoryComponent } from "../tools/popup/generator/credential-generator-history.component"; import { CredentialGeneratorComponent } from "../tools/popup/generator/credential-generator.component"; diff --git a/apps/browser/src/popup/services/init.service.ts b/apps/browser/src/popup/services/init.service.ts index c9fe7161259..f29745e6f59 100644 --- a/apps/browser/src/popup/services/init.service.ts +++ b/apps/browser/src/popup/services/init.service.ts @@ -13,7 +13,7 @@ import { SdkLoadService } from "@bitwarden/common/platform/abstractions/sdk/sdk- import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; import { BrowserApi } from "../../platform/browser/browser-api"; -import BrowserPopupUtils from "../../platform/popup/browser-popup-utils"; +import BrowserPopupUtils from "../../platform/browser/browser-popup-utils"; import { PopupSizeService } from "../../platform/popup/layout/popup-size.service"; import { PopupViewCacheService } from "../../platform/popup/view-cache/popup-view-cache.service"; diff --git a/apps/browser/src/tools/popup/components/file-popout-callout.component.ts b/apps/browser/src/tools/popup/components/file-popout-callout.component.ts index e30fbf58321..25b80c82c57 100644 --- a/apps/browser/src/tools/popup/components/file-popout-callout.component.ts +++ b/apps/browser/src/tools/popup/components/file-popout-callout.component.ts @@ -6,7 +6,7 @@ import { Component, OnInit } from "@angular/core"; import { JslibModule } from "@bitwarden/angular/jslib.module"; import { CalloutModule } from "@bitwarden/components"; -import BrowserPopupUtils from "../../../platform/popup/browser-popup-utils"; +import BrowserPopupUtils from "../../../platform/browser/browser-popup-utils"; import { FilePopoutUtilsService } from "../services/file-popout-utils.service"; @Component({ diff --git a/apps/browser/src/tools/popup/send-v2/send-file-popout-dialog/send-file-popout-dialog.component.ts b/apps/browser/src/tools/popup/send-v2/send-file-popout-dialog/send-file-popout-dialog.component.ts index 248b3c49a98..64c95a2e2f7 100644 --- a/apps/browser/src/tools/popup/send-v2/send-file-popout-dialog/send-file-popout-dialog.component.ts +++ b/apps/browser/src/tools/popup/send-v2/send-file-popout-dialog/send-file-popout-dialog.component.ts @@ -4,7 +4,7 @@ import { Component } from "@angular/core"; import { JslibModule } from "@bitwarden/angular/jslib.module"; import { ButtonModule, DialogModule, DialogService, TypographyModule } from "@bitwarden/components"; -import BrowserPopupUtils from "../../../../platform/popup/browser-popup-utils"; +import BrowserPopupUtils from "../../../../platform/browser/browser-popup-utils"; @Component({ selector: "send-file-popout-dialog", diff --git a/apps/browser/src/tools/popup/services/file-popout-utils.service.ts b/apps/browser/src/tools/popup/services/file-popout-utils.service.ts index fa72e411316..9a04d4b8f23 100644 --- a/apps/browser/src/tools/popup/services/file-popout-utils.service.ts +++ b/apps/browser/src/tools/popup/services/file-popout-utils.service.ts @@ -2,7 +2,7 @@ import { Injectable } from "@angular/core"; import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; -import BrowserPopupUtils from "../../../platform/popup/browser-popup-utils"; +import BrowserPopupUtils from "../../../platform/browser/browser-popup-utils"; /** * Service for determining whether to display file popout callout messages. diff --git a/apps/browser/src/vault/popup/components/vault-v2/add-edit/add-edit-v2.component.spec.ts b/apps/browser/src/vault/popup/components/vault-v2/add-edit/add-edit-v2.component.spec.ts index be772fa6ee5..216ec1c3f1b 100644 --- a/apps/browser/src/vault/popup/components/vault-v2/add-edit/add-edit-v2.component.spec.ts +++ b/apps/browser/src/vault/popup/components/vault-v2/add-edit/add-edit-v2.component.spec.ts @@ -26,7 +26,7 @@ import { } from "@bitwarden/vault"; import { BrowserFido2UserInterfaceSession } from "../../../../../autofill/fido2/services/browser-fido2-user-interface.service"; -import BrowserPopupUtils from "../../../../../platform/popup/browser-popup-utils"; +import BrowserPopupUtils from "../../../../../platform/browser/browser-popup-utils"; import { PopupRouterCacheService } from "../../../../../platform/popup/view-cache/popup-router-cache.service"; import { PopupCloseWarningService } from "../../../../../popup/services/popup-close-warning.service"; diff --git a/apps/browser/src/vault/popup/components/vault-v2/add-edit/add-edit-v2.component.ts b/apps/browser/src/vault/popup/components/vault-v2/add-edit/add-edit-v2.component.ts index 5aac720738a..f019636e690 100644 --- a/apps/browser/src/vault/popup/components/vault-v2/add-edit/add-edit-v2.component.ts +++ b/apps/browser/src/vault/popup/components/vault-v2/add-edit/add-edit-v2.component.ts @@ -42,7 +42,7 @@ import { import { BrowserFido2UserInterfaceSession } from "../../../../../autofill/fido2/services/browser-fido2-user-interface.service"; import { BrowserApi } from "../../../../../platform/browser/browser-api"; -import BrowserPopupUtils from "../../../../../platform/popup/browser-popup-utils"; +import BrowserPopupUtils from "../../../../../platform/browser/browser-popup-utils"; import { PopOutComponent } from "../../../../../platform/popup/components/pop-out.component"; import { PopupFooterComponent } from "../../../../../platform/popup/layout/popup-footer.component"; import { PopupHeaderComponent } from "../../../../../platform/popup/layout/popup-header.component"; diff --git a/apps/browser/src/vault/popup/components/vault-v2/attachments/open-attachments/open-attachments.component.spec.ts b/apps/browser/src/vault/popup/components/vault-v2/attachments/open-attachments/open-attachments.component.spec.ts index ec5c93feb9e..19779d73a11 100644 --- a/apps/browser/src/vault/popup/components/vault-v2/attachments/open-attachments/open-attachments.component.spec.ts +++ b/apps/browser/src/vault/popup/components/vault-v2/attachments/open-attachments/open-attachments.component.spec.ts @@ -16,7 +16,7 @@ import { CipherType } from "@bitwarden/common/vault/enums"; import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view"; import { ToastService } from "@bitwarden/components"; -import BrowserPopupUtils from "../../../../../../platform/popup/browser-popup-utils"; +import BrowserPopupUtils from "../../../../../../platform/browser/browser-popup-utils"; import { FilePopoutUtilsService } from "../../../../../../tools/popup/services/file-popout-utils.service"; import { OpenAttachmentsComponent } from "./open-attachments.component"; diff --git a/apps/browser/src/vault/popup/components/vault-v2/attachments/open-attachments/open-attachments.component.ts b/apps/browser/src/vault/popup/components/vault-v2/attachments/open-attachments/open-attachments.component.ts index 6577975ae0c..6ca4c82efdc 100644 --- a/apps/browser/src/vault/popup/components/vault-v2/attachments/open-attachments/open-attachments.component.ts +++ b/apps/browser/src/vault/popup/components/vault-v2/attachments/open-attachments/open-attachments.component.ts @@ -20,7 +20,7 @@ import { CipherId } from "@bitwarden/common/types/guid"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; import { BadgeModule, ItemModule, ToastService, TypographyModule } from "@bitwarden/components"; -import BrowserPopupUtils from "../../../../../../platform/popup/browser-popup-utils"; +import BrowserPopupUtils from "../../../../../../platform/browser/browser-popup-utils"; import { FilePopoutUtilsService } from "../../../../../../tools/popup/services/file-popout-utils.service"; @Component({ diff --git a/apps/browser/src/vault/popup/components/vault-v2/autofill-vault-list-items/autofill-vault-list-items.component.ts b/apps/browser/src/vault/popup/components/vault-v2/autofill-vault-list-items/autofill-vault-list-items.component.ts index b490d71df83..47f104cd4d3 100644 --- a/apps/browser/src/vault/popup/components/vault-v2/autofill-vault-list-items/autofill-vault-list-items.component.ts +++ b/apps/browser/src/vault/popup/components/vault-v2/autofill-vault-list-items/autofill-vault-list-items.component.ts @@ -8,7 +8,7 @@ import { VaultSettingsService } from "@bitwarden/common/vault/abstractions/vault import { CipherType } from "@bitwarden/common/vault/enums"; import { IconButtonModule, TypographyModule } from "@bitwarden/components"; -import BrowserPopupUtils from "../../../../../platform/popup/browser-popup-utils"; +import BrowserPopupUtils from "../../../../../platform/browser/browser-popup-utils"; import { VaultPopupAutofillService } from "../../../services/vault-popup-autofill.service"; import { VaultPopupItemsService } from "../../../services/vault-popup-items.service"; import { PopupCipherView } from "../../../views/popup-cipher.view"; diff --git a/apps/browser/src/vault/popup/components/vault-v2/new-item-dropdown/new-item-dropdown-v2.component.spec.ts b/apps/browser/src/vault/popup/components/vault-v2/new-item-dropdown/new-item-dropdown-v2.component.spec.ts index 7e3db27640e..48e87e2d192 100644 --- a/apps/browser/src/vault/popup/components/vault-v2/new-item-dropdown/new-item-dropdown-v2.component.spec.ts +++ b/apps/browser/src/vault/popup/components/vault-v2/new-item-dropdown/new-item-dropdown-v2.component.spec.ts @@ -19,7 +19,7 @@ import { import { ButtonModule, DialogService, MenuModule, NoItemsModule } from "@bitwarden/components"; import { BrowserApi } from "../../../../../platform/browser/browser-api"; -import BrowserPopupUtils from "../../../../../platform/popup/browser-popup-utils"; +import BrowserPopupUtils from "../../../../../platform/browser/browser-popup-utils"; import { NewItemDropdownV2Component, NewItemInitialValues } from "./new-item-dropdown-v2.component"; diff --git a/apps/browser/src/vault/popup/components/vault-v2/new-item-dropdown/new-item-dropdown-v2.component.ts b/apps/browser/src/vault/popup/components/vault-v2/new-item-dropdown/new-item-dropdown-v2.component.ts index fd7a0c4672b..d1586bd6ad5 100644 --- a/apps/browser/src/vault/popup/components/vault-v2/new-item-dropdown/new-item-dropdown-v2.component.ts +++ b/apps/browser/src/vault/popup/components/vault-v2/new-item-dropdown/new-item-dropdown-v2.component.ts @@ -14,7 +14,7 @@ import { ButtonModule, DialogService, MenuModule, NoItemsModule } from "@bitward import { AddEditFolderDialogComponent } from "@bitwarden/vault"; import { BrowserApi } from "../../../../../platform/browser/browser-api"; -import BrowserPopupUtils from "../../../../../platform/popup/browser-popup-utils"; +import BrowserPopupUtils from "../../../../../platform/browser/browser-popup-utils"; import { AddEditQueryParams } from "../add-edit/add-edit-v2.component"; export interface NewItemInitialValues { diff --git a/apps/browser/src/vault/popup/components/vault-v2/vault-list-items-container/vault-list-items-container.component.ts b/apps/browser/src/vault/popup/components/vault-v2/vault-list-items-container/vault-list-items-container.component.ts index cef1ef8d2ff..8a11a70097d 100644 --- a/apps/browser/src/vault/popup/components/vault-v2/vault-list-items-container/vault-list-items-container.component.ts +++ b/apps/browser/src/vault/popup/components/vault-v2/vault-list-items-container/vault-list-items-container.component.ts @@ -50,7 +50,7 @@ import { } from "@bitwarden/vault"; import { BrowserApi } from "../../../../../platform/browser/browser-api"; -import BrowserPopupUtils from "../../../../../platform/popup/browser-popup-utils"; +import BrowserPopupUtils from "../../../../../platform/browser/browser-popup-utils"; import { VaultPopupAutofillService } from "../../../services/vault-popup-autofill.service"; import { VaultPopupSectionService } from "../../../services/vault-popup-section.service"; import { PopupCipherView } from "../../../views/popup-cipher.view"; diff --git a/apps/browser/src/vault/popup/components/vault-v2/vault-v2.component.ts b/apps/browser/src/vault/popup/components/vault-v2/vault-v2.component.ts index 792f2b34f9f..0340c82369d 100644 --- a/apps/browser/src/vault/popup/components/vault-v2/vault-v2.component.ts +++ b/apps/browser/src/vault/popup/components/vault-v2/vault-v2.component.ts @@ -36,7 +36,7 @@ import { DecryptionFailureDialogComponent, VaultIcons } from "@bitwarden/vault"; import { CurrentAccountComponent } from "../../../../auth/popup/account-switching/current-account.component"; import { BrowserApi } from "../../../../platform/browser/browser-api"; -import BrowserPopupUtils from "../../../../platform/popup/browser-popup-utils"; +import BrowserPopupUtils from "../../../../platform/browser/browser-popup-utils"; import { PopOutComponent } from "../../../../platform/popup/components/pop-out.component"; import { PopupHeaderComponent } from "../../../../platform/popup/layout/popup-header.component"; import { PopupPageComponent } from "../../../../platform/popup/layout/popup-page.component"; diff --git a/apps/browser/src/vault/popup/components/vault-v2/view-v2/view-v2.component.spec.ts b/apps/browser/src/vault/popup/components/vault-v2/view-v2/view-v2.component.spec.ts index 3222f39a162..a9031ea2630 100644 --- a/apps/browser/src/vault/popup/components/vault-v2/view-v2/view-v2.component.spec.ts +++ b/apps/browser/src/vault/popup/components/vault-v2/view-v2/view-v2.component.spec.ts @@ -27,7 +27,7 @@ import { DialogService, ToastService } from "@bitwarden/components"; import { CopyCipherFieldService, PasswordRepromptService } from "@bitwarden/vault"; import { BrowserApi } from "../../../../../platform/browser/browser-api"; -import BrowserPopupUtils from "../../../../../platform/popup/browser-popup-utils"; +import BrowserPopupUtils from "../../../../../platform/browser/browser-popup-utils"; import { PopupRouterCacheService } from "../../../../../platform/popup/view-cache/popup-router-cache.service"; import { VaultPopupScrollPositionService } from "../../../services/vault-popup-scroll-position.service"; diff --git a/apps/browser/src/vault/popup/components/vault-v2/view-v2/view-v2.component.ts b/apps/browser/src/vault/popup/components/vault-v2/view-v2/view-v2.component.ts index 9131fdcd9e4..349ea136ecf 100644 --- a/apps/browser/src/vault/popup/components/vault-v2/view-v2/view-v2.component.ts +++ b/apps/browser/src/vault/popup/components/vault-v2/view-v2/view-v2.component.ts @@ -50,7 +50,7 @@ import { import { sendExtensionMessage } from "../../../../../autofill/utils/index"; import { BrowserApi } from "../../../../../platform/browser/browser-api"; -import BrowserPopupUtils from "../../../../../platform/popup/browser-popup-utils"; +import BrowserPopupUtils from "../../../../../platform/browser/browser-popup-utils"; import { PopOutComponent } from "../../../../../platform/popup/components/pop-out.component"; import { PopupRouterCacheService } from "../../../../../platform/popup/view-cache/popup-router-cache.service"; import { BrowserPremiumUpgradePromptService } from "../../../services/browser-premium-upgrade-prompt.service"; diff --git a/apps/browser/src/vault/popup/services/browser-totp-capture.service.spec.ts b/apps/browser/src/vault/popup/services/browser-totp-capture.service.spec.ts index 2b309e8f817..05ff6461d0a 100644 --- a/apps/browser/src/vault/popup/services/browser-totp-capture.service.spec.ts +++ b/apps/browser/src/vault/popup/services/browser-totp-capture.service.spec.ts @@ -2,7 +2,7 @@ import { TestBed } from "@angular/core/testing"; import qrcodeParser from "qrcode-parser"; import { BrowserApi } from "../../../platform/browser/browser-api"; -import BrowserPopupUtils from "../../../platform/popup/browser-popup-utils"; +import BrowserPopupUtils from "../../../platform/browser/browser-popup-utils"; import { BrowserTotpCaptureService } from "./browser-totp-capture.service"; diff --git a/apps/browser/src/vault/popup/services/browser-totp-capture.service.ts b/apps/browser/src/vault/popup/services/browser-totp-capture.service.ts index ac73b271c84..95b9a0d5167 100644 --- a/apps/browser/src/vault/popup/services/browser-totp-capture.service.ts +++ b/apps/browser/src/vault/popup/services/browser-totp-capture.service.ts @@ -4,7 +4,7 @@ import qrcodeParser from "qrcode-parser"; import { TotpCaptureService } from "@bitwarden/vault"; import { BrowserApi } from "../../../platform/browser/browser-api"; -import BrowserPopupUtils from "../../../platform/popup/browser-popup-utils"; +import BrowserPopupUtils from "../../../platform/browser/browser-popup-utils"; /** * Implementation of TotpCaptureService for the browser which captures the diff --git a/apps/browser/src/vault/popup/services/vault-popup-autofill.service.spec.ts b/apps/browser/src/vault/popup/services/vault-popup-autofill.service.spec.ts index 73c3fed3276..616c75c3fa8 100644 --- a/apps/browser/src/vault/popup/services/vault-popup-autofill.service.spec.ts +++ b/apps/browser/src/vault/popup/services/vault-popup-autofill.service.spec.ts @@ -28,7 +28,7 @@ import { } from "../../../autofill/services/abstractions/autofill.service"; import { InlineMenuFieldQualificationService } from "../../../autofill/services/inline-menu-field-qualification.service"; import { BrowserApi } from "../../../platform/browser/browser-api"; -import BrowserPopupUtils from "../../../platform/popup/browser-popup-utils"; +import BrowserPopupUtils from "../../../platform/browser/browser-popup-utils"; import { VaultPopupAutofillService } from "./vault-popup-autofill.service"; diff --git a/apps/browser/src/vault/popup/services/vault-popup-autofill.service.ts b/apps/browser/src/vault/popup/services/vault-popup-autofill.service.ts index 41d76078fdb..4e995e093e6 100644 --- a/apps/browser/src/vault/popup/services/vault-popup-autofill.service.ts +++ b/apps/browser/src/vault/popup/services/vault-popup-autofill.service.ts @@ -35,7 +35,7 @@ import { } from "../../../autofill/services/abstractions/autofill.service"; import { InlineMenuFieldQualificationService } from "../../../autofill/services/inline-menu-field-qualification.service"; import { BrowserApi } from "../../../platform/browser/browser-api"; -import BrowserPopupUtils from "../../../platform/popup/browser-popup-utils"; +import BrowserPopupUtils from "../../../platform/browser/browser-popup-utils"; import { closeViewVaultItemPopout, VaultPopoutType } from "../utils/vault-popout-window"; @Injectable({ diff --git a/apps/browser/src/vault/popup/settings/appearance-v2.component.ts b/apps/browser/src/vault/popup/settings/appearance-v2.component.ts index 2a38d281396..d998ef846d2 100644 --- a/apps/browser/src/vault/popup/settings/appearance-v2.component.ts +++ b/apps/browser/src/vault/popup/settings/appearance-v2.component.ts @@ -24,14 +24,12 @@ import { SelectModule, } from "@bitwarden/components"; +import { PopupWidthOption } from "../../../platform/browser/browser-popup-utils"; import { PopOutComponent } from "../../../platform/popup/components/pop-out.component"; import { PopupCompactModeService } from "../../../platform/popup/layout/popup-compact-mode.service"; import { PopupHeaderComponent } from "../../../platform/popup/layout/popup-header.component"; import { PopupPageComponent } from "../../../platform/popup/layout/popup-page.component"; -import { - PopupWidthOption, - PopupSizeService, -} from "../../../platform/popup/layout/popup-size.service"; +import { PopupSizeService } from "../../../platform/popup/layout/popup-size.service"; import { VaultPopupCopyButtonsService } from "../services/vault-popup-copy-buttons.service"; @Component({ diff --git a/apps/browser/src/vault/popup/settings/vault-settings-v2.component.ts b/apps/browser/src/vault/popup/settings/vault-settings-v2.component.ts index 6f7940a2827..e7305d57cab 100644 --- a/apps/browser/src/vault/popup/settings/vault-settings-v2.component.ts +++ b/apps/browser/src/vault/popup/settings/vault-settings-v2.component.ts @@ -12,7 +12,7 @@ import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.serv import { BadgeComponent, ItemModule, ToastOptions, ToastService } from "@bitwarden/components"; import { BrowserApi } from "../../../platform/browser/browser-api"; -import BrowserPopupUtils from "../../../platform/popup/browser-popup-utils"; +import BrowserPopupUtils from "../../../platform/browser/browser-popup-utils"; import { PopOutComponent } from "../../../platform/popup/components/pop-out.component"; import { PopupHeaderComponent } from "../../../platform/popup/layout/popup-header.component"; import { PopupPageComponent } from "../../../platform/popup/layout/popup-page.component"; diff --git a/apps/browser/src/vault/popup/utils/vault-popout-window.spec.ts b/apps/browser/src/vault/popup/utils/vault-popout-window.spec.ts index ee0918eab07..4597c004290 100644 --- a/apps/browser/src/vault/popup/utils/vault-popout-window.spec.ts +++ b/apps/browser/src/vault/popup/utils/vault-popout-window.spec.ts @@ -2,7 +2,7 @@ import { mock } from "jest-mock-extended"; import { CipherType } from "@bitwarden/common/vault/enums"; -import BrowserPopupUtils from "../../../platform/popup/browser-popup-utils"; +import BrowserPopupUtils from "../../../platform/browser/browser-popup-utils"; import { openViewVaultItemPopout, diff --git a/apps/browser/src/vault/popup/utils/vault-popout-window.ts b/apps/browser/src/vault/popup/utils/vault-popout-window.ts index 9e347920eb2..3dae96b6cc7 100644 --- a/apps/browser/src/vault/popup/utils/vault-popout-window.ts +++ b/apps/browser/src/vault/popup/utils/vault-popout-window.ts @@ -3,7 +3,7 @@ import { CipherType } from "@bitwarden/common/vault/enums"; import { BrowserApi } from "../../../platform/browser/browser-api"; -import BrowserPopupUtils from "../../../platform/popup/browser-popup-utils"; +import BrowserPopupUtils from "../../../platform/browser/browser-popup-utils"; const VaultPopoutType = { viewVaultItem: "vault_viewVaultItem", From 73e5aab7e473ff63b063c435b8a84141df372ecc Mon Sep 17 00:00:00 2001 From: cd-bitwarden <106776772+cd-bitwarden@users.noreply.github.com> Date: Fri, 20 Jun 2025 09:40:34 -0400 Subject: [PATCH 2/6] Changing the text for creating a new access token from "add access token" to "create access token" (#15078) --- apps/web/src/locales/en/messages.json | 4 ++-- .../service-accounts/access/access-list.component.html | 2 +- .../access/dialogs/access-token-create-dialog.component.html | 4 ++-- .../access/dialogs/access-token-dialog.component.html | 2 +- .../service-accounts/service-account.component.html | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/apps/web/src/locales/en/messages.json b/apps/web/src/locales/en/messages.json index 6785c20d8f4..7ca482755a7 100644 --- a/apps/web/src/locales/en/messages.json +++ b/apps/web/src/locales/en/messages.json @@ -7702,8 +7702,8 @@ "message": "Access tokens", "description": "Title for the section displaying access tokens." }, - "newAccessToken": { - "message": "New access token", + "createAccessToken": { + "message": "Create access token", "description": "Button label for creating a new access token." }, "expires": { diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/access/access-list.component.html b/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/access/access-list.component.html index 0c5a49cd35b..fbb0dd8888a 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/access/access-list.component.html +++ b/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/access/access-list.component.html @@ -13,7 +13,7 @@ (click)="newAccessTokenEvent.emit()" > - {{ "newAccessToken" | i18n }} + {{ "createAccessToken" | i18n }} diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/access/dialogs/access-token-create-dialog.component.html b/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/access/dialogs/access-token-create-dialog.component.html index d843887a392..65de06617a9 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/access/dialogs/access-token-create-dialog.component.html +++ b/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/access/dialogs/access-token-create-dialog.component.html @@ -1,7 +1,7 @@
- {{ "newAccessToken" | i18n }} + {{ "createAccessToken" | i18n }} {{ data.serviceAccountView.name }} @@ -21,7 +21,7 @@ From 8a8d02b7dbcf51c580e2525ec8bc337293313585 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=9C=A8=20Audrey=20=E2=9C=A8?= Date: Fri, 20 Jun 2025 09:44:38 -0400 Subject: [PATCH 3/6] encapsulate kludge property to fix invalid credential type error (#15225) --- libs/common/src/tools/state/user-state-subject.ts | 8 ++++++++ .../core/src/providers/generator-profile-provider.spec.ts | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/libs/common/src/tools/state/user-state-subject.ts b/libs/common/src/tools/state/user-state-subject.ts index 118b0069c84..2c80c9ad135 100644 --- a/libs/common/src/tools/state/user-state-subject.ts +++ b/libs/common/src/tools/state/user-state-subject.ts @@ -161,6 +161,14 @@ export class UserStateSubject< this.outputSubscription = userState$ .pipe( switchMap((userState) => userState.state$), + map((stored) => { + if (stored && typeof stored === "object" && ALWAYS_UPDATE_KLUDGE in stored) { + // related: ALWAYS_UPDATE_KLUDGE FIXME + delete stored[ALWAYS_UPDATE_KLUDGE]; + } + + return stored; + }), this.declassify(encryptor$), this.adjust(combineLatestWith(constraints$)), takeUntil(anyComplete(account$)), diff --git a/libs/tools/generator/core/src/providers/generator-profile-provider.spec.ts b/libs/tools/generator/core/src/providers/generator-profile-provider.spec.ts index 1053834eca7..32d99aa8a1f 100644 --- a/libs/tools/generator/core/src/providers/generator-profile-provider.spec.ts +++ b/libs/tools/generator/core/src/providers/generator-profile-provider.spec.ts @@ -172,7 +172,7 @@ describe("GeneratorProfileProvider", () => { await awaitAsync(); const result = await firstValueFrom(stateProvider.getUserState$(SettingsKey, SomeUser)); - expect(result).toEqual({ foo: "next value" }); + expect(result).toMatchObject({ foo: "next value" }); }); it("waits for the user to become available", async () => { From 750cfeea721fdd85d60c6ba01f0036b9ba1e48aa Mon Sep 17 00:00:00 2001 From: cd-bitwarden <106776772+cd-bitwarden@users.noreply.github.com> Date: Fri, 20 Jun 2025 09:50:57 -0400 Subject: [PATCH 4/6] SM-1122 Removing H1 on service account event logs, so that there is consistency in the UI (#15085) --- .../event-logs/service-accounts-events.component.html | 1 - 1 file changed, 1 deletion(-) diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/event-logs/service-accounts-events.component.html b/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/event-logs/service-accounts-events.component.html index 458320a8a2a..a895ab058ec 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/event-logs/service-accounts-events.component.html +++ b/bitwarden_license/bit-web/src/app/secrets-manager/service-accounts/event-logs/service-accounts-events.component.html @@ -1,5 +1,4 @@
-

{{ "eventLogs" | i18n }}

{{ "from" | i18n }} From a4ef61e1fc8182528f377ffb20de83be1f29eb14 Mon Sep 17 00:00:00 2001 From: Andy Pixley <3723676+pixman20@users.noreply.github.com> Date: Fri, 20 Jun 2025 12:34:18 -0400 Subject: [PATCH 5/6] [BRE-848] Adding Workflow Permissions (#15250) --- .github/workflows/auto-branch-updater.yml | 2 ++ .github/workflows/auto-reply-discussions.yml | 3 +++ .github/workflows/enforce-labels.yml | 3 +++ .github/workflows/lint.yml | 3 +++ .github/workflows/locales-lint.yml | 3 +++ .github/workflows/release-browser.yml | 6 ++++++ .github/workflows/release-web.yml | 4 ++++ .github/workflows/stale-bot.yml | 5 +++++ 8 files changed, 29 insertions(+) diff --git a/.github/workflows/auto-branch-updater.yml b/.github/workflows/auto-branch-updater.yml index dc4a43fc34e..3f67388fd0c 100644 --- a/.github/workflows/auto-branch-updater.yml +++ b/.github/workflows/auto-branch-updater.yml @@ -22,6 +22,8 @@ jobs: env: _BOT_EMAIL: 106330231+bitwarden-devops-bot@users.noreply.github.com _BOT_NAME: bitwarden-devops-bot + permissions: + contents: write steps: - name: Setup id: setup diff --git a/.github/workflows/auto-reply-discussions.yml b/.github/workflows/auto-reply-discussions.yml index 8becc7471c5..83970ab3619 100644 --- a/.github/workflows/auto-reply-discussions.yml +++ b/.github/workflows/auto-reply-discussions.yml @@ -8,6 +8,9 @@ jobs: reply: name: Auto-reply runs-on: ubuntu-22.04 + permissions: + discussions: write + contents: read steps: - name: Get discussion label and template name diff --git a/.github/workflows/enforce-labels.yml b/.github/workflows/enforce-labels.yml index 40ddfe7739f..12a771fd3c0 100644 --- a/.github/workflows/enforce-labels.yml +++ b/.github/workflows/enforce-labels.yml @@ -4,6 +4,9 @@ on: workflow_call: pull_request: types: [labeled, unlabeled, opened, edited, synchronize] +permissions: + contents: read + pull-requests: read jobs: enforce-label: name: EnforceLabel diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 4fbef027c7c..4246d623f04 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -22,6 +22,9 @@ defaults: run: shell: bash +permissions: + contents: read + jobs: lint: name: Lint diff --git a/.github/workflows/locales-lint.yml b/.github/workflows/locales-lint.yml index 8c9447ea50f..0c8148d4c28 100644 --- a/.github/workflows/locales-lint.yml +++ b/.github/workflows/locales-lint.yml @@ -8,6 +8,9 @@ on: paths: - '**/messages.json' +permissions: + contents: read + jobs: lint: name: Lint diff --git a/.github/workflows/release-browser.yml b/.github/workflows/release-browser.yml index 498f8748959..ac79287f84d 100644 --- a/.github/workflows/release-browser.yml +++ b/.github/workflows/release-browser.yml @@ -22,6 +22,8 @@ jobs: setup: name: Setup runs-on: ubuntu-22.04 + permissions: + contents: read outputs: release_version: ${{ steps.version.outputs.version }} steps: @@ -53,6 +55,8 @@ jobs: name: Locales Test runs-on: ubuntu-22.04 needs: setup + permissions: + contents: read steps: - name: Checkout repo uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -89,6 +93,8 @@ jobs: needs: - setup - locales-test + permissions: + contents: write steps: - name: Download latest Release build artifacts if: ${{ github.event.inputs.release_type != 'Dry Run' }} diff --git a/.github/workflows/release-web.yml b/.github/workflows/release-web.yml index 0301b814796..5a3c29d29fc 100644 --- a/.github/workflows/release-web.yml +++ b/.github/workflows/release-web.yml @@ -18,6 +18,8 @@ jobs: setup: name: Setup runs-on: ubuntu-22.04 + permissions: + contents: read outputs: release_version: ${{ steps.version.outputs.version }} tag_version: ${{ steps.version.outputs.tag }} @@ -50,6 +52,8 @@ jobs: runs-on: ubuntu-22.04 needs: - setup + permissions: + contents: write steps: - name: Download latest build artifacts if: ${{ github.event.inputs.release_type != 'Dry Run' }} diff --git a/.github/workflows/stale-bot.yml b/.github/workflows/stale-bot.yml index abb292f53f3..13acde2b0fc 100644 --- a/.github/workflows/stale-bot.yml +++ b/.github/workflows/stale-bot.yml @@ -8,6 +8,11 @@ jobs: stale: name: 'Check for stale issues and PRs' runs-on: ubuntu-22.04 + permissions: + actions: write + contents: read + issues: write + pull-requests: write steps: - name: 'Run stale action' uses: actions/stale@5bef64f19d7facfb25b37b414482c7164d639639 # v9.1.0 From 9e1ab2864c972524bab4be03c4766cf997b5a616 Mon Sep 17 00:00:00 2001 From: Nick Krantz <125900171+nick-livefront@users.noreply.github.com> Date: Fri, 20 Jun 2025 15:57:33 -0500 Subject: [PATCH 6/6] avoid aria-label for screen reader only text (#15119) --- .../src/nudge-generator-spotlight.component.html | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/libs/tools/generator/components/src/nudge-generator-spotlight.component.html b/libs/tools/generator/components/src/nudge-generator-spotlight.component.html index b06db8b83e1..581825936be 100644 --- a/libs/tools/generator/components/src/nudge-generator-spotlight.component.html +++ b/libs/tools/generator/components/src/nudge-generator-spotlight.component.html @@ -3,11 +3,10 @@ [title]="'generatorNudgeTitle' | i18n" (onDismiss)="dismissGeneratorSpotlight(NudgeType.GeneratorNudgeStatus)" > -

+

+ + {{ "generatorNudgeBodyAria" | i18n }} +