Skip to content

Implement custom Youtube playlist viewer for research videos#47

Open
Piyushbijarania wants to merge 2 commits into
StabilityNexus:mainfrom
Piyushbijarania:main
Open

Implement custom Youtube playlist viewer for research videos#47
Piyushbijarania wants to merge 2 commits into
StabilityNexus:mainfrom
Piyushbijarania:main

Conversation

@Piyushbijarania

@Piyushbijarania Piyushbijarania commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

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:

image

AI Usage Disclosure:

Check one of the checkboxes below:

  • This PR does not contain AI-generated code at all.
  • This PR contains AI-generated code. I have read the AI Usage Policy and this PR complies with this policy. I have tested the code locally and I am responsible for it.

I have used the following AI models and tools: Gemini

Checklist

  • My PR addresses a single issue, fixes a single bug or makes a single improvement.
  • My code follows the project's code style and conventions
  • If applicable, I have made corresponding changes or additions to the documentation
  • If applicable, I have made corresponding changes or additions to tests
  • My changes generate no new warnings or errors
  • I have joined the Discord server and I will share a link to this PR with the project maintainers there
  • I have read the Contribution Guidelines
  • Once I submit my PR, CodeRabbit AI will automatically review it and I will address CodeRabbit's comments.
  • I have filled this PR template completely and carefully, and I understand that my PR may be closed without review otherwise.

Summary by CodeRabbit

  • New Features
    • Replaced the "Featured Videos" section with an interactive "Research Talks" module featuring an embedded YouTube player
    • Added a scrollable playlist sidebar with video durations and visual selection indicators
    • Implemented multiple playback modes including autoplay and clickable thumbnail overlays
    • Added a link to the Stability Nexus YouTube channel
    • Optimized YouTube loading performance with preconnect hints

@coderabbitai

coderabbitai Bot commented Jun 13, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

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

Changes

Interactive YouTube Research Talks Player

Layer / File(s) Summary
Enable client-side interactivity
app/research/page.tsx
The component is marked as a client component with "use client" and imports useState to support interactive state management.
YouTube player with playlist and state
app/research/page.tsx
Replaces the featured-videos grid with a "Research Talks" section featuring an embedded YouTube-nocookie player that toggles between an autoplaying iframe (when playing) and a clickable thumbnail overlay (when paused). A videos playlist constant defines video metadata including YouTube IDs and durations. Component state tracks the activeVideo index and isPlaying flag. A scrollable sidebar lists all videos with selection styling that updates state and triggers playback. YouTube preconnect links are added for performance, and a channel link directs users to the Stability Nexus YouTube channel.

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested labels

Typescript Lang

🐰 A rabbit's whiskers twitch with delight,

As research talks now play day and night!

YouTube flows smooth with playlist so bright,

Where scholars can click and select videos right. 🎬

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: implementing a custom YouTube playlist viewer for research videos, which aligns with the primary modification to app/research/page.tsx.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
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
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between 5d8bf1b and ef8ac79.

📒 Files selected for processing (1)
  • app/research/page.tsx

Comment thread app/research/page.tsx Outdated
Comment thread app/research/page.tsx
Comment thread app/research/page.tsx Outdated
@reach2saksham

Copy link
Copy Markdown
Member

Peer Review Done, this is ready to merge

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