Skip to content

Commit 9472f7b

Browse files
authored
fix(Icons): sync icon catalog with refreshed Line SVGs (#3080)
### 🎯 Goal Sync the SDK icon exports with the refreshed Phosphor Line icon catalog and align icon naming with the new conventions. ### πŸ›  Implementation details - **Updated `IconArrowDown`**: replaced old 16Γ—16 filled path with the 20Γ—20 Line stroke variant (removed `viewBox` override) - **Updated `IconThread`**: replaced bubble-speech shape with the new rectangular thread icon from the refreshed catalog - **Renamed `IconLayoutAlignLeft` β†’ `IconSidebar`**: matches `sidebar.svg` in the Line set; updated all usages across `ChannelHeader`, `ChannelListHeader`, `ThreadHeader`, `ThreadListHeader` - **Renamed `IconThunder` β†’ `IconBolt`**: matches `bolt.svg` in the Line set; updated usages in `CommandChip` and example app - Old names preserved as `// was:` comments for debugging
1 parent a47981f commit 9472f7b

File tree

7 files changed

+29
-24
lines changed

7 files changed

+29
-24
lines changed

β€Žexamples/vite/src/AppSettings/ActionsMenu/ActionsMenu.tsxβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
ContextMenu,
66
ContextMenuButton,
77
DialogManagerProvider,
8-
IconThunder,
8+
IconBolt,
99
useContextMenuContext,
1010
useDialogIsOpen,
1111
useDialogOnNearestManager,
@@ -40,7 +40,7 @@ const ActionsMenuButton = ({
4040
ref={refCallback}
4141
variant='secondary'
4242
>
43-
<IconThunder />
43+
<IconBolt />
4444
{!iconOnly && (
4545
<div className='str-chat__chat-view__selector-button-text'>Actions</div>
4646
)}

β€Žsrc/components/ChannelHeader/ChannelHeader.tsxβ€Ž

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22

3-
import { IconLayoutAlignLeft } from '../Icons/icons';
3+
import { IconSidebar } from '../Icons/icons';
44
import { type ChannelAvatarProps, ChannelAvatar as DefaultAvatar } from '../Avatar';
55
import { TypingIndicatorHeader } from '../TypingIndicator/TypingIndicatorHeader';
66
import { useChannelHeaderOnlineStatus } from './hooks/useChannelHeaderOnlineStatus';
@@ -40,7 +40,7 @@ export type ChannelHeaderProps = {
4040
Avatar?: React.ComponentType<ChannelAvatarProps>;
4141
/** Manually set the image to render, defaults to the Channel image */
4242
image?: string;
43-
/** UI component to display menu icon, defaults to IconLayoutAlignLeft*/
43+
/** UI component to display menu icon, defaults to IconSidebar*/
4444
MenuIcon?: React.ComponentType;
4545
/** Set title manually */
4646
title?: string;
@@ -53,7 +53,7 @@ export const ChannelHeader = (props: ChannelHeaderProps) => {
5353
const {
5454
Avatar = DefaultAvatar,
5555
image: overrideImage,
56-
MenuIcon = IconLayoutAlignLeft,
56+
MenuIcon = IconSidebar,
5757
title: overrideTitle,
5858
} = props;
5959

β€Žsrc/components/ChannelList/ChannelListHeader.tsxβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
import React, { type ComponentType } from 'react';
22
import clsx from 'clsx';
33
import { useChatContext, useTranslationContext } from '../../context';
4-
import { IconLayoutAlignLeft } from '../Icons';
4+
import { IconSidebar } from '../Icons';
55
import { ToggleSidebarButton } from '../Button/ToggleSidebarButton';
66

77
export type ChannelListHeaderProps = {
88
ToggleButtonIcon?: ComponentType;
99
};
1010

1111
export const ChannelListHeader = ({
12-
ToggleButtonIcon = IconLayoutAlignLeft,
12+
ToggleButtonIcon = IconSidebar,
1313
}: ChannelListHeaderProps) => {
1414
const { t } = useTranslationContext();
1515
const { channel, navOpen } = useChatContext();

β€Žsrc/components/Icons/icons.tsxβ€Ž

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,16 @@ export const IconLeave = createIcon(
1515
/>,
1616
);
1717

18-
// no new icon mapping
1918
export const IconArrowDown = createIcon(
2019
'IconArrowDown',
21-
<path d='M7.39973 2.5C7.39973 2.16863 7.66895 1.90039 8.00032 1.90039C8.33154 1.90057 8.59993 2.16874 8.59993 2.5V12.0518L11.7425 8.90918C11.9768 8.67487 12.3568 8.67487 12.5911 8.90918C12.8253 9.14351 12.8254 9.52355 12.5911 9.75781L8.42415 13.9238C8.3117 14.0363 8.15933 14.0995 8.00032 14.0996C7.84119 14.0996 7.68804 14.0363 7.57552 13.9238L3.4095 9.75781C3.17519 9.5235 3.17519 9.14349 3.4095 8.90918C3.64377 8.67508 4.02288 8.67508 4.25716 8.90918L7.39973 12.0518V2.5Z' />,
22-
{ viewBox: '0 0 16 16' },
20+
<path
21+
d='M10 3.125V16.875M10 16.875L4.375 11.25M10 16.875L15.625 11.25'
22+
fill='none'
23+
stroke='currentColor'
24+
strokeLinecap='round'
25+
strokeLinejoin='round'
26+
strokeWidth='1.5'
27+
/>,
2328
);
2429

2530
export const IconArrowDownCircle = createIcon(
@@ -197,7 +202,7 @@ export const IconMessageBubbleFill = createIcon(
197202
export const IconThread = createIcon(
198203
'IconThread',
199204
<path
200-
d='M7.49978 8.75022H12.4998M7.49978 11.2502H12.4998M6.24431 16.4932C7.81972 17.405 9.67297 17.7127 11.4585 17.359C13.2441 17.0053 14.84 16.0143 15.9489 14.5708C17.0578 13.1273 17.6038 11.3298 17.4852 9.51341C17.3667 7.69704 16.5916 5.98577 15.3045 4.69866C14.0174 3.41156 12.3061 2.63646 10.4897 2.51789C8.67333 2.39932 6.87582 2.94537 5.43231 4.05422C3.9888 5.16308 2.99781 6.75906 2.64412 8.54461C2.29042 10.3302 2.59815 12.1834 3.50993 13.7588L2.53259 16.6768C2.49586 16.7869 2.49053 16.9051 2.5172 17.0181C2.54386 17.131 2.60146 17.2344 2.68355 17.3165C2.76563 17.3985 2.86895 17.4561 2.98194 17.4828C3.09492 17.5095 3.21309 17.5041 3.32321 17.4674L6.24431 16.4932Z'
205+
d='M7.5 8.75H12.8125M7.5 11.25H12.8125M10.3125 16.875H3.75C3.58424 16.875 3.42527 16.8092 3.30806 16.6919C3.19085 16.5747 3.125 16.4158 3.125 16.25V9.6875C3.125 7.78126 3.88225 5.95309 5.23017 4.60517C6.57809 3.25725 8.40626 2.5 10.3125 2.5C11.2564 2.5 12.191 2.68591 13.063 3.04712C13.9351 3.40832 14.7274 3.93775 15.3948 4.60517C16.0623 5.27259 16.5917 6.06493 16.9529 6.93696C17.3141 7.80899 17.5 8.74362 17.5 9.6875C17.5 10.6314 17.3141 11.566 16.9529 12.438C16.5917 13.3101 16.0623 14.1024 15.3948 14.7698C14.7274 15.4373 13.9351 15.9667 13.063 16.3279C12.191 16.6891 11.2564 16.875 10.3125 16.875Z'
201206
fill='none'
202207
stroke='currentColor'
203208
strokeLinecap='round'
@@ -568,9 +573,9 @@ export const IconImage = createIcon(
568573
/>,
569574
);
570575

571-
// no new icon mapping
572-
export const IconLayoutAlignLeft = createIcon(
573-
'IconLayoutAlignLeft',
576+
// was: IconLayoutAlignLeft
577+
export const IconSidebar = createIcon(
578+
'IconSidebar',
574579
<path
575580
d='M6.875 3.75V16.25M3.125 3.75H16.875C17.2202 3.75 17.5 4.02982 17.5 4.375V15.625C17.5 15.9702 17.2202 16.25 16.875 16.25H3.125C2.77982 16.25 2.5 15.9702 2.5 15.625V4.375C2.5 4.02982 2.77982 3.75 3.125 3.75Z'
576581
fill='none'
@@ -822,9 +827,9 @@ export const IconCopy = createIcon(
822827
/>,
823828
);
824829

825-
// no new icon mapping
826-
export const IconThunder = createIcon(
827-
'IconThunder',
830+
// was: IconThunder
831+
export const IconBolt = createIcon(
832+
'IconBolt',
828833
<path d='M16.7071 9.80157L7.95711 19.1766C7.86438 19.2755 7.74198 19.3416 7.60839 19.3649C7.47479 19.3882 7.33724 19.3674 7.2165 19.3057C7.09576 19.244 6.99837 19.1446 6.93904 19.0227C6.8797 18.9007 6.86164 18.7628 6.88757 18.6297L8.03289 12.9008L3.53054 11.2102C3.43385 11.174 3.34762 11.1144 3.27956 11.0368C3.2115 10.9592 3.16373 10.8659 3.14052 10.7653C3.1173 10.6647 3.11937 10.5599 3.14653 10.4603C3.17369 10.3607 3.2251 10.2694 3.29617 10.1945L12.0462 0.819538C12.1389 0.720581 12.2613 0.654468 12.3949 0.631176C12.5285 0.607884 12.666 0.628675 12.7868 0.690414C12.9075 0.752152 13.0049 0.851488 13.0642 0.97343C13.1236 1.09537 13.1416 1.2333 13.1157 1.36641L11.9673 7.10157L16.4696 8.78985C16.5656 8.82626 16.6511 8.88576 16.7187 8.96307C16.7862 9.04039 16.8336 9.13315 16.8568 9.23316C16.88 9.33317 16.8781 9.43734 16.8515 9.53648C16.8248 9.63562 16.7742 9.72666 16.704 9.80157H16.7071Z' />,
829834
);
830835

β€Žsrc/components/MessageComposer/CommandChip.tsxβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { useMessageComposerController } from './hooks';
22
import type { TextComposerState } from 'stream-chat';
3-
import { IconThunder, IconXmark } from '../Icons';
3+
import { IconBolt, IconXmark } from '../Icons';
44
import { useMessageComposerContext } from '../../context';
55

66
export type CommandChipProps = {
@@ -14,7 +14,7 @@ export const CommandChip = ({ command }: CommandChipProps) => {
1414

1515
return (
1616
<div className='str-chat__command-chip'>
17-
<IconThunder />
17+
<IconBolt />
1818
<span>{command.name}</span>
1919
<button
2020
className={'str-chat__command-chip__close-button'}

β€Žsrc/components/Thread/ThreadHeader.tsxβ€Ž

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { useTypingContext } from '../../context/TypingContext';
1212
import type { LocalMessage } from 'stream-chat';
1313
import type { ThreadState } from 'stream-chat';
1414
import { Button } from '../Button';
15-
import { IconLayoutAlignLeft, IconXmark } from '../Icons';
15+
import { IconSidebar, IconXmark } from '../Icons';
1616
import { ToggleSidebarButton } from '../Button/ToggleSidebarButton';
1717
import { useChatViewContext } from '../ChatView';
1818

@@ -67,14 +67,14 @@ export type ThreadHeaderProps = {
6767
closeThread: (event?: React.BaseSyntheticEvent) => void;
6868
/** The thread parent message */
6969
thread: LocalMessage;
70-
/** UI component to display menu icon, defaults to IconLayoutAlignLeft*/
70+
/** UI component to display menu icon, defaults to IconSidebar*/
7171
MenuIcon?: React.ComponentType;
7272
/** Override the thread display title */
7373
overrideTitle?: string;
7474
};
7575

7676
export const ThreadHeader = (props: ThreadHeaderProps) => {
77-
const { closeThread, MenuIcon = IconLayoutAlignLeft, overrideTitle, thread } = props;
77+
const { closeThread, MenuIcon = IconSidebar, overrideTitle, thread } = props;
7878

7979
const { t } = useTranslationContext();
8080
const { channel } = useChannelStateContext();

β€Žsrc/components/Threads/ThreadList/ThreadListHeader.tsxβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React, { type ComponentType } from 'react';
22
import clsx from 'clsx';
33
import { useChatContext, useTranslationContext } from '../../../context';
4-
import { IconLayoutAlignLeft } from '../../Icons';
4+
import { IconSidebar } from '../../Icons';
55
import { useThreadsViewContext } from '../../ChatView';
66
import { ToggleSidebarButton } from '../../Button/ToggleSidebarButton';
77

@@ -10,7 +10,7 @@ export type ChannelListHeaderProps = {
1010
};
1111

1212
export const ThreadListHeader = ({
13-
ToggleButtonIcon = IconLayoutAlignLeft,
13+
ToggleButtonIcon = IconSidebar,
1414
}: ChannelListHeaderProps) => {
1515
const { t } = useTranslationContext();
1616
const { navOpen } = useChatContext();

0 commit comments

Comments
Β (0)