Commit 30c1bee
authored
feat(Icons): migrate SDK icons to Phosphor icon set (#3075)
### 🎯 Goal
Migrate all SDK icons to the new Phosphor-based icon set from the design
system, replacing legacy SVGs with consistent, standardized assets. Use
Line (stroke-based) variants for controllable stroke weight. Remove
unused icon exports to reduce bundle size.
Resolves
[REACT-936](https://linear.app/stream/issue/REACT-936/complete-sdk-icon-migration-to-phosphor-icons)
### 🛠 Implementation details
**Icon SVG replacements (77 Line + 11 other):**
- Switched to **Line variants** (stroke-based, 20×20 viewBox) for 77
icons, giving a consistent `strokeWidth="1.5"` that can be adjusted via
attribute rather than being baked into path geometry
- `BaseIcon` default viewBox updated from `0 0 16 16` → `0 0 20 20` to
match Line icons
- 8 legacy icons without Line matches get `{ viewBox: '0 0 16 16' }`
override
- Stroke-based paths get `fill='none'` to prevent CSS `fill:
currentColor` from filling outlines
- Fill variants (`play-fill`, `message-bubble-fill`, etc.) strip
`fill="black"` to inherit `currentColor`
- `IconGiphy` updated separately in its own file (brand colors
preserved, hardcoded `viewBox='0 0 16 16'`)
**Icon constant renames (55 total):**
Key renames: `IconTrashBin→IconDelete`, `IconPaperPlane→IconSend`,
`IconCrossMedium→IconXmark`, `IconMicrophone→IconVoice`,
`IconBookmark→IconSave`, `IconBubbles→IconMessageBubbles`,
`IconBubble2ChatMessage→IconMessageBubble`,
`IconBubbleText6ChatMessage→IconThread`,
`IconLoadingCircle→IconLoading`, `IconPlaySolid→IconPlayFill`,
`IconPause→IconPauseFill`
Old names preserved as `// was:` comments for traceability. Icons with
name collisions (e.g. multiple checkmark variants mapping to
`checkmark`) keep their original const name but receive the updated SVG.
**CSS class name updates:**
Renamed constants change the auto-derived CSS classes (via
`toIconClass`). Updated all SCSS selectors accordingly (e.g.
`.str-chat__icon--microphone` → `.str-chat__icon--voice`).
**Unchanged icons (7):**
Icons used in code but not in the mapping are annotated with `// no new
icon mapping`: `IconArrowDown`, `IconArrowRight`,
`IconExclamationTriangle`, `IconEyeOpen`,
`IconBubbleText6SolidChatMessage`. Plus `IconLayoutAlignLeft` and
`IconThunder` which had Line matches and were switched.
**Removed unused icons (71):**
The following icon exports were removed as they had zero references
anywhere in the SDK or examples:
`IconApiAggregate`, `IconApples`, `IconArrowsRepeatLeftRight`,
`IconAtSolid`, `IconAccount` (was `IconPeopleCircle`),
`IconBrowserAISparkle`, `IconBubble3Solid`,
`IconBubbleAnnotation2ChatMessage`, `IconBubbleWideSparkleChatMessage`,
`IconCalendar1`, `IconCallCancel`, `IconCar1`, `IconCat`,
`IconCheckmark2Small`, `IconChevronGrabberVerticalSelector`,
`IconChevronTop`, `IconCircleCheck`, `IconCircleQuestionmark`,
`IconCircleQuestionmarkFilled`, `IconClockSolid`, `IconCode`,
`IconCodeBrackets`, `IconCodeEditorInsert`, `IconCompass`,
`IconCreditCard2Billing`, `IconDotsGrid1x3Vertical`, `IconEditBigSolid`,
`IconEmojiAdd` (was `IconEmojiAddReaction`), `IconEmojiSad`,
`IconExclamationTriangleFill` (was `IconExclamationTriangle1`),
`IconExport` (was `IconShareRedirectLink`),
`IconFilledCircleInfoTooltip`, `IconFilter1`, `IconGauge`, `IconGoogle`,
`IconHashtagChannel`, `IconHeart2`, `IconHistory`, `IconInvite`,
`IconLayoutGrid1`, `IconLimits`, `IconLineChart3`, `IconLock`,
`IconMention` (was `IconAt`), `IconNewspaper2`, `IconOrganization`,
`IconPaperPlaneTopRight`, `IconParagraphsText`, `IconPencil`,
`IconPeople2`, `IconPeopleCopy`, `IconPeopleEditUserRights`,
`IconPersona`, `IconPresentation` (was `IconLayersBehind`),
`IconSearchText`, `IconSettingsSliderVer`,
`IconShapesPlusCloseSquareCircle`, `IconShapesTriangleSquareCircle`,
`IconShield`, `IconSpreadsheet` (was `IconTable`),
`IconSquareCircleTopRightFeeds`, `IconStopFill` (was `IconStop`),
`IconTeam`, `IconTennis`, `IconTextToImageURLEnrichment`,
`IconTrending4`, `IconUnlock` (was `IconUnlocked`), `IconUsers`,
`IconVoiceAndVideo`, `IconVoiceHigh`, `IconWebhook`
This reduces `icons.tsx` from 130 to 59 exports.
### 🎨 UI Changes
All icon visuals change from the legacy set to Phosphor Line icons with
1.5px stroke weight. `BaseIcon` default viewBox is now `0 0 20 20`. No
layout or sizing changes — icons still use `1em` sizing via CSS and
`currentColor` for theming.1 parent becee7b commit 30c1bee
File tree
76 files changed
+1334
-1231
lines changed- examples/vite/src/AppSettings
- ActionsMenu
- src
- components
- Attachment
- LinkPreview
- __tests__/__snapshots__
- Avatar
- Badge
- BaseImage
- Button
- ChannelListItem
- ChatView
- Dialog/components
- EmptyStateIndicator
- Form
- Gallery
- __tests__/__snapshots__
- Icons
- styling
- Loading
- __tests__/__snapshots__
- MediaRecorder/AudioRecorder
- __tests__
- __snapshots__
- styling
- MessageActions
- MessageBounce
- styling
- MessageComposer
- AttachmentPreviewList
- AttachmentSelector
- __tests__/__snapshots__
- styling
- MessageList
- __tests__/__snapshots__
- Message
- __tests__/__snapshots__
- Modal
- Notifications
- Poll/PollCreationDialog
- Reactions
- Search/SearchBar
- SummarizedMessagePreview
- Threads/ThreadList
- Thread
- VideoPlayer
- plugins/Emojis
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
76 files changed
+1334
-1231
lines changedLines changed: 10 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | | - | |
14 | | - | |
| 13 | + | |
| 14 | + | |
15 | 15 | | |
16 | | - | |
17 | | - | |
| 16 | + | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
151 | | - | |
| 151 | + | |
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
| 6 | + | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
| 108 | + | |
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
| 77 | + | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
219 | | - | |
| 219 | + | |
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
| |||
0 commit comments