-
-
Notifications
You must be signed in to change notification settings - Fork 252
feat(snippets): add a minimal 4-bar visualizer #1075
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Add a minimalist, 4-bar visualizer for playback bar
WalkthroughReplaced a snippet entry in Changes
Sequence Diagram(s)Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used🧠 Learnings (2)📓 Common learnings📚 Learning: 2025-12-06T15:28:17.086ZApplied to files:
🔇 Additional comments (1)
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
resources/assets/snippets/Minimal_visualizer.gifis excluded by!**/*.gif
📒 Files selected for processing (1)
resources/snippets.json
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: rxri
Repo: spicetify/marketplace PR: 1064
File: resources/snippets.json:539-539
Timestamp: 2025-12-06T15:28:17.086Z
Learning: In resources/snippets.json, CSS code must be minified and placed in the "code" variable as a single-line string. This is a project requirement, not a code quality issue.
📚 Learning: 2025-12-06T15:28:17.086Z
Learnt from: rxri
Repo: spicetify/marketplace PR: 1064
File: resources/snippets.json:539-539
Timestamp: 2025-12-06T15:28:17.086Z
Learning: In resources/snippets.json, CSS code must be minified and placed in the "code" variable as a single-line string. This is a project requirement, not a code quality issue.
Applied to files:
resources/snippets.json
| { | ||
| "title": "Minimal 4-Bar Visualizer", | ||
| "description": "A minimalist, CSS-only 4-bar visualizer for the playback bar.", | ||
| "code": ":root { --viz-color: var(--spice-button-active); --viz-speed: 0.8s; --viz-width: 18px; --viz-height: 20px; --viz-bar-w: 3px; --viz-off-y: -4px; } .main-nowPlayingBar-extraControls::before { content: ""; display: flex; width: var(--viz-width); height: var(--viz-height); margin-right: 15px; transform: translateY(var(--viz-off-y)); background-image: linear-gradient(var(--viz-color), var(--viz-color)), linear-gradient(var(--viz-color), var(--viz-color)), linear-gradient(var(--viz-color), var(--viz-color)), linear-gradient(var(--viz-color), var(--viz-color)); background-position: 0% 100%, 33% 100%, 66% 100%, 100% 100%; background-repeat: no-repeat; background-size: var(--viz-bar-w) 40%, var(--viz-bar-w) 80%, var(--viz-bar-w) 30%, var(--viz-bar-w) 60%; animation: organicBounce var(--viz-speed) infinite linear; transition: background-size 0.3s ease; } @keyframes organicBounce { 0% { background-size: var(--viz-bar-w) 70%, var(--viz-bar-w) 100%, var(--viz-bar-w) 10%, var(--viz-bar-w) 40%; } 9% { background-size: var(--viz-bar-w) 85%, var(--viz-bar-w) 85%, var(--viz-bar-w) 25%, var(--viz-bar-w) 55%; } 18% { background-size: var(--viz-bar-w) 100%, var(--viz-bar-w) 70%, var(--viz-bar-w) 40%, var(--viz-bar-w) 70%; } 27% { background-size: var(--viz-bar-w) 85%, var(--viz-bar-w) 55%, var(--viz-bar-w) 55%, var(--viz-bar-w) 85%; } 36% { background-size: var(--viz-bar-w) 70%, var(--viz-bar-w) 40%, var(--viz-bar-w) 70%, var(--viz-bar-w) 100%; } 45% { background-size: var(--viz-bar-w) 55%, var(--viz-bar-w) 25%, var(--viz-bar-w) 85%, var(--viz-bar-w) 85%; } 54% { background-size: var(--viz-bar-w) 40%, var(--viz-bar-w) 10%, var(--viz-bar-w) 100%, var(--viz-bar-w) 70%; } 63% { background-size: var(--viz-bar-w) 25%, var(--viz-bar-w) 25%, var(--viz-bar-w) 85%, var(--viz-bar-w) 55%; } 72% { background-size: var(--viz-bar-w) 10%, var(--viz-bar-w) 40%, var(--viz-bar-w) 70%, var(--viz-bar-w) 40%; } 81% { background-size: var(--viz-bar-w) 25%, var(--viz-bar-w) 55%, var(--viz-bar-w) 55%, var(--viz-bar-w) 25%; } 90% { background-size: var(--viz-bar-w) 40%, var(--viz-bar-w) 70%, var(--viz-bar-w) 40%, var(--viz-bar-w) 10%; } 100% { background-size: var(--viz-bar-w) 55%, var(--viz-bar-w) 85%, var(--viz-bar-w) 25%, var(--viz-bar-w) 25%; } } .main-nowPlayingBar-container:has( button[data-testid="control-button-playpause"] path[d^="M3"], button[data-testid="control-button-playpause"] path[d^="M11"], button[aria-label*="Play"] ) .main-nowPlayingBar-extraControls::before { background-size: var(--viz-bar-w) 2px, var(--viz-bar-w) 2px, var(--viz-bar-w) 2px, var(--viz-bar-w) 2px !important; animation: none !important; opacity: 0.8; }", | ||
| "preview": "preview.gif" | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix the preview asset path to follow project conventions.
The preview path is inconsistent with all other snippets in this file. Every other snippet uses the format resources/assets/snippets/[descriptive-name].[ext], but this one uses just preview.gif. This will likely result in a broken preview image in the Marketplace UI.
🔎 Suggested fix
- "preview": "preview.gif"
+ "preview": "resources/assets/snippets/minimal-4-bar-visualizer.gif"Make sure the actual preview asset file is placed at the correct path in the repository.
Note: The CSS code is correctly minified as a single-line string per project requirements. Based on learnings, this is the expected format for the "code" field.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| { | |
| "title": "Minimal 4-Bar Visualizer", | |
| "description": "A minimalist, CSS-only 4-bar visualizer for the playback bar.", | |
| "code": ":root { --viz-color: var(--spice-button-active); --viz-speed: 0.8s; --viz-width: 18px; --viz-height: 20px; --viz-bar-w: 3px; --viz-off-y: -4px; } .main-nowPlayingBar-extraControls::before { content: ""; display: flex; width: var(--viz-width); height: var(--viz-height); margin-right: 15px; transform: translateY(var(--viz-off-y)); background-image: linear-gradient(var(--viz-color), var(--viz-color)), linear-gradient(var(--viz-color), var(--viz-color)), linear-gradient(var(--viz-color), var(--viz-color)), linear-gradient(var(--viz-color), var(--viz-color)); background-position: 0% 100%, 33% 100%, 66% 100%, 100% 100%; background-repeat: no-repeat; background-size: var(--viz-bar-w) 40%, var(--viz-bar-w) 80%, var(--viz-bar-w) 30%, var(--viz-bar-w) 60%; animation: organicBounce var(--viz-speed) infinite linear; transition: background-size 0.3s ease; } @keyframes organicBounce { 0% { background-size: var(--viz-bar-w) 70%, var(--viz-bar-w) 100%, var(--viz-bar-w) 10%, var(--viz-bar-w) 40%; } 9% { background-size: var(--viz-bar-w) 85%, var(--viz-bar-w) 85%, var(--viz-bar-w) 25%, var(--viz-bar-w) 55%; } 18% { background-size: var(--viz-bar-w) 100%, var(--viz-bar-w) 70%, var(--viz-bar-w) 40%, var(--viz-bar-w) 70%; } 27% { background-size: var(--viz-bar-w) 85%, var(--viz-bar-w) 55%, var(--viz-bar-w) 55%, var(--viz-bar-w) 85%; } 36% { background-size: var(--viz-bar-w) 70%, var(--viz-bar-w) 40%, var(--viz-bar-w) 70%, var(--viz-bar-w) 100%; } 45% { background-size: var(--viz-bar-w) 55%, var(--viz-bar-w) 25%, var(--viz-bar-w) 85%, var(--viz-bar-w) 85%; } 54% { background-size: var(--viz-bar-w) 40%, var(--viz-bar-w) 10%, var(--viz-bar-w) 100%, var(--viz-bar-w) 70%; } 63% { background-size: var(--viz-bar-w) 25%, var(--viz-bar-w) 25%, var(--viz-bar-w) 85%, var(--viz-bar-w) 55%; } 72% { background-size: var(--viz-bar-w) 10%, var(--viz-bar-w) 40%, var(--viz-bar-w) 70%, var(--viz-bar-w) 40%; } 81% { background-size: var(--viz-bar-w) 25%, var(--viz-bar-w) 55%, var(--viz-bar-w) 55%, var(--viz-bar-w) 25%; } 90% { background-size: var(--viz-bar-w) 40%, var(--viz-bar-w) 70%, var(--viz-bar-w) 40%, var(--viz-bar-w) 10%; } 100% { background-size: var(--viz-bar-w) 55%, var(--viz-bar-w) 85%, var(--viz-bar-w) 25%, var(--viz-bar-w) 25%; } } .main-nowPlayingBar-container:has( button[data-testid="control-button-playpause"] path[d^="M3"], button[data-testid="control-button-playpause"] path[d^="M11"], button[aria-label*="Play"] ) .main-nowPlayingBar-extraControls::before { background-size: var(--viz-bar-w) 2px, var(--viz-bar-w) 2px, var(--viz-bar-w) 2px, var(--viz-bar-w) 2px !important; animation: none !important; opacity: 0.8; }", | |
| "preview": "preview.gif" | |
| } | |
| { | |
| "title": "Minimal 4-Bar Visualizer", | |
| "description": "A minimalist, CSS-only 4-bar visualizer for the playback bar.", | |
| "code": ":root { --viz-color: var(--spice-button-active); --viz-speed: 0.8s; --viz-width: 18px; --viz-height: 20px; --viz-bar-w: 3px; --viz-off-y: -4px; } .main-nowPlayingBar-extraControls::before { content: ""; display: flex; width: var(--viz-width); height: var(--viz-height); margin-right: 15px; transform: translateY(var(--viz-off-y)); background-image: linear-gradient(var(--viz-color), var(--viz-color)), linear-gradient(var(--viz-color), var(--viz-color)), linear-gradient(var(--viz-color), var(--viz-color)), linear-gradient(var(--viz-color), var(--viz-color)); background-position: 0% 100%, 33% 100%, 66% 100%, 100% 100%; background-repeat: no-repeat; background-size: var(--viz-bar-w) 40%, var(--viz-bar-w) 80%, var(--viz-bar-w) 30%, var(--viz-bar-w) 60%; animation: organicBounce var(--viz-speed) infinite linear; transition: background-size 0.3s ease; } @keyframes organicBounce { 0% { background-size: var(--viz-bar-w) 70%, var(--viz-bar-w) 100%, var(--viz-bar-w) 10%, var(--viz-bar-w) 40%; } 9% { background-size: var(--viz-bar-w) 85%, var(--viz-bar-w) 85%, var(--viz-bar-w) 25%, var(--viz-bar-w) 55%; } 18% { background-size: var(--viz-bar-w) 100%, var(--viz-bar-w) 70%, var(--viz-bar-w) 40%, var(--viz-bar-w) 70%; } 27% { background-size: var(--viz-bar-w) 85%, var(--viz-bar-w) 55%, var(--viz-bar-w) 55%, var(--viz-bar-w) 85%; } 36% { background-size: var(--viz-bar-w) 70%, var(--viz-bar-w) 40%, var(--viz-bar-w) 70%, var(--viz-bar-w) 100%; } 45% { background-size: var(--viz-bar-w) 55%, var(--viz-bar-w) 25%, var(--viz-bar-w) 85%, var(--viz-bar-w) 85%; } 54% { background-size: var(--viz-bar-w) 40%, var(--viz-bar-w) 10%, var(--viz-bar-w) 100%, var(--viz-bar-w) 70%; } 63% { background-size: var(--viz-bar-w) 25%, var(--viz-bar-w) 25%, var(--viz-bar-w) 85%, var(--viz-bar-w) 55%; } 72% { background-size: var(--viz-bar-w) 10%, var(--viz-bar-w) 40%, var(--viz-bar-w) 70%, var(--viz-bar-w) 40%; } 81% { background-size: var(--viz-bar-w) 25%, var(--viz-bar-w) 55%, var(--viz-bar-w) 55%, var(--viz-bar-w) 25%; } 90% { background-size: var(--viz-bar-w) 40%, var(--viz-bar-w) 70%, var(--viz-bar-w) 40%, var(--viz-bar-w) 10%; } 100% { background-size: var(--viz-bar-w) 55%, var(--viz-bar-w) 85%, var(--viz-bar-w) 25%, var(--viz-bar-w) 25%; } } .main-nowPlayingBar-container:has( button[data-testid="control-button-playpause"] path[d^="M3"], button[data-testid="control-button-playpause"] path[d^="M11"], button[aria-label*="Play"] ) .main-nowPlayingBar-extraControls::before { background-size: var(--viz-bar-w) 2px, var(--viz-bar-w) 2px, var(--viz-bar-w) 2px, var(--viz-bar-w) 2px !important; animation: none !important; opacity: 0.8; }", | |
| "preview": "resources/assets/snippets/minimal-4-bar-visualizer.gif" | |
| } |
🤖 Prompt for AI Agents
In resources/snippets.json around lines 542 to 547, the "preview" field uses
"preview.gif" which doesn't follow the project's convention and will break the
Marketplace preview; update the preview path to follow the pattern
resources/assets/snippets/[descriptive-name].[ext] (e.g.
resources/assets/snippets/minimal-4-bar-visualizer.gif) and add/place the actual
GIF at that path in the repo so the preview resolves correctly.
Add a minimal 4-bar visualizer for playback bar
Summary by CodeRabbit
New Features
Updates
✏️ Tip: You can customize this high-level summary in your review settings.