Skip to content

fix(css): incorrect shape for artist profile picture#3885

Merged
rxri merged 1 commit into
spicetify:mainfrom
KamilWachnicki:main
Jul 5, 2026
Merged

fix(css): incorrect shape for artist profile picture#3885
rxri merged 1 commit into
spicetify:mainfrom
KamilWachnicki:main

Conversation

@KamilWachnicki

@KamilWachnicki KamilWachnicki commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Style
    • Updated card image styling to appear fully rounded.
    • Improved metadata text truncation so card details stay cleaner and more consistent across displays.

@coderabbitai

coderabbitai Bot commented Jul 5, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The appended CSS snippet used to patch xpui.css/xpui-snapshot.css was updated: card image wrapper border-radius changed from 6px to 50%, and card metadata rules now include a standard line-clamp:2 property alongside the existing -webkit-line-clamp:2.

Changes

CSS Patch Update

Layer / File(s) Summary
Update appended CSS rules
src/preprocess/preprocess.go
Changes card image border-radius to 50% and adds standard line-clamp property to card metadata styling.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Poem

A rabbit hopped through CSS lines,
Squared corners rounded into circles fine,
Two clamps now stand where one stood tall,
A tiny tweak, but neat withal. 🐰✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly matches the main CSS fix for the artist profile picture shape.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 `@src/preprocess/preprocess.go`:
- Line 299: The circular border-radius change is applied too broadly through
main-cardImage-imageWrapper, which affects multiple card types. Update the
styling so only artist cards get the 50% radius by targeting the existing
main-cardImage-circular marker (or another artist-specific selector) instead of
the shared wrapper class, and keep the shared card artwork styles 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 6aaeed2e-1513-4e27-a5b9-8a8b2768d577

📥 Commits

Reviewing files that changed from the base of the PR and between e1f6681 and a145196.

📒 Files selected for processing (1)
  • src/preprocess/preprocess.go

