Skip to content

Feat/design adjustment apply now#97

Merged
niklas1simakov merged 10 commits intomainfrom
feat/design-adjustment-apply-now
Apr 10, 2026
Merged

Feat/design adjustment apply now#97
niklas1simakov merged 10 commits intomainfrom
feat/design-adjustment-apply-now

Conversation

@niklas1simakov
Copy link
Copy Markdown
Contributor

@niklas1simakov niklas1simakov commented Apr 10, 2026

Summary by CodeRabbit

  • New Features

    • Reusable event tile component for consistent cards, supporting external CTAs and customizable disabled labels.
    • Events slider gains mouse-drag scrolling and an automatic scroll indicator.
  • Bug Fixes

    • Application banner capitalization corrected.
  • Refactor

    • Event lists and join-start now use composed hero/card layout; join-start page rendering now derives/receives live state.
  • UI

    • For Partners hero no longer hides children on mobile.

Add titleClassName, descriptionClassName, and childrenWrapperClassName
props. Change description type from string to ReactNode.
Replace inline hero section with reusable Hero component and adjust
countdown card styling for mobile responsiveness.
Reduce hero height on mobile so the timer card is partially
visible above the fold, encouraging users to scroll.
Constrain countdown card at lg breakpoint, widen hero text container,
and fix layout stretch on mid-size devices.
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 10, 2026

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

Project Deployment Actions Updated (UTC)
start-munich Ready Ready Preview, Comment Apr 10, 2026 2:28pm

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 10, 2026

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

Event card markup was extracted to a new UpcomingEventTile component. Join-start launch gating moved from client-side query logic into the async page which computes isLive and passes it to JoinStartClient. Hero and event/scroll components received prop and API changes for CTA, layout, and internal scroll handling.

Changes

Cohort / File(s) Summary
New Event Tile Component
components/UpcomingEventTile.tsx
Adds UpcomingEventTile default export and UpcomingEventTileProps. Renders card image/title/date/description, optional outer link, CTA (external link or disabled label), and styling hooks (className, hiddenClassName).
Event Rendering & Grid
app/events/UpcomingEventsGrid.tsx, app/events/EventsContent.tsx
Replaces inline event card markup with UpcomingEventTile; removes inline anchor attributes and class-driven mobile-hide logic. Removes external scrollProgress usage and scroll-smooth from slider container; adds select-none.
Join-start Page & Client
app/join-start/2026/page.tsx, app/join-start/2026/JoinStartClient.tsx
page.tsx is now async, computes isLive from searchParams or LAUNCH_DATE and passes it to JoinStartClient. JoinStartClient now requires isLive prop, removes useSearchParams, composes Hero/HeroCard, renders events via UpcomingEventTile, and adds mouse-drag slider + ScrollIndicator wiring.
EventCard API & ScrollIndicator refactor
components/EventComponents.tsx
Adds ctaLabel, ctaHref, ctaDisabledLabel to EventCardProps and prioritizes CTA rendering over prior onClick fallback. ScrollIndicator API changed: sliderRef type updated, scrollProgress made optional/removed; internal state/effects now compute thumb size/position and pointer-drag mapping.
Hero API & usage tweaks
components/Hero.tsx, app/for-partners/page.tsx
HeroProps.description -> React.ReactNode; added titleClassName, descriptionClassName, childrenWrapperClassName. Layout class adjustments and removed hideChildrenOnMobile usage in for-partners page.
Minor text/format fixes
app/home/HomeClient.tsx
Banner capitalization tweak and ensure newline at EOF.

Sequence Diagram(s)

sequenceDiagram
  participant Browser
  participant Server as JoinStart Page (server)
  participant JoinClient as JoinStartClient
  participant Tile as UpcomingEventTile

  Browser->>Server: Request /join-start/2026 (optional ?beta=true)
  Server-->>Browser: HTML with isLive (computed from beta or LAUNCH_DATE)
  Browser->>JoinClient: Hydrate JoinStartClient (receives isLive)
  JoinClient->>JoinClient: choose hero/content based on isLive
  JoinClient->>Tile: render multiple UpcomingEventTile (props: title, date, image, cta...)
  Tile->>Browser: user clicks CTA or card -> open external link (target=_blank) or show disabled label
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

  • important changes #93: Modifies JoinStartClient event entries, images, and CTA labels in the same join-start area now refactored to use UpcomingEventTile.

