Reuse published collection card on collection detail page - #40
Conversation
Adds an optional #overlay slot to PublishedCollectionCard (sibling of the card's own anchor, to avoid nesting an anchor-in-anchor) and uses it on collections/[id] to show shared/published badges and the add link button on top of the card, replacing the ad-hoc header markup. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughThe PR adds a shared ChangesCollection card migration
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
PublishedCollectionCard was feature-owned but needed by both the published-collections and collections features, and cross-feature imports aren't allowed under FSD. Move it to shared/ui/collection-card.vue with a primitive prop API (to/title/description/imageUrl) instead of a domain object, so it no longer depends on any shared/api type, and reuse it on the /collections list (replacing the v-list-item rows with a card grid) with the badges/edit/delete actions overlaid on top. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
UpdateExtracted the collection card into
Verified: 🤖 Generated with Claude Code |
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 `@app/pages/collections/`[id]/index.vue:
- Around line 82-87: Update the CollectionCard `:to` route so private
collections navigate to the owner-only `/collections/<id>` detail page, while
shared or published collections continue using `/shared/<slug>`. Base the
conditional on the collection’s visibility fields and use the existing
`collection.id` and `collection.slug` symbols.
🪄 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: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 32136eb6-3cb4-414c-9dad-5f7c9182817f
📒 Files selected for processing (8)
app/features/collections/ui/collections-list.vueapp/features/published-collections/index.tsapp/features/published-collections/ui/published-collection-card.vueapp/pages/collections/[id]/index.vueapp/pages/index.vueapp/pages/published-collections.vueapp/shared/ui/collection-card.vueapp/shared/ui/index.ts
💤 Files with no reviewable changes (2)
- app/features/published-collections/ui/published-collection-card.vue
- app/features/published-collections/index.ts
Summary
#overlayslot toPublishedCollectionCard(rendered as a sibling of the card's own anchor, so overlay content — chips, buttons — never nests inside the card's:toanchor)collections/[id]to replace the ad-hoch1/pheader, with shared/published badges and the "Add link" button overlaid on top/published-collectionscall sites unaffected (no#overlaycontent passed, wrapper renders identically to before)Test plan
pnpm type-checkcleanpnpm lintcleanpnpm test— 189/189 pass/published-collections, and/collections/[id](auth redirect) render without runtime errors🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
UI Improvements