From 89f7bd2e2f99d1c41cabe27cb8692d597aef9dea Mon Sep 17 00:00:00 2001 From: Maurice Date: Fri, 6 Nov 2026 19:13:59 +0100 Subject: [PATCH] feat(native): category emoji of older installs as widget symbols --- client/src/native/widgetExtras.test.ts | 1 + client/src/native/widgetExtras.ts | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/client/src/native/widgetExtras.test.ts b/client/src/native/widgetExtras.test.ts index 30bc1bcb4..4fb185194 100644 --- a/client/src/native/widgetExtras.test.ts +++ b/client/src/native/widgetExtras.test.ts @@ -150,6 +150,7 @@ describe('stopLook and temperature', () => { it('maps a category to a colour and an SF Symbol, ignoring what it cannot use', () => { expect(stopLook({ color: '#E8A13A', icon: 'Coffee' })).toEqual({ color: '#E8A13A', symbol: 'cup.and.saucer.fill' }); expect(stopLook({ color: 'red', icon: 'Unknown' })).toEqual({ color: null, symbol: null }); + expect(stopLook({ color: '#84cc16', icon: '🌿' })).toEqual({ color: '#84cc16', symbol: 'leaf.fill' }); expect(stopLook(null)).toEqual({ color: null, symbol: null }); }); diff --git a/client/src/native/widgetExtras.ts b/client/src/native/widgetExtras.ts index 710c60c0b..6eb0c2cb6 100644 --- a/client/src/native/widgetExtras.ts +++ b/client/src/native/widgetExtras.ts @@ -81,6 +81,17 @@ const SYMBOLS: Record = { Luggage: 'suitcase.rolling.fill', Backpack: 'backpack.fill', Zap: 'bolt.fill', + // The emoji icons of the categories older installs were seeded with. + '🏨': 'bed.double.fill', + '🍽️': 'fork.knife', + '🏛️': 'building.columns.fill', + '🛍️': 'bag.fill', + '🚌': 'bus.fill', + '🎯': 'figure.walk', + '☕': 'cup.and.saucer.fill', + '🏖️': 'beach.umbrella.fill', + '🌿': 'leaf.fill', + '📍': 'mappin', }; const HEX = /^#[0-9a-f]{6}$/i;