Skip to content
TypeScript

fix(web): add installable icons for Firefox on Android (#30420)

shivamb19c9f038a27
diff --git a/apps/web/public/icon-192x192.png b/apps/web/public/icon-192x192.png
new file mode 100644
index 00000000000..3e2637386b1
Binary files /dev/null and b/apps/web/public/icon-192x192.png differ
diff --git a/apps/web/public/icon-512x512.png b/apps/web/public/icon-512x512.png
new file mode 100644
index 00000000000..1fac754a327
Binary files /dev/null and b/apps/web/public/icon-512x512.png differ
diff --git a/apps/web/public/manifest.webmanifest b/apps/web/public/manifest.webmanifest
index fa9c40e127a..26d1c2e0d38 100644
--- a/apps/web/public/manifest.webmanifest
+++ b/apps/web/public/manifest.webmanifest
@@ -17,6 +17,18 @@
"src": "/apple-touch-icon.png",
"sizes": "180x180",
"type": "image/png"
+ },
+ {
+ "src": "/icon-192x192.png",
+ "sizes": "192x192",
+ "type": "image/png",
+ "purpose": "any"
+ },
+ {
+ "src": "/icon-512x512.png",
+ "sizes": "512x512",
+ "type": "image/png",
+ "purpose": "any"
}
]
}
diff --git a/assets/README.md b/assets/README.md
index 9ed3fc3cd05..f03136d3231 100644
--- a/assets/README.md
+++ b/assets/README.md
@@ -8,7 +8,7 @@ The three Icon Composer projects are the source of truth for full application ic
Each project uses `text.svg` for the T3 mark and `background.svg` when the background is a vector layer. Additional layers use semantic names that describe their role and placement.
-Run `vp run icons:export` from the repository root to regenerate the tracked iOS, Linux, Windows, and web assets. The development web exports are also copied to `apps/web/public` for the browser favicon and splash screen. Run `vp run icons:check` to verify that the generated assets and public copies match their sources without changing files.
+Run `vp run icons:export` from the repository root to regenerate the tracked iOS, Linux, Windows, and web assets. The development web exports are also copied to `apps/web/public` for the browser favicon, web app manifest icons, and splash screen. Run `vp run icons:check` to verify that the generated assets and public copies match their sources without changing files.
Exporting requires Icon Composer 2 or newer on macOS. The script selects the newest compatible exporter from Xcode or a standalone Icon Composer installation and pins design generation 26. Set `ICON_COMPOSER_TOOL` to the full path of `Icon Composer.app/Contents/Executables/ictool` to override automatic discovery.
diff --git a/assets/dev/blueprint-web-icon-192x192.png b/assets/dev/blueprint-web-icon-192x192.png
new file mode 100644
index 00000000000..3e2637386b1
Binary files /dev/null and b/assets/dev/blueprint-web-icon-192x192.png differ
diff --git a/assets/dev/blueprint-web-icon-512x512.png b/assets/dev/blueprint-web-icon-512x512.png
new file mode 100644
index 00000000000..1fac754a327
Binary files /dev/null and b/assets/dev/blueprint-web-icon-512x512.png differ
diff --git a/assets/nightly/nightly-web-icon-192x192.png b/assets/nightly/nightly-web-icon-192x192.png
new file mode 100644
index 00000000000..95e9256dc8a
Binary files /dev/null and b/assets/nightly/nightly-web-icon-192x192.png differ
diff --git a/assets/nightly/nightly-web-icon-512x512.png b/assets/nightly/nightly-web-icon-512x512.png
new file mode 100644
index 00000000000..6ce057fba4a
Binary files /dev/null and b/assets/nightly/nightly-web-icon-512x512.png differ
diff --git a/assets/prod/t3-black-web-icon-192x192.png b/assets/prod/t3-black-web-icon-192x192.png
new file mode 100644
index 00000000000..aa7944053b5
Binary files /dev/null and b/assets/prod/t3-black-web-icon-192x192.png differ
diff --git a/assets/prod/t3-black-web-icon-512x512.png b/assets/prod/t3-black-web-icon-512x512.png
new file mode 100644
index 00000000000..597cfcc5923
Binary files /dev/null and b/assets/prod/t3-black-web-icon-512x512.png differ
diff --git a/scripts/apply-web-brand-assets.test.ts b/scripts/apply-web-brand-assets.test.ts
index c3073879b20..9ede298fb7d 100644
--- a/scripts/apply-web-brand-assets.test.ts
+++ b/scripts/apply-web-brand-assets.test.ts
@@ -11,6 +11,8 @@ const WEB_ICON_FILENAMES = [
"favicon-16x16.png",
"favicon-32x32.png",
"favicon.ico",
+ "icon-192x192.png",
+ "icon-512x512.png",
];
it.layer(NodeServices.layer)("apply-web-brand-assets", (it) => {
diff --git a/scripts/export-brand-icons.ts b/scripts/export-brand-icons.ts
index 36efc58ab34..052665b7c29 100644
--- a/scripts/export-brand-icons.ts
+++ b/scripts/export-brand-icons.ts
@@ -48,6 +48,8 @@ interface VariantOutputs {
readonly macos: string;
readonly universal: string;
readonly appleTouch: string;
+ readonly webIcon192: string;
+ readonly webIcon512: string;
readonly favicon16: string;
readonly favicon32: string;
readonly faviconIco: string;
@@ -211,6 +213,8 @@ const ICON_VARIANTS = [
macos: BRAND_ASSET_PATHS.developmentDesktopIconPng,
universal: BRAND_ASSET_PATHS.developmentUniversalIconPng,
appleTouch: BRAND_ASSET_PATHS.developmentWebAppleTouchIconPng,
+ webIcon192: BRAND_ASSET_PATHS.developmentWebIcon192Png,
+ webIcon512: BRAND_ASSET_PATHS.developmentWebIcon512Png,
favicon16: BRAND_ASSET_PATHS.developmentWebFavicon16Png,
favicon32: BRAND_ASSET_PATHS.developmentWebFavicon32Png,
faviconIco: BRAND_ASSET_PATHS.developmentWebFaviconIco,
@@ -225,6 +229,8 @@ const ICON_VARIANTS = [
macos: BRAND_ASSET_PATHS.nightlyMacIconPng,
universal: BRAND_ASSET_PATHS.nightlyLinuxIconPng,
appleTouch: BRAND_ASSET_PATHS.nightlyWebAppleTouchIconPng,
+ webIcon192: BRAND_ASSET_PATHS.nightlyWebIcon192Png,
+ webIcon512: BRAND_ASSET_PATHS.nightlyWebIcon512Png,
favicon16: BRAND_ASSET_PATHS.nightlyWebFavicon16Png,
favicon32: BRAND_ASSET_PATHS.nightlyWebFavicon32Png,
faviconIco: BRAND_ASSET_PATHS.nightlyWebFaviconIco,
@@ -239,6 +245,8 @@ const ICON_VARIANTS = [
macos: BRAND_ASSET_PATHS.productionMacIconPng,
universal: BRAND_ASSET_PATHS.productionLinuxIconPng,
appleTouch: BRAND_ASSET_PATHS.productionWebAppleTouchIconPng,
+ webIcon192: BRAND_ASSET_PATHS.productionWebIcon192Png,
+ webIcon512: BRAND_ASSET_PATHS.productionWebIcon512Png,
favicon16: BRAND_ASSET_PATHS.productionWebFavicon16Png,
favicon32: BRAND_ASSET_PATHS.productionWebFavicon32Png,
faviconIco: BRAND_ASSET_PATHS.productionWebFaviconIco,
@@ -592,6 +600,8 @@ const renderVariant = Effect.fn("iconExport.renderVariant")(function* (
[variant.outputs.ios, ios],
[variant.outputs.universal, ios],
[variant.outputs.appleTouch, yield* render("iOS", 180)],
+ [variant.outputs.webIcon192, yield* render("iOS", 192)],
+ [variant.outputs.webIcon512, yield* render("iOS", 512)],
[variant.outputs.favicon16, yield* render("iOS", 16)],
[variant.outputs.favicon32, yield* render("iOS", 32)],
[variant.outputs.faviconIco, ico],
diff --git a/scripts/lib/brand-assets.ts b/scripts/lib/brand-assets.ts
index 4f2d743a9c2..cde89a42b7d 100644
--- a/scripts/lib/brand-assets.ts
+++ b/scripts/lib/brand-assets.ts
@@ -12,6 +12,8 @@ export const BRAND_ASSET_PATHS = {
productionWebFavicon16Png: "assets/prod/t3-black-web-favicon-16x16.png",
productionWebFavicon32Png: "assets/prod/t3-black-web-favicon-32x32.png",
productionWebAppleTouchIconPng: "assets/prod/t3-black-web-apple-touch-180.png",
+ productionWebIcon192Png: "assets/prod/t3-black-web-icon-192x192.png",
+ productionWebIcon512Png: "assets/prod/t3-black-web-icon-512x512.png",
nightlyIconComposerProject: "assets/nightly/app-icon.icon",
nightlyIosIconPng: "assets/nightly/nightly-ios-1024.png",
@@ -22,6 +24,8 @@ export const BRAND_ASSET_PATHS = {
nightlyWebFavicon16Png: "assets/nightly/nightly-web-favicon-16x16.png",
nightlyWebFavicon32Png: "assets/nightly/nightly-web-favicon-32x32.png",
nightlyWebAppleTouchIconPng: "assets/nightly/nightly-web-apple-touch-180.png",
+ nightlyWebIcon192Png: "assets/nightly/nightly-web-icon-192x192.png",
+ nightlyWebIcon512Png: "assets/nightly/nightly-web-icon-512x512.png",
developmentDesktopIconPng: "assets/dev/blueprint-macos-1024.png",
developmentWindowsIconIco: "assets/dev/blueprint-windows.ico",
@@ -29,6 +33,8 @@ export const BRAND_ASSET_PATHS = {
developmentWebFavicon16Png: "assets/dev/blueprint-web-favicon-16x16.png",
developmentWebFavicon32Png: "assets/dev/blueprint-web-favicon-32x32.png",
developmentWebAppleTouchIconPng: "assets/dev/blueprint-web-apple-touch-180.png",
+ developmentWebIcon192Png: "assets/dev/blueprint-web-icon-192x192.png",
+ developmentWebIcon512Png: "assets/dev/blueprint-web-icon-512x512.png",
} as const;
export type WebAssetBrand = "development" | "nightly" | "production";
@@ -51,6 +57,8 @@ const WEB_ICON_TARGET_FILENAMES = {
favicon16Png: "favicon-16x16.png",
favicon32Png: "favicon-32x32.png",
appleTouchIconPng: "apple-touch-icon.png",
+ icon192Png: "icon-192x192.png",
+ icon512Png: "icon-512x512.png",
} as const;
const WEB_ICON_SOURCE_PATHS_BY_BRAND = {
@@ -59,18 +67,24 @@ const WEB_ICON_SOURCE_PATHS_BY_BRAND = {
favicon16Png: BRAND_ASSET_PATHS.developmentWebFavicon16Png,
favicon32Png: BRAND_ASSET_PATHS.developmentWebFavicon32Png,
appleTouchIconPng: BRAND_ASSET_PATHS.developmentWebAppleTouchIconPng,
+ icon192Png: BRAND_ASSET_PATHS.developmentWebIcon192Png,
+ icon512Png: BRAND_ASSET_PATHS.developmentWebIcon512Png,
},
nightly: {
faviconIco: BRAND_ASSET_PATHS.nightlyWebFaviconIco,
favicon16Png: BRAND_ASSET_PATHS.nightlyWebFavicon16Png,
favicon32Png: BRAND_ASSET_PATHS.nightlyWebFavicon32Png,
appleTouchIconPng: BRAND_ASSET_PATHS.nightlyWebAppleTouchIconPng,
+ icon192Png: BRAND_ASSET_PATHS.nightlyWebIcon192Png,
+ icon512Png: BRAND_ASSET_PATHS.nightlyWebIcon512Png,
},
production: {
faviconIco: BRAND_ASSET_PATHS.productionWebFaviconIco,
favicon16Png: BRAND_ASSET_PATHS.productionWebFavicon16Png,
favicon32Png: BRAND_ASSET_PATHS.productionWebFavicon32Png,
appleTouchIconPng: BRAND_ASSET_PATHS.productionWebAppleTouchIconPng,
+ icon192Png: BRAND_ASSET_PATHS.productionWebIcon192Png,
+ icon512Png: BRAND_ASSET_PATHS.productionWebIcon512Png,
},
} as const satisfies Record<WebAssetBrand, Record<keyof typeof WEB_ICON_TARGET_FILENAMES, string>>;
@@ -96,6 +110,14 @@ export function resolveWebIconOverrides(
sourceRelativePath: sourcePaths.appleTouchIconPng,
targetRelativePath: `${targetDirectory}/${WEB_ICON_TARGET_FILENAMES.appleTouchIconPng}`,
},
+ {
+ sourceRelativePath: sourcePaths.icon192Png,
+ targetRelativePath: `${targetDirectory}/${WEB_ICON_TARGET_FILENAMES.icon192Png}`,
+ },
+ {
+ sourceRelativePath: sourcePaths.icon512Png,
+ targetRelativePath: `${targetDirectory}/${WEB_ICON_TARGET_FILENAMES.icon512Png}`,
+ },
];
}