Skip to content

feat(Icons): migrate SDK icons to Phosphor icon set#3075

Merged
oliverlaz merged 5 commits intomasterfrom
feat/phosphor-icon-migration
Mar 30, 2026
Merged

feat(Icons): migrate SDK icons to Phosphor icon set#3075
oliverlaz merged 5 commits intomasterfrom
feat/phosphor-icon-migration

Conversation

@oliverlaz
Copy link
Copy Markdown
Member

@oliverlaz oliverlaz commented Mar 29, 2026

🎯 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

πŸ›  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.

Replace 88 icon SVGs with new Phosphor-based assets from the design
system export. Rename 55 icon constants to match the new naming
convention (e.g. IconTrashBin β†’ IconDelete, IconPaperPlane β†’ IconSend).
Old names preserved as `// was:` comments for traceability.

Update all imports, SCSS class references, test snapshots, and the
vite example app to match the new names.

Resolves REACT-936
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 29, 2026

Size Change: -89.7 kB (-12.62%) πŸ‘

Total Size: 621 kB

πŸ“¦ View Changed
Filename Size Change
dist/cjs/emojis.js 2.96 kB -3 B (-0.1%)
dist/cjs/index.js 237 kB -1.28 kB (-0.54%)
dist/cjs/WithAudioPlayback.js 45.5 kB -43.5 kB (-48.86%) πŸŽ‰
dist/css/index.css 47.3 kB -15 B (-0.03%)
dist/es/emojis.mjs 2.47 kB -2 B (-0.08%)
dist/es/index.mjs 235 kB -1.49 kB (-0.63%)
dist/es/WithAudioPlayback.mjs 45.3 kB -43.4 kB (-48.91%) πŸŽ‰
ℹ️ View Unchanged
Filename Size
dist/cjs/audioProcessing.js 1.32 kB
dist/cjs/mp3-encoder.js 1.27 kB
dist/css/emoji-replacement.css 456 B
dist/es/audioProcessing.mjs 1.31 kB
dist/es/mp3-encoder.mjs 756 B

compressed-size-action

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 29, 2026

Codecov Report

❌ Patch coverage is 78.26087% with 5 lines in your changes missing coverage. Please review.
βœ… Project coverage is 79.12%. Comparing base (becee7b) to head (95c0835).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
...omponents/MessageComposer/QuotedMessagePreview.tsx 50.00% 2 Missing ⚠️
src/components/Form/TextInput.tsx 50.00% 1 Missing ⚠️
src/components/Modal/CloseButtonOnModalOverlay.tsx 0.00% 1 Missing ⚠️
src/plugins/Emojis/EmojiPicker.tsx 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3075      +/-   ##
==========================================
- Coverage   79.24%   79.12%   -0.13%     
==========================================
  Files         426      426              
  Lines       12234    12162      -72     
  Branches     3918     3917       -1     
==========================================
- Hits         9695     9623      -72     
  Misses       2539     2539              

β˜” View full report in Codecov by Sentry.
πŸ“’ Have feedback on the report? Share it here.

πŸš€ New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • πŸ“¦ JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Replace Line/Flat-20 fallbacks with proper 16Γ—16 flat SVGs now that
they are available in the design export. Removes viewBox overrides.
Remove icon constants that are not used anywhere in the SDK or examples.
Reduces icons.tsx from 130 to 59 exports.
Replace Flat/16 (filled path) icons with Line (stroke-based, 20Γ—20)
variants. This gives icons a consistent 1.5px stroke weight that can
be adjusted via the strokeWidth attribute rather than being baked into
path geometry.

- Update BaseIcon default viewBox from 0 0 16 16 β†’ 0 0 20 20
- Add fill='none' on stroke-based paths to prevent CSS fill override
- Add { viewBox: '0 0 16 16' } override on 8 legacy icons that still
  use 16Γ—16 coordinate paths
@oliverlaz oliverlaz merged commit 30c1bee into master Mar 30, 2026
8 checks passed
@oliverlaz oliverlaz deleted the feat/phosphor-icon-migration branch March 30, 2026 11:19
github-actions bot pushed a commit that referenced this pull request Mar 30, 2026
## [14.0.0-beta.4](v14.0.0-beta.3...v14.0.0-beta.4) (2026-03-30)

### ⚠ BREAKING CHANGES

* Importing styles from `stream-chat-react/dist/css/v2/*`
would no longer work, import from `stream-chat-react/dist/css/*`
instead.

### Bug Fixes

* clean up CSS build output ([#3072](#3072)) ([f06846d](f06846d))

### Features

* **Icons:** migrate SDK icons to Phosphor icon set ([#3075](#3075)) ([30c1bee](30c1bee))
@stream-ci-bot
Copy link
Copy Markdown

πŸŽ‰ This PR is included in version 14.0.0-beta.4 πŸŽ‰

The release is available on:

Your semantic-release bot πŸ“¦πŸš€

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants