Skip to content

feat(lyrics-plus): Port Pinyin Romanization feature - #54

Merged
afonsojramos merged 2 commits into
spicetify:mainfrom
heinthanth:port_lyrics_plus_pinyin_romanization
Oct 9, 2026
Merged

afonsojramos merged 2 commits into
spicetify:mainfrom
heinthanth:port_lyrics_plus_pinyin_romanization

Conversation

@heinthanth

@heinthanth heinthanth commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

I've been trying V3 beta and found out lyrics-plus module is missing a feature that v2 has. So, this PR ports the pinyin romanization feature from the v2 custom apps lyrics-plus to new v3 lyrics-plus module. I also bumped version number from 0.3.0 to 0.4.0. Thank you!

Screenshot 2026-10-06 at 16 47 54 (2) Screenshot 2026-10-06 at 16 48 09 Screenshot 2026-10-06 at 16 48 20

Summary by CodeRabbit

  • New Features
    • Added optional pinyin romanization for Simplified and Traditional Chinese lyrics, displayed beneath lyric lines in synced, expanded, and unsynced views.
    • Choose whether to show pinyin and adjust its font size in the lyrics settings.
    • Romanization conversion errors now display a notification.

Copilot AI balanced review requested due to automatic review settings October 6, 2026 09:49

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 45572b6e-c08d-4407-82fc-9904f4229484

📥 Commits

Reviewing files that changed from the base of the PR and between 6939433 and beb6474.


📒 Files selected for processing (11)
  • modules/lyrics-plus/config.ts
  • modules/lyrics-plus/container-requests.test.mts
  • modules/lyrics-plus/index.scss
  • modules/lyrics-plus/metadata.json
  • modules/lyrics-plus/mod.tsx
  • modules/lyrics-plus/options-menu.tsx
  • modules/lyrics-plus/pages.test.mts
  • modules/lyrics-plus/pages.tsx
  • modules/lyrics-plus/translator.test.mts
  • modules/lyrics-plus/translator.ts
  • modules/lyrics-plus/types.ts

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.



📝 Walkthrough

Walkthrough

The lyrics module adds an optional pinyin conversion setting for Chinese lyrics. It converts lyrics per track and mode, then displays distinct romanized text beneath lyrics in synced, expanded synced, and unsynced views.

Changes

Chinese Lyrics Romanization

Layer / File(s) Summary
Romanization settings
modules/lyrics-plus/config.ts, modules/lyrics-plus/options-menu.tsx, modules/lyrics-plus/metadata.json
Adds pinyin and romanization font-size settings. The romanization selector is shown for Chinese, and the module version changes to 0.4.0.
Pinyin conversion
modules/lyrics-plus/types.ts, modules/lyrics-plus/translator.ts, modules/lyrics-plus/translator.test.mts
Adds the RomanizedLine type and pinyin-pro loading and conversion. Tests cover script loading, reuse, conversion, and disposal.
Track-scoped conversion and page wiring
modules/lyrics-plus/mod.tsx, modules/lyrics-plus/container-requests.test.mts
Tracks conversion by URI and mode, ignores stale results, and reports active conversion failures. Matching romanization is passed to synced and unsynced lyric pages.
Romanized lyric display
modules/lyrics-plus/pages.tsx, modules/lyrics-plus/index.scss, modules/lyrics-plus/pages.test.mts
Renders differing romanized text beneath lyrics in all three views. Adds romanization styling and tests for display and omission behavior.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant LyricsContainer
  participant Translator
  participant PinyinProScript
  participant LyricsPage
  LyricsContainer->>Translator: convert lyric text to pinyin
  Translator->>PinyinProScript: load pinyin-pro script
  PinyinProScript-->>Translator: provide pinyin converter
  Translator-->>LyricsContainer: return romanized lines
  LyricsContainer->>LyricsPage: pass matching romanization
Loading

Suggested reviewers: afonsojramos


Merge Risk: ⚪ Minimal · up to beb64

No confirmed issue blocks merging. Same-track lyric replacement behavior remains unverified.

Pre-merge checks | Passed 4 | Failed 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 9 files. (2 skipped: 2 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely identifies the main change: adding Pinyin romanization to the lyrics-plus module.
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.

Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 9 files. (2 skipped: 2 unsupported.)



  • Fix all pre-merge checks with AI
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@afonsojramos
afonsojramos merged commit 52a684e into spicetify:main Oct 9, 2026
6 checks passed
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.

3 participants