feat(snippets): add duplicated lyrics button removal snippet - #1199
feat(snippets): add duplicated lyrics button removal snippet#1199miguelthehara wants to merge 2 commits into
Conversation
Adds a snippet that hides the stock Spotify lyrics button, which can help prevent duplicate lyrics buttons when using lyrics extensions such as Spicy Lyrics.
WalkthroughAdds a marketplace snippet that hides the stock lyrics button in the now playing bar using a targeted CSS selector. ChangesLyrics button visibility
Estimated code review effort: 1 (Trivial) | ~2 minutes Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@resources/snippets.json`:
- Around line 553-558: Escape the inner double quotes around the data-testid
value in the code string for “Remove duplicated/stock lyrics button” so
resources/snippets.json remains valid JSON and the selector is preserved
unchanged.
🪄 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: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: c9eabf0e-b3aa-4107-b3fb-8e6fadbb8bf3
⛔ Files ignored due to path filters (1)
resources/assets/snippets/fix-duplicate-lyrics.pngis excluded by!**/*.png
📒 Files selected for processing (1)
resources/snippets.json
| }, | ||
| { | ||
| "title": "Remove duplicated/stock lyrics button", | ||
| "description": "Removes only the stock microphone icon. Best used with lyrics extensions (eg. Spicy Lyrics) to fix duplicate playbar buttons.", | ||
| "code": ".main-nowPlayingBar-lyricsButton[data-testid="lyrics-button"] { display: none !important; }", | ||
| "preview": "resources/assets/snippets/fix-duplicate-lyrics.png" |
There was a problem hiding this comment.
🎯 Functional Correctness | 🔴 Critical | ⚡ Quick win
Escape the selector’s inner quotes to keep the manifest valid JSON.
Line 557 terminates the JSON string at data-testid=", so resources/snippets.json cannot be parsed and the catalog will fail to load.
Proposed fix
- "code": ".main-nowPlayingBar-lyricsButton[data-testid="lyrics-button"] { display: none !important; }",
+ "code": ".main-nowPlayingBar-lyricsButton[data-testid=\"lyrics-button\"] { display: none !important; }",📝 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": "Remove duplicated/stock lyrics button", | |
| "description": "Removes only the stock microphone icon. Best used with lyrics extensions (eg. Spicy Lyrics) to fix duplicate playbar buttons.", | |
| "code": ".main-nowPlayingBar-lyricsButton[data-testid="lyrics-button"] { display: none !important; }", | |
| "preview": "resources/assets/snippets/fix-duplicate-lyrics.png" | |
| }, | |
| { | |
| "title": "Remove duplicated/stock lyrics button", | |
| "description": "Removes only the stock microphone icon. Best used with lyrics extensions (eg. Spicy Lyrics) to fix duplicate playbar buttons.", | |
| "code": ".main-nowPlayingBar-lyricsButton[data-testid=\"lyrics-button\"] { display: none !important; }", | |
| "preview": "resources/assets/snippets/fix-duplicate-lyrics.png" |
🧰 Tools
🪛 Biome (2.5.3)
[error] 557-557: expected , but instead found lyrics
(parse)
[error] 557-557: Minus must be followed by a digit
(parse)
[error] 557-557: expected , but instead found button
(parse)
[error] 557-557: expected : but instead found "] { display: none !important; }"
(parse)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@resources/snippets.json` around lines 553 - 558, Escape the inner double
quotes around the data-testid value in the code string for “Remove
duplicated/stock lyrics button” so resources/snippets.json remains valid JSON
and the selector is preserved unchanged.
Source: Linters/SAST tools
|
Bruh I did not even realize that there's 2 other open pull requests that do this same thing 😭 |
|
There already is snippet for it am pretty sure, and also you have broken escaping, like coderabbit said |
Adds a snippet that hides the stock Spotify lyrics button, which can help prevent duplicate lyrics buttons when using lyrics extensions such as Spicy Lyrics.
Summary by CodeRabbit