Skip to content

Conversation

@luclu7
Copy link
Member

@luclu7 luclu7 commented Oct 7, 2025

Summary by CodeRabbit

  • New Features

    • Added a unified launchpad with quick-access tiles (Artists, Map, Rewards, Scanner, Rules, Settings), responsive layout and QR scanner integration.
  • Refactor

    • Rallyists homepage now uses the new launchpad instead of individual buttons, streamlining navigation.
  • Documentation

    • Added Storybook story for the launchpad and adjusted decorator execution order.
  • UI / Content

    • Simplified rally instructions to concise, stamp-focused guidance and reduced intro icons.
  • Localization

    • French label changed ("Paramètres" → "Réglages") and English rally text updated.
  • Tests

    • Updated test expectations for the shortened rally instruction list.

@luclu7 luclu7 self-assigned this Oct 7, 2025
@coderabbitai
Copy link

coderabbitai bot commented Oct 7, 2025

Walkthrough

Adds a new HomepageLaunchpad component and Storybook story, replaces prior navigation controls in RallyistsHomepage with the launchpad, reorders a Storybook decorator, updates Intro icon usage and translations (EN/FR), and adjusts French wording.

Changes

Cohort / File(s) Summary of Changes
HomepageLaunchpad component
web/src/components/HomepageLaunchpad.tsx
New default-exported HomepageLaunchpad React component rendering two responsive grids of launch items (link tiles and an action tile). Uses QR drawer context to open the QR scanner.
HomepageLaunchpad story
web/src/components/HomepageLaunchpad.stories.tsx
New Storybook story: meta default export typed Meta<typeof HomepageLaunchpad>, Story type alias and Default story export; includes decorators.
RallyistsHomepage component
web/src/components/routes/rallyists/RallyistsHomepage.tsx
Removed useTranslation calls and ButtonLink/QRCodeLink controls; now imports and renders HomepageLaunchpad inside the existing showIntro conditional.
RallyistsHomepage story
web/src/components/routes/rallyists/RallyistsHomepage.stories.tsx
Reordered decorators so QRDrawerContextProviderDecorator runs before RouterDecorator.
Intro component
web/src/components/Intro.tsx
Reduced icons to QrCode and TicketCheck; swapped some t(...) calls for Trans, updated consts import path, and trimmed rally list items.
Translations (EN / FR)
web/src/i18n/en.json, web/src/i18n/fr.json
Condensed/rewrote rally text entries; adjusted French phrasing and changed settings title ("Paramètres""Réglages").
Tests
web/src/components/routes/rallyists/Rules.test.tsx
Updated test expectation: first list item count changed from 6 to 2 to match condensed rally copy.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant RH as RallyistsHomepage
  participant HL as HomepageLaunchpad
  participant QR as QRDrawerContext
  participant Router as Router

  User->>RH: Open Rallyists homepage
  RH->>HL: Render HomepageLaunchpad (when showIntro true)
  Note over HL: Two grids — link tiles + QR tile

  alt Click QR tile
    User->>HL: Click "QR scanner"
    HL->>QR: openDrawer()
    QR-->>User: QR drawer opens
  else Click link tile
    User->>HL: Click link tile
    HL->>Router: navigate(route)
    Router-->>User: Page navigated
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

New launch tiles hum like a VTuber stream, ✨
Click to dash through routes or scan a glowing beam.
Decorators lined up, context ready to play,
QR pops open — off you go, oshi-led way. 🎮🚀

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title succinctly describes the primary change of swapping out the homepage’s list for the new “Launchpad” component, matching the core update in the pull request without extraneous detail.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch new-homepage-buttons

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d2c8812 and faf9fda.

📒 Files selected for processing (1)
  • web/src/i18n/en.json (1 hunks)

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.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Oct 7, 2025

Deploying sedeto-vtube-stamp-rally with  Cloudflare Pages  Cloudflare Pages

Latest commit: faf9fda
Status: ✅  Deploy successful!
Preview URL: https://61b14974.sedeto-vtube-stamp-rally.pages.dev
Branch Preview URL: https://new-homepage-buttons.sedeto-vtube-stamp-rally.pages.dev

View logs

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: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6fb94ba and 7242c3a.

📒 Files selected for processing (4)
  • web/src/components/HomepageLaunchpad.stories.tsx (1 hunks)
  • web/src/components/HomepageLaunchpad.tsx (1 hunks)
  • web/src/components/routes/rallyists/RallyistsHomepage.stories.tsx (1 hunks)
  • web/src/components/routes/rallyists/RallyistsHomepage.tsx (2 hunks)
🧰 Additional context used
🧬 Code graph analysis (3)
web/src/components/HomepageLaunchpad.stories.tsx (1)
web/src/lib/decorators.tsx (2)
  • QRDrawerContextProviderDecorator (205-218)
  • RouterDecorator (46-63)
