Skip to content

Conversation

@JeanneGrenet
Copy link
Collaborator

@JeanneGrenet JeanneGrenet commented Oct 24, 2025

Closes #436
d-1-announcement
d-1-announcement-insta (1)

Summary by CodeRabbit

Release Notes

  • New Features
    • Added new event announcement asset templates for Instagram and web formats
    • Event announcements now display speaker avatars in an organized circular layout
    • Enhanced event detail pages with generated announcement graphics featuring event date, location, co-organizers, and speakers

@JeanneGrenet JeanneGrenet self-assigned this Oct 24, 2025
@vercel
Copy link

vercel bot commented Oct 24, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
forkit-community Ready Ready Preview Comment Oct 24, 2025 0:43am

@coderabbitai
Copy link

coderabbitai bot commented Oct 24, 2025

Walkthrough

Three new asset-generation modules are introduced for event announcements: a reusable RoundedSpeakers component for displaying speaker avatars, plus two announcement generators for Instagram (1080x1350) and desktop (1920x1080) formats. Both generators fetch event data, co-organizer logos, speaker avatars, and render layered announcement compositions. Route entries for both generators are registered in the routes manifest.

Changes

Cohort / File(s) Summary
Reusable UI Component
src/generated-assets/components/RoundedSpeakers.tsx
New React component rendering circular speaker images in a horizontal overlapping list; accepts speakerImages: string[] prop with 80x80 sized, fully-rounded images and negative left margins for overlap effect.
Event Announcement Generators
src/pages/events/[id]/assets/_d-1-announcement.tsx, src/pages/events/[id]/assets/_d-1-announcement-insta.tsx
Two new asset modules generating event announcement images: desktop (1920x1080) and Instagram (1080x1350) formats. Both fetch event data, co-organizer logos, and up to 3 speaker avatars; render layered compositions with branding, countdown, speaker thumbnails via RoundedSpeakers, and event details.
Route Registration
src/routes.gen.ts
Added two new asset route entries for the announcement generators under events/:id/assets.

Sequence Diagram

sequenceDiagram
    participant Route as Asset Route
    participant Generator as d1announcement(Config)
    participant DataFetcher as Data Layer
    participant Renderer as JSX Renderer
    
    Route->>Generator: Receive route params {id}
    Generator->>DataFetcher: Fetch event data by id
    DataFetcher-->>Generator: Event object
    Generator->>DataFetcher: Fetch cover image (base64)
    Generator->>DataFetcher: Fetch co-organizer logos (base64)
    Generator->>DataFetcher: Fetch speaker avatars (base64, max 3)
    DataFetcher-->>Generator: All image assets
    Generator->>Renderer: Render Frame with composition<br/>(BgImage, LogoWithFriends,<br/>RoundedSpeakers, event details)
    Renderer-->>Route: JSX.Element (announcement image)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

The additions introduce multiple new asset generator modules with data-fetching logic and UI composition. While the patterns are consistent and straightforward (fetch → compute → render), review requires validating data flow integrity, image asset handling, layout correctness across two formats, and route registration accuracy.

Poem

🐰 Hop, hop, hooray! New speakers circle 'round,
Instagram meets desktop with announcement sound!
From event data springs—logos, avatars dance,
Routes sing and compose fill the frame's expanse. ✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The PR title "feat : D-1 announcement asstets : linkedin and insta" correctly identifies the primary change—adding D-1 (one day before event) announcement assets for social platforms. The title refers to real components being added: a RoundedSpeakers component and two announcement generation modules, one explicitly for Instagram (1080x1350 dimensions) and another at 1920x1080 that could serve LinkedIn or general web use. However, the title contains a typo ("asstets" instead of "assets"), and the specific claim about "linkedin" is somewhat ambiguous since the second announcement file lacks explicit LinkedIn naming and the 1920x1080 dimensions are not uniquely associated with LinkedIn. Despite these minor issues, a teammate scanning the git history would reasonably understand that this PR adds announcement asset features for social media platforms.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/d-1-announcement-assets

Comment @coderabbitai help to get the list of available commands and usage tips.

@JeanneGrenet JeanneGrenet requested review from Copilot and yoannfleurydev and removed request for Copilot October 24, 2025 12:36
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (1)
src/pages/events/[id]/assets/_d-1-announcement.tsx (1)