if fileName == "xpui.css" || fileName == "xpui-snapshot.css" {
content = content + `
.main-gridContainer-fixedWidth{grid-template-columns:repeat(auto-fill,var(--column-width));width:calc((var(--column-count) - 1) * var(--grid-gap)) + var(--column-count) * var(--column-width) )}.main-cardImage-imageWrapper{background-color:var(--card-color,#333);border-radius:6px;-webkit-box-shadow:0 8px 24px rgba(0,0,0,.5);box-shadow:0 8px 24px rgba(0,0,0,.5);padding-bottom:100%;position:relative;width:100%}.main-card-imagePlaceholder,.main-cardImage-image{height:100%;left:0;position:absolute;top:0;width:100%}.main-card-card{border-radius:8px;-webkit-box-flex:1;background:var(--spice-player);-ms-flex:1;flex:1;isolation:isolate;padding:16px;position:relative;-webkit-transition:background-color .3s;transition:background-color .3s;width:100%}.main-card-card:hover,.main-card-card[data-context-menu-open=true]{background:var(--spice-card)}.main-card-card:focus-within{background:var(--spice-card)}.main-card-card .main-card-cardLink{position:absolute;z-index:0}.RjYPjR7FsVf42b3a5Efm:before,.Z78JmW4GUvvxLXSFjb7R:not(:last-child):after{content:"•";margin:0 4px}.main-card-card a,.main-card-card button{position:relative;z-index:1}.main-card-cardLink{bottom:0;content:"";cursor:pointer;left:0;overflow:hidden;right:0;text-indent:100%;top:0;white-space:nowrap;z-index:0}.main-card-cardTitle{z-index:1}.main-card-cardTitleLink:focus,.main-card-cardTitleLink:hover{text-decoration:none}.Wmr5qZ5jui6X37XCrChA{opacity:0}.main-card-newEpisodeIndicator{margin-top:3px}.main-card-imageContainer{pointer-events:none;position:relative}.main-card-imageContainerOld,.main-card-imageContainerSkeleton{margin-bottom:16px}.main-card-cardMetadata{min-height:62px;-webkit-line-clamp:2}.main-card-DownloadStatusIndicator{bottom:12px;inset-inline-end:12px;position:absolute}.main-card-PlayButtonContainer{border-radius:500px;bottom:8px;-webkit-box-shadow:0 8px 8px rgba(var(--spice-rgb-shadow),.3);box-shadow:0 8px 8px rgba(var(--spice-rgb-shadow),.3);inset-inline-end:8px;opacity:0;pointer-events:none;position:absolute;-webkit-transform:translateY(8px);transform:translateY(8px);z-index:2}@media(pointer:coarse){.main-card-PlayButtonContainer{display:none}}@media(prefers-reduced-motion:no-preference){.main-card-PlayButtonContainer{-webkit-transition:opacity .2s ease-out,-webkit-transform .2s ease-out;transition:transform .2s ease-out,opacity .2s ease-out,-webkit-transform .2s ease-out}}.main-card-PlayButtonContainerVisible{opacity:1;pointer-events:auto;position:absolute;-webkit-transform:translateY(0);transform:translateY(0)}.main-card-cardContainer{--animation-speed:0.2s!important;white-space:normal}.main-card-card:hover .main-card-PlayButtonContainer,.main-card-cardContainer:hover .main-card-PlayButtonContainer{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}.main-card-card:focus-within .main-card-PlayButtonContainer,.main-card-cardContainer:focus-within{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}@media(pointer:fine){.main-card-card .main-card-cardLink:hover{cursor:pointer}.main-card-card:hover .main-card-PlayButtonContainer,.main-card-cardContainer:hover .main-card-PlayButtonContainer{opacity:1;pointer-events:auto;position:absolute}.main-card-card:focus-within .main-card-PlayButtonContainer,.main-card-cardContainer:focus-within .main-card-PlayButtonContainer{opacity:1;pointer-events:auto;position:absolute}}.main-card-cardMetadata,.v3isO2phyJAoZRkmme0G{display:-webkit-box;-webkit-box-orient:vertical}
.main-gridContainer-fixedWidth{grid-template-columns:repeat(auto-fill,var(--column-width));width:calc((var(--column-count) - 1) * var(--grid-gap)) + var(--column-count) * var(--column-width) )}.main-cardImage-imageWrapper{background-color:var(--card-color,#333);border-radius:50%;-webkit-box-shadow:0 8px 24px rgba(0,0,0,.5);box-shadow:0 8px 24px rgba(0,0,0,.5);padding-bottom:100%;position:relative;width:100%}.main-card-imagePlaceholder,.main-cardImage-image{height:100%;left:0;position:absolute;top:0;width:100%}.main-card-card{border-radius:8px;-webkit-box-flex:1;background:var(--spice-player);-ms-flex:1;flex:1;isolation:isolate;padding:16px;position:relative;-webkit-transition:background-color .3s;transition:background-color .3s;width:100%}.main-card-card:hover,.main-card-card[data-context-menu-open=true]{background:var(--spice-card)}.main-card-card:focus-within{background:var(--spice-card)}.main-card-card .main-card-cardLink{position:absolute;z-index:0}.RjYPjR7FsVf42b3a5Efm:before,.Z78JmW4GUvvxLXSFjb7R:not(:last-child):after{content:"•";margin:0 4px}.main-card-card a,.main-card-card button{position:relative;z-index:1}.main-card-cardLink{bottom:0;content:"";cursor:pointer;left:0;overflow:hidden;right:0;text-indent:100%;top:0;white-space:nowrap;z-index:0}.main-card-cardTitle{z-index:1}.main-card-cardTitleLink:focus,.main-card-cardTitleLink:hover{text-decoration:none}.Wmr5qZ5jui6X37XCrChA{opacity:0}.main-card-newEpisodeIndicator{margin-top:3px}.main-card-imageContainer{pointer-events:none;position:relative}.main-card-imageContainerOld,.main-card-imageContainerSkeleton{margin-bottom:16px}.main-card-cardMetadata{min-height:62px;line-clamp:2;-webkit-line-clamp:2}.main-card-DownloadStatusIndicator{bottom:12px;inset-inline-end:12px;position:absolute}.main-card-PlayButtonContainer{border-radius:500px;bottom:8px;-webkit-box-shadow:0 8px 8px rgba(var(--spice-rgb-shadow),.3);box-shadow:0 8px 8px rgba(var(--spice-rgb-shadow),.3);inset-inline-end:8px;opacity:0;pointer-events:none;position:absolute;-webkit-transform:translateY(8px);transform:translateY(8px);z-index:2}@media(pointer:coarse){.main-card-PlayButtonContainer{display:none}}@media(prefers-reduced-motion:no-preference){.main-card-PlayButtonContainer{-webkit-transition:opacity .2s ease-out,-webkit-transform .2s ease-out;transition:transform .2s ease-out,opacity .2s ease-out,-webkit-transform .2s ease-out}}.main-card-PlayButtonContainerVisible{opacity:1;pointer-events:auto;position:absolute;-webkit-transform:translateY(0);transform:translateY(0)}.main-card-cardContainer{--animation-speed:0.2s!important;white-space:normal}.main-card-card:hover .main-card-PlayButtonContainer,.main-card-cardContainer:hover .main-card-PlayButtonContainer{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}.main-card-card:focus-within .main-card-PlayButtonContainer,.main-card-cardContainer:focus-within{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}@media(pointer:fine){.main-card-card .main-card-cardLink:hover{cursor:pointer}.main-card-card:hover .main-card-PlayButtonContainer,.main-card-cardContainer:hover .main-card-PlayButtonContainer{opacity:1;pointer-events:auto;position:absolute}.main-card-card:focus-within .main-card-PlayButtonContainer,.main-card-cardContainer:focus-within .main-card-PlayButtonContainer{opacity:1;pointer-events:auto;position:absolute}}.main-card-cardMetadata,.v3isO2phyJAoZRkmme0G{display:-webkit-box;-webkit-box-orient:vertical}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n== File listing ==\n'
git ls-files | rg '^(src/preprocess/preprocess\.go|.*css-map\.json|.*package\.json|.*\.html|.*\.tsx?|.*\.jsx?)$' || true

printf '\n== Find relevant class names ==\n'
rg -n --hidden --no-ignore-vcs 'main-cardImage-(imageWrapper|circular)|main-card-cardMetadata|line-clamp' .

printf '\n== Inspect preprocess line region ==\n'
nl -ba src/preprocess/preprocess.go | sed -n '285,310p'

printf '\n== Inspect css-map references if present ==\n'
for f in $(git ls-files | rg 'css-map\.json$'); do
  echo "--- $f"
  rg -n 'main-cardImage-(imageWrapper|circular)|main-card-cardMetadata' "$f" || true
done

Repository: spicetify/cli

Length of output: 8881


🏁 Script executed:

#!/bin/bash
set -euo pipefail
pwd
git ls-files 'src/preprocess/preprocess.go' '*css-map.json'

Repository: spicetify/cli

Length of output: 212


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Show the exact change around the modified line and any surrounding class names.
nl -ba src/preprocess/preprocess.go | sed -n '294,302p'

# Locate the CSS map entries that mention the wrapper and circular variants.
for f in $(git ls-files | rg 'css-map\.json$'); do
  echo "--- $f"
  rg -n 'main-cardImage-(imageWrapper|circular)' "$f" || true
done

Repository: spicetify/cli

Length of output: 191


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Search for actual markup/DOM usage of the circular class.
rg -n --hidden --no-ignore-vcs 'main-cardImage-circular' .

# Search for the generic wrapper usage to see whether the selector is shared.
rg -n --hidden --no-ignore-vcs 'main-cardImage-imageWrapper' .

Repository: spicetify/cli

Length of output: 4190


Scope the circular radius to artist cards only.
main-cardImage-imageWrapper is used by multiple card types in this repo, so changing it to border-radius:50% will make album/playlist/podcast artwork circular too. Use the dedicated main-cardImage-circular marker (or an equivalent artist-only selector) for this shape change instead.

🤖 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 `@src/preprocess/preprocess.go` at line 299, The circular border-radius change
is applied too broadly through main-cardImage-imageWrapper, which affects
multiple card types. Update the styling so only artist cards get the 50% radius
by targeting the existing main-cardImage-circular marker (or another
artist-specific selector) instead of the shared wrapper class, and keep the
shared card artwork styles unchanged.

@rxri rxri changed the title fix(css): incorrect shape for artist profile picture #3740, add line-break for better compatiblity fix(css): incorrect shape for artist profile picture Jul 5, 2026
@rxri rxri merged commit cd588f3 into spicetify:main Jul 5, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants