fix(ui): cap grid item width on wide screens#22
Merged
Conversation
…xed cols) The recently-played / recently-added / library / artist grids capped at lg:grid-cols-5 or lg:grid-cols-6 and then let each cell stretch to fill the remaining width. On a 2000px+ viewport that pushed cover art to ~330px square — way larger than any Spotify / Apple Music reference. Swap to grid-cols-[repeat(auto-fill,minmax(N,1fr))] so items stay 160-220px wide and the column count grows with viewport. - HomeView Recently played + Recently added: minmax(160px, 1fr) - LibraryView albums + artists + genres: minmax(180px, 1fr) - ArtistDetailView discography + similar artists: minmax(180px / 160px, 1fr)
📝 WalkthroughWalkthroughThe PR standardizes responsive grid layouts across the application by converting fixed Tailwind breakpoint-based column definitions to auto-filling CSS grid layouts using ChangesResponsive Grid Layout Refactoring
Estimated Code Review Effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
On widescreen monitors (>1920px), the HomeView / LibraryView / ArtistDetailView grids were stretching cover art to ~330px square — way bigger than the Spotify / Apple Music reference. The grids capped at `lg:grid-cols-5` or `lg:grid-cols-6` and then let each cell expand to fill the remaining width, instead of growing the column count.
Switch to CSS Grid `auto-fill` with a `minmax(N, 1fr)` so items stay 160-220px regardless of viewport width and the column count naturally grows with screen size.
Test plan
Summary by CodeRabbit