Poem

🐰 I stitched a tile from props and light,
Server set the launch, day turned to night,
CTAs pop with tiny sparks of flight,
Heroes flexed classes, tiles tucked just right,
Hop, click, scroll — the events feel bright! ✨

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'Feat/design adjustment apply now' is vague and doesn't clearly convey the main changes, which involve component refactoring, prop additions, and feature updates across multiple files. Use a more descriptive title that captures the primary objective, such as 'Refactor event cards and hero components with new CTA handling' or 'Extract UpcomingEventTile component and improve event/hero configuration'.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch feat/design-adjustment-apply-now

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.

❤️ Share

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

Copy link
Copy Markdown

@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.

🧹 Nitpick comments (3)
components/UpcomingEventTile.tsx (2)

30-38: Consider using next/image for image optimization.

The component uses a native <img> tag for imageUrl. For external images that are known at build time, consider using Next.js <Image> component for automatic optimization (lazy loading, responsive sizing, format conversion). However, if images are dynamically sourced from various external URLs, the current approach is acceptable.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@components/UpcomingEventTile.tsx` around lines 30 - 38, Replace the native
<img> in UpcomingEventTile with Next.js Image for optimization when imageUrl
points to static or allowed-host images: import Image from 'next/image', use the
Image component instead of the img tag (keeping alt={title} and the same
classes), provide explicit width and height (or use responsive/layout="fill"
with a wrapper) and ensure external domains are listed in next.config.js or set
unoptimized when necessary; otherwise keep the current <img> for fully dynamic
external URLs and adjust the imageUrl prop type on UpcomingEventTile
accordingly.

79-79: Minor: class string may contain extra spaces.

When hiddenClassName or className are empty strings (their defaults), the concatenation produces extra spaces. Consider using a utility like cn() (which is available in @/lib/utils per Hero.tsx) for cleaner class merging.

♻️ Suggested improvement
+import { cn } from "@/lib/utils"
+
 // ...
 
-  const classes = `group relative bg-white/5 rounded-2xl overflow-hidden transition-all duration-500 hover:scale-[1.02] shadow-lg shadow-black/20 hover:shadow-xl hover:shadow-black/40 flex flex-col ${hiddenClassName} ${className}`.trim()
+  const classes = cn(
+    "group relative bg-white/5 rounded-2xl overflow-hidden transition-all duration-500 hover:scale-[1.02] shadow-lg shadow-black/20 hover:shadow-xl hover:shadow-black/40 flex flex-col",
+    hiddenClassName,
+    className
+  )
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@components/UpcomingEventTile.tsx` at line 79, The class string concatenation
in UpcomingEventTile creates extra spaces when hiddenClassName or className are
empty; replace the manual template literal that builds the classes constant with
a call to the cn utility (import cn from "@/lib/utils" as used in Hero.tsx) to
merge the base classes with hiddenClassName and className (e.g., cn("group
relative bg-white/5 rounded-2xl overflow-hidden transition-all duration-500
hover:scale-[1.02] shadow-lg shadow-black/20 hover:shadow-xl
hover:shadow-black/40 flex flex-col", hiddenClassName, className)) so empty
values are handled cleanly and remove the manual .trim() handling.
app/join-start/2026/JoinStartClient.tsx (1)

100-100: Remove unused isClosed state or add TODO comment for future use.

The isClosed state is set on line 108 based on the countdown logic (setIsClosed(rawDiff <= 0)) but is never referenced in the component's rendered output. If this is intended for a future feature (e.g., displaying an "applications closed" message), add a TODO comment. Otherwise, remove both the state declaration and the setter call.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/join-start/2026/JoinStartClient.tsx` at line 100, The isClosed state
(const [isClosed, setIsClosed]) in JoinStartClient is unused in rendering;
either remove the state declaration and the setIsClosed(...) call inside the
countdown logic, or if you plan to use it later add a clear TODO comment above
the declaration referencing isClosed and setIsClosed so future work knows it
controls the "applications closed" UI; update the code in JoinStartClient
accordingly to keep state and effects consistent.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@app/join-start/2026/JoinStartClient.tsx`:
- Line 100: The isClosed state (const [isClosed, setIsClosed]) in
JoinStartClient is unused in rendering; either remove the state declaration and
the setIsClosed(...) call inside the countdown logic, or if you plan to use it
later add a clear TODO comment above the declaration referencing isClosed and
setIsClosed so future work knows it controls the "applications closed" UI;
update the code in JoinStartClient accordingly to keep state and effects
consistent.

In `@components/UpcomingEventTile.tsx`:
- Around line 30-38: Replace the native <img> in UpcomingEventTile with Next.js
Image for optimization when imageUrl points to static or allowed-host images:
import Image from 'next/image', use the Image component instead of the img tag
(keeping alt={title} and the same classes), provide explicit width and height
(or use responsive/layout="fill" with a wrapper) and ensure external domains are
listed in next.config.js or set unoptimized when necessary; otherwise keep the
current <img> for fully dynamic external URLs and adjust the imageUrl prop type
on UpcomingEventTile accordingly.
- Line 79: The class string concatenation in UpcomingEventTile creates extra
spaces when hiddenClassName or className are empty; replace the manual template
literal that builds the classes constant with a call to the cn utility (import
cn from "@/lib/utils" as used in Hero.tsx) to merge the base classes with
hiddenClassName and className (e.g., cn("group relative bg-white/5 rounded-2xl
overflow-hidden transition-all duration-500 hover:scale-[1.02] shadow-lg
shadow-black/20 hover:shadow-xl hover:shadow-black/40 flex flex-col",
hiddenClassName, className)) so empty values are handled cleanly and remove the
manual .trim() handling.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b80b1153-1276-49aa-8874-6e374f04297c

📥 Commits

Reviewing files that changed from the base of the PR and between 4f3b095 and f5eceb9.

📒 Files selected for processing (8)
  • app/events/UpcomingEventsGrid.tsx
  • app/for-partners/page.tsx
  • app/home/HomeClient.tsx
  • app/join-start/2026/JoinStartClient.tsx
  • app/join-start/2026/page.tsx
  • components/EventComponents.tsx
  • components/Hero.tsx
  • components/UpcomingEventTile.tsx
💤 Files with no reviewable changes (1)
  • app/for-partners/page.tsx

Make the countdown card and apply button visible without scrolling on
mobile by reducing the hero min-height and hiding the "Don't miss your
chance" text on small screens.
Remove dead isClosed state in JoinStartClient that caused unnecessary
re-renders. Switch UpcomingEventTile to cn() for cleaner class string
handling when hiddenClassName or className are empty.
Copy link
Copy Markdown

@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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
app/join-start/2026/JoinStartClient.tsx (1)

102-119: ⚠️ Potential issue | 🟠 Major

Use isClosed to switch the CTA and stop the timer at the deadline.

isClosed is updated every second, but this branch never consumes it. After TARGET_DATE, the page still shows a live “Start Application” button, and the interval keeps rerendering the component every second at 00:00:00.

Suggested fix
   useEffect(() => {
     setMounted(true)
-    const update = () => {
+    const update = () => {
       const now = Date.now()
       const rawDiff = TARGET_DATE - now
       const diff = Math.max(0, rawDiff)
-      setIsClosed(rawDiff <= 0)
+      const closed = rawDiff <= 0
+      setIsClosed(closed)
       setTimeLeft({
         days: Math.floor(diff / (1000 * 60 * 60 * 24)),
         hours: Math.floor((diff / (1000 * 60 * 60)) % 24),
         minutes: Math.floor((diff / (1000 * 60)) % 60),
         seconds: Math.floor((diff / 1000) % 60),
       })
+      return closed
     }
-    update()
-    const interval = setInterval(update, 1000)
+    if (update()) return
+
+    const interval = setInterval(() => {
+      if (update()) clearInterval(interval)
+    }, 1000)
+
     return () => clearInterval(interval)
   }, [])
-          <p className="text-center text-xs font-bold uppercase tracking-[0.35em] text-white/75 sm:text-sm">
-            Applications close in
-          </p>
+          <p className="text-center text-xs font-bold uppercase tracking-[0.35em] text-white/75 sm:text-sm">
+            {isClosed ? 'Applications closed' : 'Applications close in'}
+          </p>

-          <a
-            href="https://tally.so/r/eqL4yQ"
-            target="_blank"
-            rel="noopener noreferrer"
-            className="mt-6 inline-flex w-full items-center justify-center rounded-xl bg-brand-pink px-8 py-3 font-bold text-white transition-all duration-300 hover:shadow-[0_0_30px_rgba(208,0,111,0.4)]"
-          >
-            Start Application
-          </a>
+          {isClosed ? (
+            <span className="mt-6 inline-flex w-full items-center justify-center rounded-xl bg-brand-pink/50 px-8 py-3 font-bold text-white/80">
+              Applications Closed
+            </span>
+          ) : (
+            <a
+              href="https://tally.so/r/eqL4yQ"
+              target="_blank"
+              rel="noopener noreferrer"
+              className="mt-6 inline-flex w-full items-center justify-center rounded-xl bg-brand-pink px-8 py-3 font-bold text-white transition-all duration-300 hover:shadow-[0_0_30px_rgba(208,0,111,0.4)]"
+            >
+              Start Application
+            </a>
+          )}

Also applies to: 168-201

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/join-start/2026/JoinStartClient.tsx` around lines 102 - 119, The timer
effect updates isClosed but never stops the interval or switches the CTA; modify
the useEffect/update logic in JoinStartClient (functions: useEffect, update,
setIsClosed, setTimeLeft, TARGET_DATE, clearInterval) so that when rawDiff <= 0
you set isClosed true, set timeLeft to all zeros, and clearInterval(interval)
(or stop scheduling further ticks) to prevent continued rerenders; also ensure
the render path that shows the CTA reads isClosed to display the
closed/alternative CTA instead of the live “Start Application” button.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@app/join-start/2026/JoinStartClient.tsx`:
- Around line 102-119: The timer effect updates isClosed but never stops the
interval or switches the CTA; modify the useEffect/update logic in
JoinStartClient (functions: useEffect, update, setIsClosed, setTimeLeft,
TARGET_DATE, clearInterval) so that when rawDiff <= 0 you set isClosed true, set
timeLeft to all zeros, and clearInterval(interval) (or stop scheduling further
ticks) to prevent continued rerenders; also ensure the render path that shows
the CTA reads isClosed to display the closed/alternative CTA instead of the live
“Start Application” button.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 3061704c-752e-4212-a083-9b08375c0c98

📥 Commits

Reviewing files that changed from the base of the PR and between f5eceb9 and 602695c.

📒 Files selected for processing (1)
  • app/join-start/2026/JoinStartClient.tsx

…ements

ScrollIndicator now owns its own scroll listener and ResizeObserver,
eliminating stale state issues where the thumb didn't track content
scrolling or respond to clicks. Removed redundant scrollProgress state
from events, member-journey, and join-start pages.

Also added select-none to all drag-scrollable containers to prevent
text selection while dragging, and removed scroll-smooth from the
events slider which was fighting with programmatic drag scrolling.
@niklas1simakov niklas1simakov merged commit 949bf44 into main Apr 10, 2026
2 of 3 checks passed
@niklas1simakov niklas1simakov deleted the feat/design-adjustment-apply-now branch April 10, 2026 14:29
@coderabbitai coderabbitai Bot mentioned this pull request Apr 10, 2026
@coderabbitai coderabbitai Bot mentioned this pull request Apr 18, 2026
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.

2 participants