19-230: Consider extracting shared logic to reduce duplication.

The desktop and Instagram announcement generators share substantial code for data fetching and layout structure. Consider extracting:

  • A shared data-fetching helper that returns { event, postCover, coOrganizersLogos, speakerImages }
  • A base component with shared layout elements
  • Platform-specific layout configurations passed as props

This would improve maintainability and ensure consistency across announcement variants.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f150991 and ffd33d5.

📒 Files selected for processing (4)
  • src/generated-assets/components/RoundedSpeakers.tsx (1 hunks)
  • src/pages/events/[id]/assets/_d-1-announcement-insta.tsx (1 hunks)
  • src/pages/events/[id]/assets/_d-1-announcement.tsx (1 hunks)
  • src/routes.gen.ts (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
src/pages/events/[id]/assets/_d-1-announcement.tsx (7)
src/generated-assets/image.ts (2)
  • AssetImageConfig (11-15)
  • getAstroImageBase64 (171-174)
src/generated-assets/components/Frame.tsx (1)
  • Frame (4-35)
src/generated-assets/components/BgImage.tsx (1)
  • BgImage (1-63)
src/generated-assets/components/LogoWithFriends.tsx (1)
  • LogoWithFriends (6-63)
src/generated-assets/theme.ts (1)
  • COLORS (1-6)
src/generated-assets/components/RoundedSpeakers.tsx (1)
  • RoundedSpeakers (1-18)
src/lib/events.ts (1)
  • getEventDisplayDate (315-328)
src/pages/events/[id]/assets/_d-1-announcement-insta.tsx (7)
src/generated-assets/image.ts (2)
  • AssetImageConfig (11-15)
  • getAstroImageBase64 (171-174)
src/generated-assets/components/Frame.tsx (1)
  • Frame (4-35)
src/generated-assets/components/BgImage.tsx (1)
  • BgImage (1-63)
src/generated-assets/components/LogoWithFriends.tsx (1)
  • LogoWithFriends (6-63)
src/generated-assets/theme.ts (1)
  • COLORS (1-6)
src/generated-assets/components/RoundedSpeakers.tsx (1)
  • RoundedSpeakers (1-18)
src/lib/events.ts (1)
  • getEventDisplayDate (315-328)
🪛 Biome (2.1.2)
src/generated-assets/components/RoundedSpeakers.tsx

[error] 5-14: Missing key property for this element in iterable.

The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.

(lint/correctness/useJsxKeyInIterable)

🔇 Additional comments (5)
src/routes.gen.ts (1)

22-23: LGTM! Route entries align with new asset modules.

The new route entries for _d-1-announcement-insta and _d-1-announcement correctly correspond to the asset generation modules introduced in this PR.

src/pages/events/[id]/assets/_d-1-announcement.tsx (2)

83-83: Verify the hardcoded "01" days value matches the D-1 announcement intent.

The hardcoded "01" value is consistent with the filename _d-1-announcement.tsx. If this asset is intended exclusively for one-day-before announcements, this is correct. However, if you plan to create similar assets for D-2, D-3, etc., consider parameterizing the day count to reduce duplication.


131-131: Verify the hardcoded "100+ people" text is accurate for all events.

The text "Join us to meet 100+ people" is hardcoded and may not reflect the actual expected attendance for different events. Consider whether this should be:

  • Parameterized based on event data
  • Made configurable per event
  • Kept as a generic marketing message
src/pages/events/[id]/assets/_d-1-announcement-insta.tsx (2)

86-86: Verify the hardcoded "01" days value matches the D-1 announcement intent.

The hardcoded "01" value is consistent with the filename _d-1-announcement-insta.tsx. If this asset is intended exclusively for one-day-before announcements, this is correct. However, if you plan to create similar assets for D-2, D-3, etc., consider parameterizing the day count to reduce duplication.


134-134: Verify the hardcoded "100+ people" text is accurate for all events.

The text "Join us to meet 100+ people" is hardcoded and may not reflect the actual expected attendance for different events. Consider whether this should be:

  • Parameterized based on event data
  • Made configurable per event
  • Kept as a generic marketing message

Comment on lines +1 to +18
export const RoundedSpeakers = (props: { speakerImages: string[] }) => {
return (
<div style={{ display: "flex" }}>
{props.speakerImages.map((image, index) => (
<img
src={image}
style={{
borderRadius: 100,
width: 80,
height: 80,
marginLeft: index === 0 ? 0 : -25,
border: "solid 4px black",
}}
/>
))}
</div>
);
};
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Add key prop to mapped images.

React requires a unique key prop for each element in an iterable to efficiently track and reconcile components during re-renders.

Apply this diff to add the key prop:

-      {props.speakerImages.map((image, index) => (
+      {props.speakerImages.map((image, index) => (
         <img
+          key={image}
           src={image}
           style={{
📝 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.

Suggested change
export const RoundedSpeakers = (props: { speakerImages: string[] }) => {
return (
<div style={{ display: "flex" }}>
{props.speakerImages.map((image, index) => (
<img
src={image}
style={{
borderRadius: 100,
width: 80,
height: 80,
marginLeft: index === 0 ? 0 : -25,
border: "solid 4px black",
}}
/>
))}
</div>
);
};
export const RoundedSpeakers = (props: { speakerImages: string[] }) => {
return (
<div style={{ display: "flex" }}>
{props.speakerImages.map((image, index) => (
<img
key={image}
src={image}
style={{
borderRadius: 100,
width: 80,
height: 80,
marginLeft: index === 0 ? 0 : -25,
border: "solid 4px black",
}}
/>
))}
</div>
);
};
🧰 Tools
🪛 Biome (2.1.2)

[error] 5-14: Missing key property for this element in iterable.

The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.

(lint/correctness/useJsxKeyInIterable)

🤖 Prompt for AI Agents
In src/generated-assets/components/RoundedSpeakers.tsx around lines 1 to 18, the
<img> elements rendered inside props.speakerImages.map lack a unique key prop;
add a stable unique key on the <img> (for example key={image ??
`speaker-${index}`} or key={`speaker-${index}`} if images may not be unique) to
satisfy React's list reconciliation, leaving other attributes unchanged.

Comment on lines +225 to +226
{event.data._computed.city?.data.name},{" "}
{event.data._computed.country?.data.name}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Add null-safety for city and country data.

The code directly accesses event.data._computed.city?.data.name and event.data._computed.country?.data.name without checking if city or country themselves are defined. If these computed fields are null or undefined, this will cause a runtime error.

Apply this diff to add defensive checks:

-              {event.data._computed.city?.data.name},{" "}
-              {event.data._computed.country?.data.name}
+              {event.data._computed.city?.data.name ?? "Unknown City"},{" "}
+              {event.data._computed.country?.data.name ?? "Unknown Country"}

Or conditionally render the entire block:

+            {event.data._computed.city && event.data._computed.country && (
             <div
               style={{
                 display: "flex",
                 fontSize: 26,
                 fontWeight: 500,
                 lineHeight: 1.2,
                 textTransform: "uppercase",
                 opacity: 0.6,
               }}
             >
               {event.data._computed.city.data.name},{" "}
               {event.data._computed.country.data.name}
             </div>
+            )}
📝 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.

Suggested change
{event.data._computed.city?.data.name},{" "}
{event.data._computed.country?.data.name}
{event.data._computed.city?.data.name ?? "Unknown City"},{" "}
{event.data._computed.country?.data.name ?? "Unknown Country"}
🤖 Prompt for AI Agents
In src/pages/events/[id]/assets/_d-1-announcement-insta.tsx around lines
225-226, the code directly accesses event.data._computed.city?.data.name and
event.data._computed.country?.data.name which can throw if city or country are
null/undefined; update the render to first check that event.data._computed.city
and event.data._computed.country exist (or use optional chaining for each level:
event.data._computed.city?.data?.name and
event.data._computed.country?.data?.name), provide sensible fallbacks (empty
string or "Unknown") and ensure you don’t render a stray comma when one value is
missing by conditionally joining the non-empty parts or conditionally rendering
the entire city/country block only when at least one value is present.

@yoannfleurydev
Copy link
Member

As a follow up, it could be awesome to make the "people count" dynamic when the Luma id is given

image

@yoannfleurydev yoannfleurydev merged commit 8d98e37 into main Oct 28, 2025
3 checks passed
@yoannfleurydev yoannfleurydev deleted the feat/d-1-announcement-assets branch October 28, 2025 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

D-1 annoucement asset

3 participants