Replace Working Hours with Retro Music Player Card - #22
Conversation
- Removed `api/working-hours.js` and `src/svg-working-hours.js` - Added `api/music.js` and `src/svg-music.js` - Implemented four retro player styles: Winamp (90s), iPod, Cassette, and Boombox - Added CSS animations for equalizers and spinning reels - Supported custom song metadata (title, artist), Spotify links, and GIF overlays - Updated README and landing page with documentation and examples Co-authored-by: Chintanpatel24 <216989679+Chintanpatel24@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This PR replaces the deprecated “Working Hours” card/endpoint with a new retro-themed “Music Player” card that is configured entirely via URL parameters and rendered as an SVG.
Changes:
- Removed the
/api/working-hoursendpoint and its SVG renderer. - Added a new
/api/musicendpoint andsrc/svg-music.jsrenderer supporting90s,ipod,cassette, andboomboxstyles. - Updated documentation and the landing page to showcase and link to the new music card.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
src/svg-working-hours.js |
Removed the Working Hours SVG generator. |
api/working-hours.js |
Removed the Working Hours API endpoint implementation. |
src/svg-music.js |
Added Music Player SVG generator with multiple retro UI styles and optional GIF support. |
api/music.js |
Added Music Player API endpoint that applies theme overrides and returns the generated SVG. |
README.md |
Replaced Working Hours docs with Music Player usage and parameters. |
public/index.html |
Updated landing page examples to display the new music card in multiple styles. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| try { | ||
| let colors = getTheme(theme); | ||
| colors = applyColorOverrides(colors, { bg_color, title_color, text_color, border_color }); | ||
|
|
||
| const svg = generateMusicSVG({ | ||
| player: player || "90s", | ||
| title: title || "Not Playing", | ||
| artist: artist || "Unknown Artist", | ||
| track_id: track_id || "", | ||
| gif_url: gif_url || "", | ||
| colors, | ||
| hideBorder: hide_border === "true", | ||
| }); |
| const accentColor = (colors && colors.accent_color) || "58a6ff"; | ||
| const bgColor = (colors && colors.bg_color) || "0d1117"; | ||
| const titleColor = (colors && colors.title_color) || accentColor; | ||
| const textColor = (colors && colors.text_color) || "8b949e"; |
| ### 9. Music Player Card | ||
|
|
||
| - Calculates actual coding hours by analyzing commit timestamp gaps. | ||
|
|
||
| <img src="images/13.png"> | ||
|
|
||
| **Formula:** `TWt = Σ (Ti+1 - Ti) for all i where (Ti+1 - Ti) < 5 hours` | ||
|
|
||
| Where: | ||
| - `TWt` = Total Working Time | ||
| - `Σ` = Sum of all | ||
| - `Ti` = Timestamp of commit i | ||
| - `Ti+1` = Timestamp of next commit | ||
| - **Threshold:** Only counts gaps < 5 hours (assumes longer gaps are breaks/sleep) | ||
| - A retro-style music player for your README. | ||
| - **Styles:** `90s` (Winamp), `ipod`, `cassette`, `boombox`. | ||
| - Supports custom song titles, artists, and Spotify track IDs. |
This change replaces the "Working Hours" card with a new "Music Player" card. The new card allows users to showcase what they are listening to on their GitHub profile using various retro-styled player interfaces.
Key features:
90s(Winamp style),ipod,cassette, andboombox.title,artist,track_id, andgif_urlparameters.Documentation and the landing page have been updated to include usage examples for the new endpoint.
PR created automatically by Jules for task 18373486311561233713 started by @Chintanpatel24