|
|
|
|
@ -0,0 +1,220 @@
|
|
|
|
|
# Movie Card Component – Design & Specification (No-Code Contribution)
|
|
|
|
|
|
|
|
|
|
This document defines the full structure, behavior, and design requirements for the **Movie Card component** requested in Issue #1053.
|
|
|
|
|
It provides a clear blueprint for future contributors to implement the UI component without ambiguity.
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
## 1. Purpose of the Movie Card
|
|
|
|
|
Users currently have no visually appealing way to browse movie information.
|
|
|
|
|
This component aims to provide:
|
|
|
|
|
|
|
|
|
|
- Quick movie overview
|
|
|
|
|
- Simple, modern visual card
|
|
|
|
|
- Lightweight hover interactions
|
|
|
|
|
- Aesthetic styles (Glassmorphism / Neon)
|
|
|
|
|
|
|
|
|
|
This specification does **not** include code, only structure and design.
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
## 2. Required Data (Component Props)
|
|
|
|
|
|
|
|
|
|
The Movie Card will accept the following props/data:
|
|
|
|
|
|
|
|
|
|
```json
|
|
|
|
|
{
|
|
|
|
|
"title": "Movie Title",
|
|
|
|
|
"year": 2022,
|
|
|
|
|
"rating": 8.4,
|
|
|
|
|
"genres": ["Action", "Drama"],
|
|
|
|
|
"posterUrl": "https://image-link",
|
|
|
|
|
"description": "Short movie summary goes here.",
|
|
|
|
|
"trailerUrl": "https://youtube-link"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
## 3. Layout Structure
|
|
|
|
|
### Card Sections:
|
|
|
|
|
|
|
|
|
|
### Poster Section
|
|
|
|
|
|
|
|
|
|
- Full-width image
|
|
|
|
|
|
|
|
|
|
- Rounded corners or neon glow
|
|
|
|
|
|
|
|
|
|
- Lazy-loaded for performance
|
|
|
|
|
|
|
|
|
|
### Information Section
|
|
|
|
|
|
|
|
|
|
- Movie Title (bold)
|
|
|
|
|
|
|
|
|
|
- Release Year (lighter text)
|
|
|
|
|
|
|
|
|
|
- Star Rating
|
|
|
|
|
|
|
|
|
|
- 5 star icons
|
|
|
|
|
|
|
|
|
|
- Filled vs unfilled based on rating
|
|
|
|
|
|
|
|
|
|
- Genre Tags
|
|
|
|
|
|
|
|
|
|
- Small pills/chips
|
|
|
|
|
|
|
|
|
|
- Scrollable on mobile
|
|
|
|
|
|
|
|
|
|
- Hover Section
|
|
|
|
|
|
|
|
|
|
- Only visible on hover/press
|
|
|
|
|
|
|
|
|
|
### Includes:
|
|
|
|
|
|
|
|
|
|
- Short description (2–3 lines)
|
|
|
|
|
|
|
|
|
|
- “Watch Trailer” button/link
|
|
|
|
|
|
|
|
|
|
## 4. Hover Behavior (Animation Specification)
|
|
|
|
|
### On Hover:
|
|
|
|
|
|
|
|
|
|
- Card scales slightly (1.03x)
|
|
|
|
|
|
|
|
|
|
- Background blur/glass effect increases
|
|
|
|
|
|
|
|
|
|
- Description fades in
|
|
|
|
|
|
|
|
|
|
- Trailer button slides up
|
|
|
|
|
|
|
|
|
|
### Animation Rules:
|
|
|
|
|
|
|
|
|
|
- Max duration: 150–250ms
|
|
|
|
|
|
|
|
|
|
- Use GPU-friendly transforms
|
|
|
|
|
|
|
|
|
|
- Avoid heavy shadows for performance
|
|
|
|
|
|
|
|
|
|
## 5. Responsiveness Behavior
|
|
|
|
|
### Mobile:
|
|
|
|
|
|
|
|
|
|
- Poster on top
|
|
|
|
|
|
|
|
|
|
- Title + rating below
|
|
|
|
|
|
|
|
|
|
- Genres in a horizontal scroll
|
|
|
|
|
|
|
|
|
|
- Hover replaced with tap-to-expand behavior
|
|
|
|
|
|
|
|
|
|
### Tablet:
|
|
|
|
|
|
|
|
|
|
- Slightly larger poster
|
|
|
|
|
|
|
|
|
|
- Hover enabled
|
|
|
|
|
|
|
|
|
|
- Multi-line description allowed
|
|
|
|
|
|
|
|
|
|
### Desktop:
|
|
|
|
|
|
|
|
|
|
- Full hover animation
|
|
|
|
|
|
|
|
|
|
- Neon/glass effects more visible
|
|
|
|
|
|
|
|
|
|
- Rating + genre tags inline
|
|
|
|
|
|
|
|
|
|
## 6. Visual Style Guide (No strict CSS)
|
|
|
|
|
### Option 1: Glassmorphism
|
|
|
|
|
|
|
|
|
|
- Background blur: 10–20px
|
|
|
|
|
|
|
|
|
|
- Soft white transparency
|
|
|
|
|
|
|
|
|
|
- Subtle shadows
|
|
|
|
|
|
|
|
|
|
### Option 2: Neon / Cyberpunk
|
|
|
|
|
|
|
|
|
|
- Bright cyan/purple glows
|
|
|
|
|
|
|
|
|
|
- Black or dark backgrounds
|
|
|
|
|
|
|
|
|
|
- Hover glow on stars and poster
|
|
|
|
|
|
|
|
|
|
### Typography:
|
|
|
|
|
|
|
|
|
|
- Title: Bold, large
|
|
|
|
|
|
|
|
|
|
- Year and genres: smaller, low opacity
|
|
|
|
|
|
|
|
|
|
### Rating: icons must be readable at small sizes
|
|
|
|
|
|
|
|
|
|
## 7. Accessibility Requirements
|
|
|
|
|
|
|
|
|
|
- Poster image must have alt text
|
|
|
|
|
|
|
|
|
|
- Trailer link must have aria-label
|
|
|
|
|
|
|
|
|
|
- Colors must pass contrast if neon is used
|
|
|
|
|
|
|
|
|
|
- Keyboard focus must reveal the hover content
|
|
|
|
|
|
|
|
|
|
- Every interactive element must be tabbable
|
|
|
|
|
|
|
|
|
|
## 8. Implementation Guidelines (For Future Contributors)
|
|
|
|
|
|
|
|
|
|
- This component should be easy to integrate:
|
|
|
|
|
|
|
|
|
|
Example usage:
|
|
|
|
|
|
|
|
|
|
<MovieCard
|
|
|
|
|
title="Inception"
|
|
|
|
|
year={2010}
|
|
|
|
|
rating={8.8}
|
|
|
|
|
genres={['Sci-Fi', 'Thriller']}
|
|
|
|
|
posterUrl="/img/inception.webp"
|
|
|
|
|
description="A thief who steals corporate secrets through dream-sharing..."
|
|
|
|
|
trailerUrl="https://youtube.com/trailer-url"
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
### Component must:
|
|
|
|
|
|
|
|
|
|
- Accept props listed above
|
|
|
|
|
|
|
|
|
|
- Render consistently across screen sizes
|
|
|
|
|
|
|
|
|
|
- Stay lightweight (no heavy JS)
|
|
|
|
|
|
|
|
|
|
- Work with plain HTML/CSS/JS or any framework
|
|
|
|
|
|
|
|
|
|
## 9. Tasks for Implementation (For Maintainership / Devs)
|
|
|
|
|
|
|
|
|
|
- To make this feature easy to implement, it is broken into sub-tasks:
|
|
|
|
|
|
|
|
|
|
- Build card layout (HTML structure)
|
|
|
|
|
|
|
|
|
|
- Add poster display
|
|
|
|
|
|
|
|
|
|
- Add title + year
|
|
|
|
|
|
|
|
|
|
- Add rating stars
|
|
|
|
|
|
|
|
|
|
- Add genre tags
|
|
|
|
|
|
|
|
|
|
- Add hover description + trailer button
|
|
|
|
|
|
|
|
|
|
- Add animations
|
|
|
|
|
|
|
|
|
|
- Add responsiveness
|
|
|
|
|
|
|
|
|
|
- Improve accessibility
|
|
|
|
|
|
|
|
|
|
- Each task can be picked individually by contributors.
|
|
|
|
|
|
|
|
|
|
## 10. Why This Contribution Solves the Issue
|
|
|
|
|
|
|
|
|
|
- Defines full UI layout
|
|
|
|
|
|
|
|
|
|
- Describes props and expected input
|
|
|
|
|
|
|
|
|
|
- Specifies animations and behaviors
|
|
|
|
|
|
|
|
|
|
- Provides accessibility guidelines
|
|
|
|
|
|
|
|
|
|
- Breaks the task into smaller parts
|
|
|
|
|
|
|
|
|
|
- Gives future developers a blueprint to code the component
|