web/src/components/HomepageLaunchpad.tsx (1)
web/src/contexts/useQRDrawerContext.ts (1)
  • useQRDrawerContext (5-5)
web/src/components/routes/rallyists/RallyistsHomepage.stories.tsx (1)
web/src/lib/decorators.tsx (1)
  • RouterDecorator (46-63)
🪛 Biome (2.1.2)
web/src/components/HomepageLaunchpad.tsx

[error] 3-3: Do not shadow the global "Map" property.

Consider renaming this variable. It's easy to confuse the origin of variables when they're named after a known global.

(lint/suspicious/noShadowRestrictedNames)

🔇 Additional comments (6)
web/src/components/HomepageLaunchpad.tsx (3)

40-58: Sugoi! Nice discriminated union pattern.

The type definitions using discriminated unions (GridElementLink vs GridElementButton) ensure type safety by making link and onClick mutually exclusive. This is a clean pattern that prevents invalid states at compile time. Sasuga TypeScript~!


63-115: Verify that removing i18n support is intentional.

Ara ara~ I notice all the text strings are now hardcoded in French ("Artistes", "Carte", "Récompenses", "Scanner", "Règles", "Paramètres"). Since the AI summary mentions translations were removed from RallyistsHomepage.tsx, this suggests the app is now French-only.

If multi-language support was previously available and is still needed, these strings should be externalised using a translation system. If French-only is the intended direction, then this is perfectly fine!

Could you confirm whether:

  1. The app is intentionally French-only going forward?
  2. Or should these strings be prepared for future i18n support?

If i18n is still desired, I can help generate a translation-ready version of this component.


8-38: LGTM! Clean conditional rendering.

The GridItem component elegantly handles both link and button cases with proper type discrimination. The styling and structure are well thought out, and the hover effects (hover:shadow-md) add nice polish to the UI.

web/src/components/HomepageLaunchpad.stories.tsx (1)

1-19: Storybook setup looks comfy~!

The story configuration is clean and follows Storybook best practices. The decorator order (QRDrawerContextProviderDecorator → RouterDecorator) ensures proper context nesting, and the Default story with an empty object is the standard pattern for components with no required props.

web/src/components/routes/rallyists/RallyistsHomepage.stories.tsx (1)

15-19: Peko! Decorator reordering improves consistency.

Moving RouterDecorator to the end of the decorators array places it as the outermost wrapper, which makes sense for routing context. This also matches the decorator order in HomepageLaunchpad.stories.tsx, creating consistency across your story files.

The new execution order (TanStackQuery → QRDrawerContext → Router) is logically sound!

web/src/components/routes/rallyists/RallyistsHomepage.tsx (1)

5-5: Kawaii~! Clean integration of the new launchpad.

The replacement of the old button-based navigation with HomepageLaunchpad is straightforward and maintains the existing showIntro logic. The component is properly imported and rendered within a container with appropriate spacing.

This refactor simplifies the homepage by delegating navigation to the dedicated launchpad component, which is a nice separation of concerns!

Also applies to: 25-27

@luclu7 luclu7 force-pushed the new-homepage-buttons branch from 7242c3a to 3fcb4e0 Compare October 7, 2025 14:56
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: 0

♻️ Duplicate comments (1)
web/src/components/HomepageLaunchpad.tsx (1)

1-14: Yatta~! Import organisation is solid.

I see the past review concern about Map shadowing the global has already been addressed—you're using MapIcon throughout. The imports are clean and well-organised. Good stuff!

🧹 Nitpick comments (1)
web/src/components/HomepageLaunchpad.tsx (1)

16-46: GridItem component looks great!

The conditional rendering logic for Link vs button is clean and type-safe. The component handles both navigation and action items elegantly.

If you want to polish the accessibility a bit more (totally optional!), consider these small tweaks:

  1. Add explicit type="button" to the button element (line 42)
  2. Add aria-hidden="true" to the icon elements since they're decorative (text labels are present)

