Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
WalkthroughThe showcase page component is refactored with a more compact JSX structure while updating the showcase list. The ShowcaseCard component now conditionally renders video elements or images based on data, replacing purely image-based rendering. Component wrappers are simplified and formatting is streamlined without changing public API signatures. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 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 |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (3)
src/pages/showcase/index.js (3)
22-27: Consider adding a more broadly supported video format or fallback for Stable RadarRight now Stable Radar uses only a
.webmsource. Some browsers (especially older Safari variants) can still struggle with WebM-only video; in those cases the card will render an empty media area. Consider either:
- Adding multiple
<source>elements with an H.264/MP4 fallback, or- Providing an
image/poster fallback for browsers that can’t play the video.
117-163: Solid conditional media rendering; minor a11y/perf improvements possibleThe
video/imgconditional is clean and avoids double-rendering. A couple of optional tweaks to consider:
- For decorative preview video, mark it
aria-hidden="true"(or otherwise clarify if it’s informative content).- For images, consider
loading="lazy"to avoid loading all previews above the fold unnecessarily.These are nice-to-haves; the core logic looks good.
170-177: Prefer a stable unique key over the array index insites.mapUsing
key={idx}works for a static list, but if items are ever reordered/filtered it can lead to subtle reconciliation issues. Since each site has a stable identity (sourceortitle), you could do:- {sites.map((site, idx) => ( - <div - key={idx} + {sites.map((site) => ( + <div + key={site.source}This keeps React’s diffing more robust with almost no cost.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
static/img/showcase/stable-radar.webmis excluded by!**/*.webm
📒 Files selected for processing (1)
src/pages/showcase/index.js(1 hunks)
🔇 Additional comments (1)
src/pages/showcase/index.js (1)
184-205: Header/Layout wiring and overall page structure look goodHeader, cards, and Layout composition are straightforward and idiomatic for Docusaurus; title/description constants are correctly reused and the main structure is clear.
Summary by CodeRabbit
New Features
UI Improvements
✏️ Tip: You can customize this high-level summary in your review settings.