feat(wrapper): add missing SVGIcons from Spotify's current UI#3773
feat(wrapper): add missing SVGIcons from Spotify's current UI#3773tmchow wants to merge 3 commits intospicetify:mainfrom
Conversation
Adds 22 new icons to Spicetify.SVGIcons extracted from Spotify's current DOM (v1.2.86): context menu icons (addToPlaylist, addToQueue, share, goToArtist, goToAlbum, credits, radio, excludeTaste, openDesktop), navigation icons (whatsNew, friendActivity, create, collapseLibrary, expandLibrary), playback controls (skipBack, skipForward, smartShuffle, volumeHigh, nowPlaying), and UI elements (connectDevice, miniplayer, enterFullScreen, heartAdd). Closes spicetify#2648
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughExtended Spicetify's SVG icon set and corresponding TypeScript declarations by adding 23 new icon identifiers mapped to SVG markup; no behavioral, control-flow, or removal changes. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
jsHelper/spicetifyWrapper.js (1)
1934-1943: Optional: deduplicate identical SVG payload foraddToPlaylistandcreateLine 1935 and Line 1943 contain the same SVG path. Consider extracting a shared constant to avoid duplicate literal maintenance.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@jsHelper/spicetifyWrapper.js` around lines 1934 - 1943, The SVG path literal for addToPlaylist and create is duplicated; define a single constant (e.g., ICON_ADD_TO_PLAYLIST_PATH or ICON_ADD_CREATE) near the other icon definitions and replace the two duplicated string literals in the object entries addToPlaylist and create with a reference to that constant so both keys reuse the same value and avoid maintenance duplication.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@jsHelper/spicetifyWrapper.js`:
- Around line 1934-1979: The file jsHelper/spicetifyWrapper.js failed Biome
formatting (CI blocked); run the Biome/formatter on this file (e.g., biome fmt
or your project's configured formatter) to reformat the code including the large
icon object entries like addToPlaylist, addToQueue, collapseLibrary,
connectDevice, etc., then stage and commit the updated
jsHelper/spicetifyWrapper.js so CI can proceed.
- Around line 1934-1979: The TypeScript typing for Spicetify.SVGIcons is too
narrow (currently Record<Icon, string>) and the Icon union/type in globals.d.ts
is missing the newly exported keys (e.g., addToPlaylist, addToQueue,
collapseLibrary, connectDevice, create, credits, enterFullScreen, excludeTaste,
expandLibrary, friendActivity, goToAlbum, goToArtist, heartAdd, miniplayer,
nowPlaying, openDesktop, radio, share, skipBack, skipForward, smartShuffle,
volumeHigh, whatsNew), causing type errors; fix by updating globals.d.ts: either
add these new icon names to the Icon union/type or change Spicetify.SVGIcons
from Record<Icon, string> to a broader type (e.g., Record<string, string> or an
interface with an index signature) so TypeScript consumers can reference the new
keys without errors.
---
Nitpick comments:
In `@jsHelper/spicetifyWrapper.js`:
- Around line 1934-1943: The SVG path literal for addToPlaylist and create is
duplicated; define a single constant (e.g., ICON_ADD_TO_PLAYLIST_PATH or
ICON_ADD_CREATE) near the other icon definitions and replace the two duplicated
string literals in the object entries addToPlaylist and create with a reference
to that constant so both keys reuse the same value and avoid maintenance
duplication.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 81363594-50ab-43e5-bfed-ca95c29124e9
📒 Files selected for processing (1)
jsHelper/spicetifyWrapper.js
Add explicit radix parameter to Number.parseInt() call (line 426) and remove unused refreshCount destructured variable (line 2366). Both issues were pre-existing and flagged during PR spicetify#3773 review by coderabbitai. Neither was introduced by that PR. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
Adds 22 new icons to
Spicetify.SVGIconsextracted from Spotify's current DOM (v1.2.86). This was a PITA but here we are!Icons added
Context menu:
addToPlaylist,addToQueue,share,goToArtist,goToAlbum,credits,radio,excludeTaste,openDesktopNavigation:
whatsNew,friendActivity,create,collapseLibrary,expandLibraryPlayback:
skipBack,skipForward,smartShuffle,volumeHigh,nowPlayingUI:
connectDevice,miniplayer,enterFullScreen,heartAddHow icons were extracted
SVG path data was extracted directly from Spotify Web Player's live DOM by inspecting rendered
<svg>elements across the homepage, playlist view, and track context menu. Only 16x16 viewBox icons were included (matching the existingSVGIconsformat).Notes
Closes #2648
Summary by CodeRabbit