Skip to content

feat(lyrics-plus): change ♪ to idle dots #3455

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Mytic2330
Copy link

@Mytic2330 Mytic2330 commented Jul 8, 2025

This pull pull request is to change the lyrics display functionality in the CustomApps/lyrics-plus. The new thing added is an inline idling indicator as suggested in #3363. It changes all ♪ in the lyrics to times dots as at the intro of the song.

preview

Summary by CodeRabbit

  • New Features
    • Inline progress dots now appear next to lyric lines (including instrumental “♪” lines), reflecting playback progress while retaining click-to-seek.
  • Style
    • New styling for inline and block idling indicators with smooth transitions and customizable colors via variables.
  • Refactor
    • Simplified idling indicator rendering to generate dots programmatically, preserving existing visuals and behavior.

@rxri
Copy link
Member

rxri commented Aug 14, 2025

Run biome (2.0.0) on all files

@Mytic2330
Copy link
Author

Run biome (2.0.0) on all files

Done

@rxri
Copy link
Member

rxri commented Aug 15, 2025

@coderabbitai full review

Copy link

coderabbitai bot commented Aug 15, 2025

✅ Actions performed

Full review triggered.

Copy link

coderabbitai bot commented Aug 15, 2025

Walkthrough

Introduces an InlineIdlingIndicator component and associated CSS. Refactors IdlingIndicator to render dots via a thresholds map. Updates SyncedLyricsPage to handle lines containing "♪" with a dedicated render path using InlineIdlingIndicator, retaining click-to-seek and existing CSS variable usage.

Changes

Cohort / File(s) Summary
Lyrics UI Logic
CustomApps/lyrics-plus/Pages.js
- IdlingIndicator now maps thresholds [0.05, 0.33, 0.66] to generate dots.
- Added InlineIdlingIndicator using the same thresholds for inline display.
- SyncedLyricsPage adds a branch for "♪" lines: computes animationIndex/progress, renders clickable line, and shows InlineIdlingIndicator.
Styling for Indicators
CustomApps/lyrics-plus/style.css
- Added styles for inline and block idling indicators: containers, active states, and dot visuals with transitions.
- New selectors: .lyrics-inline-idling-indicator(.active), .lyrics-inline-idling-dot(.active), .lyrics-idling-indicator(.active), .lyrics-idling-dot(.active).

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant SyncedLyricsPage
  participant InlineIdlingIndicator
  participant IdlingIndicator

  User->>SyncedLyricsPage: Render lyrics
  alt Line text == "♪"
    SyncedLyricsPage->>SyncedLyricsPage: Compute animationIndex, progress
    SyncedLyricsPage->>InlineIdlingIndicator: Render with progress
    User-->>SyncedLyricsPage: Click line (seek)
  else Other lines
    SyncedLyricsPage->>IdlingIndicator: Render (idle state)
    User-->>SyncedLyricsPage: Click line (seek)
  end
Loading
sequenceDiagram
  participant Component as IdlingIndicator
  participant Thresholds as [0.05,0.33,0.66]

  Component->>Thresholds: Iterate thresholds
  loop For each t
    Component->>Component: Render dot active if progress ≥ t
  end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

I tap my paw in triple time,
Three dots glow softly, all in rhyme.
A note of “♪” drifts through the air,
I hop to seek from here to there.
New lights blink—progress sings—
My whiskers dance with loading things. 🐇✨

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

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

🔭 Outside diff range comments (1)
CustomApps/lyrics-plus/Pages.js (1)

158-161: IdlingIndicator is always hidden here due to missing isActive prop.

Class toggling uses !isActive ? "lyrics-idling-indicator-hidden" : "". Without isActive, it’s undefined, so the indicator stays hidden.

Apply:

-					return react.createElement(IdlingIndicator, {
-						progress: position / activeLines[2].startTime,
-						delay: activeLines[2].startTime / 3,
-					});
+					return react.createElement(IdlingIndicator, {
+						key: "intro-indicator",
+						isActive: true,
+						progress: position / activeLines[2].startTime,
+						delay: activeLines[2].startTime / 3,
+					});
🧹 Nitpick comments (3)
CustomApps/lyrics-plus/style.css (1)

763-771: Duplicate .lyrics-idling-indicator selector overrides prior rules; also double-spacing risk.

This block redefines .lyrics-idling-indicator, which already exists above (Line 608). The later definition will override earlier values (display, transition). Additionally, the new gap: 0.4em combined with the existing .lyrics-idling-indicator__circle margin-right (Line 623) can produce doubled spacing between circles.

  • Either remove gap here or drop the margin on circles for consistency.
  • Keep transition timing consistent with the earlier cubic-bezier easing, unless the change is intentional.

Apply this minimal diff to prevent double-spacing and keep easing consistent:

 .lyrics-idling-indicator {
-	display: flex;
-	align-items: center;
-	gap: 0.4em;
+	display: flex;
+	align-items: center;
+	/* spacing provided by .lyrics-idling-indicator__circle margin-right above */
 	justify-content: center;
 	margin: 0.5em 0;
 	opacity: 0.7;
-	transition: opacity 0.2s;
+	transition: opacity 0.2s cubic-bezier(0, 0, 0.58, 1);
 }
CustomApps/lyrics-plus/Pages.js (2)

34-37: Add stable keys when mapping dots to silence React warnings.

Missing key on mapped elements can cause reconciliation warnings and subtle issues.

Apply:

