Repository navigation
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (15)
🚧 Files skipped from review as they are similar to previous changes (15)
📝 WalkthroughWalkthroughAdds a ChangesCard Image Style Feature
Estimated code review effort: 3 (Moderate) | ~30 minutes Sequence Diagram(s)sequenceDiagram
participant SectionEditorDrawer
participant SaveHelpers
participant SectionHandler
participant HomeOrLibrary
participant SectionRow
participant SectionItemCard
SectionEditorDrawer->>SaveHelpers: save selected cardImageStyle
SaveHelpers->>SectionHandler: submit config with card_image_style
SectionHandler->>SectionHandler: validate with ParseCardImageStyle
SectionHandler-->>HomeOrLibrary: return layout card_image_style
HomeOrLibrary->>SectionRow: pass cardImageStyle
SectionRow->>SectionItemCard: pass imageStyle
SectionItemCard->>SectionItemCard: render portrait or landscape card
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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 |
dba04ba to
691125d
Compare
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 `@web/src/components/SectionItemCard.tsx`:
- Around line 83-99: The landscape overlay in SectionItemCard is decorative and
should be hidden from assistive tech to avoid duplicate announcements. Update
the conditional overlay container used for the logo/title fallback so it is
marked aria-hidden="true" for both branches, keeping the existing image and
title display behavior intact while preventing screen readers from reading the
overlay copy twice.
🪄 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: 6d5f9672-7cd0-4229-b428-46907ea7854c
📒 Files selected for processing (15)
internal/api/handlers/sections.gointernal/api/handlers/sections_test.gointernal/sections/card_image_style.gointernal/sections/card_image_style_test.goweb/src/api/types.tsweb/src/components/SectionItemCard.test.tsxweb/src/components/SectionItemCard.tsxweb/src/components/SectionRow.test.tsxweb/src/components/SectionRow.tsxweb/src/components/sections/EditableSectionRows.tsxweb/src/components/sections/SectionEditorDrawer.test.tsweb/src/components/sections/SectionEditorDrawer.tsxweb/src/lib/sectionCardImageStyle.tsweb/src/pages/Home.tsxweb/src/pages/LibraryRecommended.tsx
86c7b47 to
ca617c1
Compare
ca617c1 to
8bed58f
Compare
(cherry picked from commit 0e893c7782a34dae1733740a2bc01cf8397548d6)
(cherry picked from commit 36f5f6a664c88aebb323d1a637a6f6a4dbeab41f)
8bed58f to
f709faf
Compare
|
Closing because we are dropping the server-controlled section portrait/landscape feature rather than maintaining it downstream. |
feat(sections): allow row image style selection
Problem
Section rows on the web client have always rendered portrait posters. Some sources (network row, "Trending" row, editorially curated backdrops) look better as 16:9 landscape cards, but there was no way to choose per-row and no plumbing between the server section descriptor and the client card component.
Approach
Introduce a small enum abstraction and thread it through the section pipeline without changing existing behavior:
CardImageStyletype (Auto | Portrait | Landscape) in the existinginternal/sectionspackage, withParse/Stringhelpers.Autois the default and preserves current portrait rendering, so any section that omits the new field is unchanged.SectionDescriptorAPI responses gain an optionalcard_image_stylefield (omitempty) so old clients keep working.SectionRowpicks the variant per row via a newsectionCardImageStyle.tshelper;SectionItemCardrendersaspect-videowhen landscape is requested, otherwise the existing 2:3 poster path.Verification
go test ./internal/sections/... ./internal/api/handlers/ -run 'CardImage|Section'— passes.card_image_stylecontinue to render as portrait posters; new rows configuredlandscaperender 16:9 without card component regressions.Risks & follow-up
AutoandAutofalls through to the previous portrait path.AI-use disclosure
Implemented with a combination of Claude Code and Codex assistance, with human oversight.
Summary by CodeRabbit
card_image_styleand drive row/card rendering accordingly.card_image_stylechanges.cardImageStyleoverrides (e.g., portrait vs landscape).