From d77930428564e98a1b3809c6e64990682bdc6d6e Mon Sep 17 00:00:00 2001 From: Jordan Aasen <166539328+jaasen-livefront@users.noreply.github.com> Date: Thu, 11 Dec 2025 15:45:32 -0800 Subject: [PATCH] [PM-25388] - remove reference to android/ios icons (#17763) * remove android/ios icons as they're not in the icon lib * fix tests --- .../src/vault/icon/build-cipher-icon.spec.ts | 43 ++++++++++--------- .../src/vault/icon/build-cipher-icon.ts | 6 ++- 2 files changed, 26 insertions(+), 23 deletions(-) diff --git a/libs/common/src/vault/icon/build-cipher-icon.spec.ts b/libs/common/src/vault/icon/build-cipher-icon.spec.ts index 90ccaaec3a6..67a1151aa8e 100644 --- a/libs/common/src/vault/icon/build-cipher-icon.spec.ts +++ b/libs/common/src/vault/icon/build-cipher-icon.spec.ts @@ -13,18 +13,19 @@ describe("buildCipherIcon", () => { }, } as any as CipherView; - it.each([true, false])("handles android app URIs for showFavicon setting %s", (showFavicon) => { - setUri("androidapp://test.example"); + // @TODO Uncomment once we have Android and iOS icons https://bitwarden.atlassian.net/browse/PM-29028 + // it.each([true, false])("handles android app URIs for showFavicon setting %s", (showFavicon) => { + // setUri("androidapp://test.example"); - const iconDetails = buildCipherIcon(iconServerUrl, cipher, showFavicon); + // const iconDetails = buildCipherIcon(iconServerUrl, cipher, showFavicon); - expect(iconDetails).toEqual({ - icon: "bwi-android", - image: null, - fallbackImage: "", - imageEnabled: showFavicon, - }); - }); + // expect(iconDetails).toEqual({ + // icon: "bwi-android", + // image: null, + // fallbackImage: "", + // imageEnabled: showFavicon, + // }); + // }); it("does not mark as an android app if the protocol is not androidapp", () => { // This weird URI points to test.androidapp with a default port and path of /.example @@ -40,18 +41,18 @@ describe("buildCipherIcon", () => { }); }); - it.each([true, false])("handles ios app URIs for showFavicon setting %s", (showFavicon) => { - setUri("iosapp://test.example"); + // @TODO Uncomment once we have Android and iOS icons https://bitwarden.atlassian.net/browse/PM-29028 + // it.each([true, false])("handles ios app URIs for showFavicon setting %s", (showFavicon) => { + // setUri("iosapp://test.example"); - const iconDetails = buildCipherIcon(iconServerUrl, cipher, showFavicon); - - expect(iconDetails).toEqual({ - icon: "bwi-apple", - image: null, - fallbackImage: "", - imageEnabled: showFavicon, - }); - }); + // const iconDetails = buildCipherIcon(iconServerUrl, cipher, showFavicon); + // expect(iconDetails).toEqual({ + // icon: "bwi-apple", + // image: null, + // fallbackImage: "", + // imageEnabled: showFavicon, + // }); + // }); it("does not mark as an ios app if the protocol is not iosapp", () => { // This weird URI points to test.iosapp with a default port and path of /.example diff --git a/libs/common/src/vault/icon/build-cipher-icon.ts b/libs/common/src/vault/icon/build-cipher-icon.ts index a081511d792..77787874d8e 100644 --- a/libs/common/src/vault/icon/build-cipher-icon.ts +++ b/libs/common/src/vault/icon/build-cipher-icon.ts @@ -49,10 +49,12 @@ export function buildCipherIcon( let isWebsite = false; if (hostnameUri.indexOf("androidapp://") === 0) { - icon = "bwi-android"; + // @TODO Re-add once we have Android icon https://bitwarden.atlassian.net/browse/PM-29028 + // icon = "bwi-android"; image = null; } else if (hostnameUri.indexOf("iosapp://") === 0) { - icon = "bwi-apple"; + // @TODO Re-add once we have iOS icon https://bitwarden.atlassian.net/browse/PM-29028 + // icon = "bwi-apple"; image = null; } else if ( showFavicon &&