Apply this diff for the button type:

   if (link) return <Link to={link}>{content}</Link>;
   return (
-    <button onClick={onClick} className="w-full cursor-pointer">
+    <button type="button" onClick={onClick} className="w-full cursor-pointer">
       {content}
     </button>

For the icons, you can add aria-hidden="true" when they're rendered (lines 75, 83, 91, 99, 110, 118), but since they're always paired with text labels, this is really just a nice-to-have polish~

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7242c3a and 3fcb4e0.

📒 Files selected for processing (5)
  • web/src/components/HomepageLaunchpad.stories.tsx (1 hunks)
  • web/src/components/HomepageLaunchpad.tsx (1 hunks)
  • web/src/components/routes/rallyists/RallyistsHomepage.stories.tsx (1 hunks)
  • web/src/components/routes/rallyists/RallyistsHomepage.tsx (2 hunks)
  • web/src/i18n/fr.json (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • web/src/components/routes/rallyists/RallyistsHomepage.stories.tsx
  • web/src/components/routes/rallyists/RallyistsHomepage.tsx
🧰 Additional context used
🧬 Code graph analysis (2)
web/src/components/HomepageLaunchpad.tsx (1)
web/src/contexts/useQRDrawerContext.ts (1)
  • useQRDrawerContext (5-5)
web/src/components/HomepageLaunchpad.stories.tsx (1)
web/src/lib/decorators.tsx (2)
  • QRDrawerContextProviderDecorator (205-218)
  • RouterDecorator (46-63)
🔇 Additional comments (4)
web/src/i18n/fr.json (1)

404-404: Sugoi~! Translation update looks clean.

The change from "Paramètres" to "Réglages" is a nice refinement for the settings label. Both are valid, but "Réglages" flows better in UI contexts. No concerns here!

web/src/components/HomepageLaunchpad.stories.tsx (1)

1-19: Kawaii~! Your Storybook setup is spot-on.

The story structure follows best practices for Storybook 8.x. The decorator order makes perfect sense—QR drawer context first, then routing infrastructure. The empty Default story is exactly what you need for a component with no required props. Sasuga!

web/src/components/HomepageLaunchpad.tsx (2)

48-65: Type definitions are chef's kiss!

The discriminated union approach with GridElementLink and GridElementButton is exactly how you handle this kind of conditional logic in TypeScript. The types prevent impossible states (like having both link and onClick), and the base type keeps things DRY. Sasuga developer-san!


67-139: The launchpad implementation is poggers!

The main component logic is well-structured:

  • Clean separation of the two grids (main navigation 2x2 + secondary options 1x2)
  • Proper context usage for the QR drawer
  • Translation keys are correctly referenced
  • The styling with rounded corners creates a nice cohesive tile aesthetic
  • Key generation using element.title is appropriate

The overall architecture is solid and maintainable. This launchpad design is going to look really slick in the UI!

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: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3fcb4e0 and 3e8ae39.

📒 Files selected for processing (3)
  • web/src/components/Intro.tsx (2 hunks)
  • web/src/i18n/en.json (1 hunks)
  • web/src/i18n/fr.json (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • web/src/i18n/fr.json
🧰 Additional context used
🧬 Code graph analysis (1)
web/src/components/Intro.tsx (1)
web/src/lib/consts.ts (1)
  • standardRewardMinStampsRequirement (77-77)
🔇 Additional comments (4)
web/src/i18n/en.json (1)

332-332: Solid Trans-ready translation key! Sasuga!

The template structure with the <1> placeholder for strong emphasis and {{minimumStampsCount}} variable is spot-on for the Trans component wiring in Intro.tsx. Chat will understand exactly where to go for their gacha—I mean, reward!

web/src/components/Intro.tsx (3)

1-2: Clean import optimization! Very seiso!

Narrowing the lucide-react imports to just the icons you're actually using and adding Trans for i18n interpolation keeps the bundle nice and tidy. Good housekeeping in the codebase!


4-4: Import path simplification looks good!

Dropping the .ts extension is perfectly valid for TypeScript module resolution. The module system handles this automatically, so this change is poggers.


21-30: Trans component wiring is chef's kiss! 草

The Trans component is properly configured with:

  • Correct t and i18nKey props
  • Strong wrapper for inline emphasis via components={{ 1: <strong /> }}
  • minimumStampsCount passed through values prop

This matches perfectly with the translation structure in en.json (once that grammar issue is fixed). The stamp count will dynamically render with proper emphasis, making it crystal clear for rally participants!

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: 1

♻️ Duplicate comments (1)
web/src/i18n/en.json (1)

331-331: Sentence still incomplete, senpai noticed~

The past review comment is still valid - the sentence ends with "participating artists" but doesn't specify what they're participating in. It's like ending a stream mid-sentence, chat would be confused!

Apply this diff to complete the sentence:

-    "1": "Get a stamp by making a purchase (minimum 2€) from one of the 16 participating artists",
+    "1": "Get a stamp by making a purchase (minimum 2€) from one of the 16 artists participating in the rally",
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3e8ae39 and d2c8812.

📒 Files selected for processing (2)
  • web/src/components/routes/rallyists/Rules.test.tsx (1 hunks)
  • web/src/i18n/en.json (1 hunks)
🔇 Additional comments (1)
web/src/components/routes/rallyists/Rules.test.tsx (1)

19-19: LGTM! Test updated to match the new rally description, poi~

The assertion correctly reflects the condensed rally description that went from 6 points to 2 points. This change keeps the test in sync with the translation updates - totally seiso!

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@luclu7 luclu7 merged commit 9a08983 into main Oct 15, 2025
10 checks passed
@luclu7 luclu7 deleted the new-homepage-buttons branch October 15, 2025 21:00
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