feat: implement redesigned events page with event cards and gallery s…#175
Hidden character warning
feat: implement redesigned events page with event cards and gallery s…#175peterlipt wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughThe events collection now supports optional cover images and galleries. The events page maps these fields into reusable ChangesEvents cover and gallery
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant RendezvenyekPage
participant EventCard
participant EventGallery
RendezvenyekPage->>EventCard: pass cover, description, gallery, links, and labels
EventCard->>EventGallery: pass gallery images and navigation labels
EventGallery-->>EventCard: render visible images and placeholders
EventCard-->>RendezvenyekPage: render the event card
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 |
|
@coderabbitai review |
✅ Action performedReview finished.
|
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 `@src/app/`(app)/[lang]/kozelet/rendezvenyek/components/EventGallery.tsx:
- Around line 49-56: Update the Image component’s sizes prop in EventGallery so
it reflects the three-column flex layout at every breakpoint: use approximately
30vw for mobile and desktop instead of declaring 80vw on screens up to 768px.
🪄 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
Run ID: 739c6e84-41f0-48ba-93ec-83ec144802f6
📒 Files selected for processing (10)
src/app/(app)/[lang]/kozelet/rendezvenyek/components/EventCard.tsxsrc/app/(app)/[lang]/kozelet/rendezvenyek/components/EventGallery.tsxsrc/app/(app)/[lang]/kozelet/rendezvenyek/loading.tsxsrc/app/(app)/[lang]/kozelet/rendezvenyek/page.tsxsrc/collections/EhkEvents.tssrc/dictionaries/en/news.jsonsrc/dictionaries/hu/news.jsonsrc/migrations/20260701_000000_ehk_events_cover_and_gallery.tssrc/migrations/index.tssrc/payload-types.ts
| {media.url && ( | ||
| <Image | ||
| src={media.url} | ||
| alt={media.alt || ""} | ||
| fill | ||
| className="object-cover" | ||
| sizes="(max-width: 768px) 80vw, 30vw" | ||
| /> |
There was a problem hiding this comment.
🚀 Performance & Scalability | 🟡 Minor | ⚡ Quick win
sizes prop doesn't match the mobile layout.
Three images are displayed side-by-side on all breakpoints (each flex-1), making each image roughly 30vw on mobile. However, sizes="(max-width: 768px) 80vw, 30vw" tells the browser to fetch an 80vw-wide image on mobile — roughly 2.6x wider than needed, causing unnecessary bandwidth usage.
⚡ Proposed fix
<Image
src={media.url}
alt={media.alt || ""}
fill
className="object-cover"
- sizes="(max-width: 768px) 80vw, 30vw"
+ sizes="(max-width: 768px) 30vw, 30vw"
/>📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| {media.url && ( | |
| <Image | |
| src={media.url} | |
| alt={media.alt || ""} | |
| fill | |
| className="object-cover" | |
| sizes="(max-width: 768px) 80vw, 30vw" | |
| /> | |
| {media.url && ( | |
| <Image | |
| src={media.url} | |
| alt={media.alt || ""} | |
| fill | |
| className="object-cover" | |
| sizes="(max-width: 768px) 30vw, 30vw" | |
| /> |
🤖 Prompt for 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.
In `@src/app/`(app)/[lang]/kozelet/rendezvenyek/components/EventGallery.tsx around
lines 49 - 56, Update the Image component’s sizes prop in EventGallery so it
reflects the three-column flex layout at every breakpoint: use approximately
30vw for mobile and desktop instead of declaring 80vw on screens up to 768px.
…upport
Summary by CodeRabbit
New Features
Bug Fixes