-		[0.05, 0.33, 0.66].map((threshold) =>
-			react.createElement("div", { className: `lyrics-idling-indicator__circle ${progress >= threshold ? "active" : ""}` })
-		)
+		[0.05, 0.33, 0.66].map((threshold, idx) =>
+			react.createElement("div", {
+				key: `circle-${idx}`,
+				className: `lyrics-idling-indicator__circle ${progress >= threshold ? "active" : ""}`,
+			})
+		)

40-53: Decorative inline dots should be hidden from assistive tech; consider a thresholds constant.

  • Add aria-hidden so screen readers ignore purely decorative dots.
  • Optional: extract [0.05, 0.33, 0.66] to a shared constant to avoid duplication.

Apply:

  return react.createElement(
    "span",
    {
-      className: `lyrics-inline-idling-indicator${isActive ? " active" : ""}`,
+      className: `lyrics-inline-idling-indicator${isActive ? " active" : ""}`,
+      "aria-hidden": "true",
    },
-    [0.05, 0.33, 0.66].map((threshold, idx) =>
+    [0.05, 0.33, 0.66].map((threshold, idx) =>
       react.createElement("span", {
         key: idx,
         className: `lyrics-inline-idling-dot${progress >= threshold ? " active" : ""}`,
       })
     )
   );

If you want to extract thresholds:

// near top of file
const DOT_THRESHOLDS = [0.05, 0.33, 0.66];

Then use DOT_THRESHOLDS.map(...) in both indicators.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 01c68ea and ce4b769.

📒 Files selected for processing (2)
  • CustomApps/lyrics-plus/Pages.js (2 hunks)
  • CustomApps/lyrics-plus/style.css (1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
CustomApps/lyrics-plus/Pages.js (3)
CustomApps/lyrics-plus/Utils.js (3)
  • react (170-170)
  • react (174-174)
  • i (179-179)
Extensions/fullAppDisplay.js (3)
  • react (13-13)
  • react (14-14)
  • CONFIG (16-16)
CustomApps/lyrics-plus/index.js (3)
  • react (6-6)
  • react (7-7)
  • CONFIG (30-96)
🔇 Additional comments (1)
CustomApps/lyrics-plus/style.css (1)

731-761: Inline idling indicator styles look good and scoped.

The new .lyrics-inline-idling-indicator and .lyrics-inline-idling-dot classes are self-contained, use sensible fallbacks for CSS vars, and transition properties are appropriate for a subtle effect. Vertical alignment and spacing read nicely.

Comment on lines +775 to +792
.lyrics-idling-dot {
width: 0.7em;
height: 0.7em;
border-radius: 50%;
background: var(--lyrics-idling-dot-color, #888);
opacity: 0.3;
transform: scale(0.7);
transition:
background 0.2s,
opacity 0.2s,
transform 0.2s;
display: inline-block;
}
.lyrics-idling-dot.active {
background: var(--lyrics-idling-dot-active-color, #fff);
opacity: 1;
transform: scale(1.1);
}
Copy link

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Verify usage of new .lyrics-idling-dot selectors.

Pages.js keeps using lyrics-idling-indicator__circle for the block indicator. If .lyrics-idling-dot isn’t referenced elsewhere, these rules are currently unused.

Run this to confirm usage and remove dead CSS if unused:


🏁 Script executed:

#!/bin/bash
# Find references to the new dot classes
rg -n -C2 'lyrics-idling-dot|lyrics-inline-idling-dot'

Length of output: 2162


🏁 Script executed:

#!/bin/bash
# Check for usage of the old block indicator class
rg -n -C2 'lyrics-idling-indicator__circle'

Length of output: 979


Remove or Integrate Unused .lyrics-idling-dot Styles

Our search confirms that:

  • .lyrics-inline-idling-dot is used in CustomApps/lyrics-plus/Pages.js (line 49).
  • .lyrics-idling-dot (defined in style.css lines 775–792) isn’t referenced anywhere in the codebase.
  • The block indicator in Pages.js (line 35) still uses lyrics-idling-indicator__circle.

Action items:

  • If you intended to replace the block‐indicator dots with .lyrics-idling-dot, update the Pages.js render logic:
    - className={`lyrics-idling-indicator__circle ${progress >= threshold ? "active" : ""}`}
    + className={`lyrics-idling-dot ${progress >= threshold ? "active" : ""}`}
  • Otherwise, remove the unused .lyrics-idling-dot rules from CustomApps/lyrics-plus/style.css (lines 775–792).
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
.lyrics-idling-dot {
width: 0.7em;
height: 0.7em;
border-radius: 50%;
background: var(--lyrics-idling-dot-color, #888);
opacity: 0.3;
transform: scale(0.7);
transition:
background 0.2s,
opacity 0.2s,
transform 0.2s;
display: inline-block;
}
.lyrics-idling-dot.active {
background: var(--lyrics-idling-dot-active-color, #fff);
opacity: 1;
transform: scale(1.1);
}
className={`lyrics-idling-dot ${progress >= threshold ? "active" : ""}`}
🤖 Prompt for AI Agents
In CustomApps/lyrics-plus/style.css around lines 775 to 792 the
.lyrics-idling-dot rules are defined but not referenced anywhere; either delete
this unused CSS block, or update CustomApps/lyrics-plus/Pages.js (check the
block indicator at ~line 35 and the inline usage at ~line 49) to replace the
existing indicator classes (e.g., lyrics-idling-indicator__circle or
.lyrics-inline-idling-dot) with .lyrics-idling-dot and ensure you add the
.active class where the active state is toggled and the CSS custom properties
(--lyrics-idling-dot-color, --lyrics-idling-dot-active-color) are set or fall
back to desired defaults.

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