Implement custom Youtube playlist viewer for research videos#47
Implement custom Youtube playlist viewer for research videos#47Piyushbijarania wants to merge 2 commits into
Conversation
WalkthroughThe research page is converted from a static server-rendered component displaying featured videos to an interactive client-side component featuring a YouTube video player with playlist functionality. The page now manages playback state and allows users to select videos from a scrollable sidebar that updates the displayed player. ChangesInteractive YouTube Research Talks Player
🎯 2 (Simple) | ⏱️ ~10 minutes Suggested labels
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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: 3
🤖 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 `@app/research/page.tsx`:
- Around line 169-230: Externalize all user-facing strings into i18n resource
keys: replace the hardcoded video titles in the videos array (symbol: videos)
with translation keys and move their English text into the i18n resource file
(app/research/page.tsx 169-230), and replace the UI text strings used in the
Research Talks section (section heading "Research Talks", description, playlist
label, channel link text — locations: app/research/page.tsx 378-489) with
t('...')/useTranslation lookups and corresponding keys in the resource file;
ensure keys are descriptive (e.g., research.videos.<slug>.title,
research.section.heading, research.section.description, research.playlist.label,
research.channel.link) and update any rendering code that reads videos to use
translated titles so the UI shows localized strings.
- Line 3: The import is bringing a type (ComponentProps) as a runtime import;
change it to a type-only import and keep hooks as runtime imports: replace the
single import statement that references ComponentProps and useState so that
ComponentProps is imported with "import type { ComponentProps } from 'react'"
and useState remains a normal import (e.g., "import { useState } from 'react'")
to follow TypeScript guidelines and improve build performance; update the
import(s) in app/research/page.tsx where ComponentProps is referenced.
- Around line 401-425: The overlay uses a non-interactive div with onClick which
is not keyboard-accessible; replace that div with a semantic interactive element
(preferably a <button>) or if keeping a div, add role="button", tabIndex={0},
and an onKeyDown handler that calls setIsPlaying(true) on Enter and Space, and
add an accessible label such as aria-label={`Play ${activeVideo.title}`} so
screen readers announce the action; ensure you preserve the existing className
("group/thumb absolute inset-0 size-full cursor-pointer") and transfer any
styling to the button, and keep using activeVideo.id and activeVideo.title for
the thumbnail src and aria text.
🪄 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: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: ed6957ce-8f7f-4239-a33e-5f6b2834059b
📒 Files selected for processing (1)
app/research/page.tsx
… optimize TypeScript imports
|
Peer Review Done, this is ready to merge |
A single, clean custom playlist player card.
a scrollable sidebar listing all 12 Stability Workshop videos, clicking any list item loads that video in the player.
Screenshots/Recordings:
AI Usage Disclosure:
Check one of the checkboxes below:
I have used the following AI models and tools: Gemini
Checklist
Summary by CodeRabbit