-
-
Notifications
You must be signed in to change notification settings - Fork 246
feat(snippets): add Smaller Lyrics snippet to reduce font size
#1040
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
Conversation
WalkthroughA new CSS snippet entry is added to the snippets registry that adjusts lyrics display to a smaller font size via CSS variable modification, including metadata and preview image reference. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 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.
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: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
resources/assets/snippets/smaller-lyrics.pngis excluded by!**/*.png
📒 Files selected for processing (1)
resources/snippets.json(1 hunks)
| }, | ||
| { | ||
| "title": "Smaller Lyrics", | ||
| "description": "Changes the lyrics to be one font-size smaller. (3 down to 2)", | ||
| "code": ".lyrics-lyricsContent-text { font-size: var(--encore-text-size-larger-2) !important; }", | ||
| "preview": "resources/assets/snippets/smaller-lyrics.png" | ||
| } |
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.
🧩 Analysis chain
Verify CSS selector and preview image file.
The new snippet entry is properly formatted and integrates well with the existing JSON structure. However, I need to verify the CSS selector and confirm the preview image file exists.
The selector .lyrics-lyricsContent-text differs from other lyrics-related snippets ("Better lyrics style" on line 143 and "Pretty Lyrics" on line 227), which use more comprehensive selectors targeting .lyrics-lyrics-contentContainer or .lyrics-lyrics-contentWrapper. Ensure the selector correctly targets all lyrics text on the current Spotify UI.
🏁 Script executed:
#!/bin/bash
# Verify preview image file exists and check the file structure
# Check if the preview image file exists
if [ -f "resources/assets/snippets/smaller-lyrics.png" ]; then
echo "✓ Preview image file exists"
file "resources/assets/snippets/smaller-lyrics.png"
else
echo "✗ Preview image file NOT found at: resources/assets/snippets/smaller-lyrics.png"
fi
# List nearby snippet asset files for reference
echo ""
echo "Nearby snippet asset files:"
ls -lah resources/assets/snippets/ | tail -20Length of output: 1604
---
🏁 Script executed:
```shell
#!/bin/bash
# Extract all lyrics-related snippets and their selectors to compare
# Use jq to parse JSON and filter for snippets with "lyrics" in title or description (case-insensitive)
# and display their titles and CSS selectors
echo "=== All lyrics-related snippets and their selectors ==="
jq -r '.[] | select((.title | ascii_downcase) contains("lyric") or (.description | ascii_downcase) contains("lyric")) | "\(.title)\n Selector: \(.code | match("[^{]+") | .string)\n"' resources/snippets.json
echo ""
echo "=== Checking for any other references to 'lyricsContent' selector ==="
grep -n "lyricsContent" resources/snippets.json
Length of output: 2236
Fix CSS selector — .lyrics-lyricsContent-text does not exist in other Spotify lyrics snippets.
The preview image file exists and is valid. However, the CSS selector is incorrect.
The selector .lyrics-lyricsContent-text appears only in this new snippet and does not match the pattern established by other lyrics-related snippets:
- Line 143 targets
.lyrics-lyrics-contentContainer .lyrics-lyricsContent-lyric - Line 227 targets
.lyrics-lyrics-contentWrapperwith.lyrics-lyricsContent-*classes - Line 245 targets
.lyrics-lyricsContent-lyric
The .lyrics-lyricsContent-text class does not exist in any other snippet. Based on the established patterns, this should likely target .lyrics-lyricsContent-lyric instead to affect the individual lyrics text.
🤖 Prompt for AI Agents
In resources/snippets.json around lines 535 to 541 the CSS selector
".lyrics-lyricsContent-text" is incorrect and does not match the project's
established lyrics selectors; replace that selector with
".lyrics-lyricsContent-lyric" so the rule targets individual lyric lines (keep
the rest of the snippet unchanged and verify the preview image path remains
correct).
|
This can be added as custom CSS locally. Useless to have in marketplace. sorry. |
|
I see. CONTRIBUTING.md does not seem to include any infos about that. |
Add a snippet that changes the lyrics font size from:
var(--encore-text-size-larger-3)to:
var(--encore-text-size-larger-2)Summary by CodeRabbit