Skip to content

Commit c31ce71

Browse files
michaelassrafclaude
andcommitted
feat(icons): CU-17tkuw61k8d resolve tiktok to its own mark in the icon lookup
social_platforms.icon_name and the hub's dashboards ask getDynamicIcon / getIconComponent for 'tiktok'; the registry had no key, so it drew the fallback glyph. TiktokIcon draws in the text colour (TikTok's brand black would vanish on dark surfaces). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent f61489c commit c31ce71

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

‎openframe-frontend-core/src/components/chat/utils/__tests__/icon-resolver.test.ts‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,13 @@ const BRAND_NAMES = [
2727
'youtube',
2828
'twitter',
2929
'instagram',
30+
'tiktok',
3031
'rocket',
3132
// PascalCase social_platforms.icon_name values:
3233
'LinkedInIcon',
3334
'XLogo',
3435
'YouTubeIcon',
36+
'TiktokIcon',
3537
'Github',
3638
// unknown + nullish:
3739
'definitely-not-an-icon',
@@ -49,6 +51,11 @@ describe('unified resolveIcon — brand variant preserves getIconComponent exact
4951
expect(resolveIcon('discord', { variant: 'brand' })).not.toBe(getIconComponent('discord'));
5052
});
5153

54+
it('tiktok resolves to its own mark, not the file fallback', () => {
55+
expect(getIconComponent('TiktokIcon')).toBe(getIconComponent('tiktok'));
56+
expect(getIconComponent('tiktok')).not.toBe(getIconComponent('definitely-not-an-icon'));
57+
});
58+
5259
it('null/undefined brand → same fallback as getIconComponent, no throw', () => {
5360
expect(resolveIcon(null, { variant: 'brand' })).toBe(getIconComponent(null));
5461
expect(resolveIcon(undefined, { variant: 'brand' })).toBe(getIconComponent(undefined));

‎openframe-frontend-core/src/components/chat/utils/icon-registry.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ export const ICON_REGISTRY: Readonly<Record<string, IconRef>> = {
8989
clickup: fromSet('ClickupIcon'),
9090
hubspot: fromSet('HubspotIcon'),
9191
linkedin: fromSet('LinkedinClassicIcon'),
92+
// Monochrome mark in the text colour: TikTok's brand black would vanish on dark surfaces.
93+
tiktok: fromSet('TiktokIcon'),
9294
x: fromSet('XLogoIcon'),
9395
// The OpenFrame logo's frame takes the text colour of where it sits (its own
9496
// default is invisible on dark chat surfaces); the squares stay white.
@@ -170,6 +172,8 @@ const PASCAL_TO_KEBAB_ALIASES: Record<string, string> = {
170172
YouTubeIcon: 'youtube',
171173
WhatsAppIcon: 'whatsapp',
172174
XLogo: 'x',
175+
TiktokIcon: 'tiktok',
176+
TikTokIcon: 'tiktok',
173177
OpenFrameLogo: 'openframe',
174178
};
175179

0 commit comments

Comments
 (0)