From 64d97998fd6ecc483b25a56e481a53cf7719419c Mon Sep 17 00:00:00 2001 From: Anton Kastritskiy Date: Thu, 19 Oct 2023 07:25:40 -0700 Subject: [PATCH] fix prod icons Summary: Previously we had requested non existing icons. This fixes missing icons on pixel dense screens (macbook pro, 4k screens). I could add x4, x5 icons as well. Though they are no better than x3. Even x3 is pretty raterized. Ideally we should be serving icons with higher resolution and scaling them down instead of doing this. Even better use SVG icons which we do not have. Reviewed By: LukeDefeo Differential Revision: D50454271 fbshipit-source-id: cda90972abb56069e160ddefdc6de460c49d06c0 --- desktop/flipper-ui-core/src/utils/icons.tsx | 2 +- desktop/scripts/build-icons.tsx | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/desktop/flipper-ui-core/src/utils/icons.tsx b/desktop/flipper-ui-core/src/utils/icons.tsx index b79333e6e..da866bf9d 100644 --- a/desktop/flipper-ui-core/src/utils/icons.tsx +++ b/desktop/flipper-ui-core/src/utils/icons.tsx @@ -11,7 +11,7 @@ import {getRenderHostInstance} from 'flipper-frontend-core'; import {IconSize} from '../ui/components/Glyph'; const AVAILABLE_SIZES: IconSize[] = [8, 10, 12, 16, 18, 20, 24, 28, 32]; -const DENSITIES = [1, 1.5, 2, 3, 4]; +const DENSITIES = [1, 2, 3]; export type Icon = { name: string; diff --git a/desktop/scripts/build-icons.tsx b/desktop/scripts/build-icons.tsx index 152799aa7..bda85ff0d 100644 --- a/desktop/scripts/build-icons.tsx +++ b/desktop/scripts/build-icons.tsx @@ -44,6 +44,7 @@ export async function downloadIcons(buildFolder: string) { // get icons in @1x and @2x ...sizes.map((size) => ({name, variant, size, density: 1})), ...sizes.map((size) => ({name, variant, size, density: 2})), + ...sizes.map((size) => ({name, variant, size, density: 3})), ); return acc; },