Repository navigation
fix(web): size audiobook grid rows for square covers - #4276
Conversation
- Add a posterAspect prop to ItemGrid and pass it through as the useGridLayout poster ratio, so rows of square covers no longer leave 2:3 poster height empty below them - Make loading skeletons use the same aspect as the grid's posters - Use square posters in audiobook library browse and the audiobook catalog scope
|
Warning Review limit reachedEnable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Next included review available in 10 minutes. View limit details
|
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
Problem
Related issue: N/A
Validation tasks: none
Other clients: Apple not checked yet, parity issue to follow if its audiobook grid has the same gap; Android not checked yet, parity issue to follow if affected; Roku N/A (audiobooks are outside the first Roku release)
On the web app's audiobook Books grid, every row has a band of empty space under the covers. The grid calculates row height for 2:3 portrait posters, but audiobook covers are square. Rows can grow when cards need more room, but they never shrink, so each row keeps about 60px of empty space at desktop width. This change sizes rows for square covers in audiobook grids.
Approach
useGridLayoutnow takes the poster's height-to-width ratio instead of always using 1.5.ItemGridhas a newposterAspectprop ("portrait"or"square"). It sets that ratio and also gives the loading skeletons the matching shape. Portrait stays the default, so other grids don't change.LibraryBrowsepassessquarefor audiobook libraries.Catalogpasses it when the catalog is filtered to audiobooks, because that view had the same gap. Mixed views keep portrait rows, which still fit square covers.The change is web-only. It doesn't touch the server or the API.
Validation
tsc -p tsconfig.app.json): passEvidence
Evidence: https://evidence.siloserver.org/r/silo-server/audiobook-square-grid/
Surface and build: web app, audiobook library Library tab (Books), desktop (1600px) and mobile (390px) widths. Built from 2c75783 plus this change, using the Vite dev frontend against a development server.
Risks
None identified. Grids that don't pass
posterAspectkeep the 2:3 row height they had before.Checklist
AI Disclosure
Note
Add square poster aspect to
ItemGridfor audiobook coversAudiobooks have square covers, but the grid sized rows for 2:3 portrait posters, leaving gaps and mismatched skeletons.
ItemGridaccepts a newposterAspectprop (portraitorsquare) in ItemGrid.tsx, defaulting toportrait. Skeletons use the matching aspect class.useGridLayoutaccepts aposterRatio(poster height / width) in useGridLayout.ts, defaulting to 1.5, and uses it to estimate row height.CatalogResultsandLibraryBrowsepasssquarefor audiobook scopes and library types.Macroscope summarized 560af0e.