-
Notifications
You must be signed in to change notification settings - Fork 1.6k
feat(synced-lyrics): add enhanced line effect, improve character display, and fix provider handling #3917
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
base: master
Are you sure you want to change the base?
Conversation
damn this looks amazing, also seems to be really smooth, absolutely fantastic work! |
…mpty line symbols
…al empty line handling
…andling, and transform improvements
… seconds and centiseconds
…nd simplify seekTo handler
…ve transform calc
…fast-scroll on tab visible
Hi! Nice work, I'm the person that originally added the Fancy line effect. You might have already known, but the purpose of the Fancy line effect was to recreate the effects from Better Lyrics anyway. So in my opinion, instead of adding a new but slightly different version, Fancy should just become what you have with Enhanced. I would defer to what the maintainers think though. |
hey @kimjammer, and thanks! i really appreciate you creating the fancy effect in the first place, it made things a lot easier for me and really helped when adding the enhanced style. i thought about merging it with fancy, but i decided to keep them separate for now because i thought some people might still enjoy the original fancy style. i figured it’s better to let people choose which effect feels best for them. so for now enhanced is its own option (but default). if the maintainers feel it makes more sense to combine fancy and enhanced, i’m happy to adjust 👍 |
Hi any way to either bring Word synced lyrics or just put that plugin into Youtube Music bundled? |
This is amazing! But, you will need to clean up the code a bit. Once you've done that, I'll see if there is a need for a more in-depth review |
…nd simplify seekTo handler
…ve transform calc
…fast-scroll on tab visible
… clean rendering logic
thanks @ArjixWasTaken, i cleaned up the repeated code and moved it into shared functions, should be much cleaner now, let me know what you think👍🏻 |
Amazing work, love what you did to the lyric scrolling. the default text string behaves differently after your changes Before your PR: ytmd-pr-before.mp4After your PR: ytmd-pr-after.mp4 |
Not only that, if you intended to break the previous functionality, you did not write a config migration for |
Maybe instead of an array of states, it should be an object that declares if it's an animation (array of frames) or an array of characters to get highlighted |
Do you mind adding me to your fork so we can work on this together? |
yeah, i actually tried to keep the ['•', '••', '•••'] behavior, but i ran into duplication problems when doing the fade in animation. it would render like •••••• instead of •••. since i could'n’t find a good solution, i simplified it to ['•', '•', '•'], which worked better for per character effects. i agree this does change the behavior. i wasn’t trying to intentionally break ascii art/kaomoji configs, i just couldn’t find a clean way to support both at the time. please feel free to take a look and sure, i’ll add you to my fork so we can work on this together. |
hey, just pushed the updated version. the behavior’s fixed now, arrays with different values (like kaomojis/ascii art) only show the current state, and identical values (like fixascii.mp4
regarding the idea of using an object to separate animation and highlight states, it’s a good idea, but i think the current approach already covers both cases cleanly without adding extra complexity. |
added a small helper for the end delay empty line, works the same as before, just cleaner and easier to tweak later if someone wants to modify it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces an enhanced line effect for synced lyrics with smoother animations, improves character display between lyrics, and fixes various provider handling issues.
- Adds new "enhanced" line effect with refined animations inspired by better-lyrics
- Improves handling of empty lines and character display with fade effects and better timing
- Fixes provider handling, time alignment, and empty line processing across all providers
Reviewed Changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 6 comments.
Show a summary per file
File | Description |
---|---|
src/plugins/synced-lyrics/types.ts | Adds new enhanced line effect type and showEmptyLineSymbols config |
src/plugins/synced-lyrics/style.css | Extensive styling updates for enhanced line effect and hover animations |
src/plugins/synced-lyrics/shared/lines.ts | New utility functions for merging empty lines and ensuring proper line padding |
src/plugins/synced-lyrics/renderer/utils.tsx | Adds utilities for time formatting, blank detection, and font loading |
src/plugins/synced-lyrics/renderer/scrolling.ts | New scrolling constants and utilities for enhanced scroll behavior |
src/plugins/synced-lyrics/renderer/renderer.tsx | Major refactor with enhanced scroll animations and improved line effect handling |
src/plugins/synced-lyrics/renderer/components/SyncedLine.tsx | Enhanced empty line handling with fade effects and improved timing |
src/plugins/synced-lyrics/renderer/components/LyricsPicker.tsx | Improved provider switching with fast scroll integration |
src/plugins/synced-lyrics/providers/*.ts | Updated all providers to use new line processing utilities |
src/plugins/synced-lyrics/parsers/lrc.ts | Improved LRC parsing with better millisecond handling |
src/plugins/synced-lyrics/menu.ts | Menu restructuring with new enhanced option and improved organization |
src/plugins/synced-lyrics/index.ts | Updated default configuration for enhanced experience |
src/i18n/resources/en.json | Added translations for new enhanced effect and empty line symbols |
src/config/store.ts | Migration logic for placeholder default changes |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
const stepCount = states().length; | ||
const precise = config()?.preciseTiming ?? false; | ||
|
||
if (stepCount === 1) return 0; | ||
|
||
const endDelayMs = computeEndDelayMs(total); |
Copilot
AI
Oct 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The computeEndDelayMs(total)
function is called on every render when stepCount > 1
. Consider memoizing this calculation since it only depends on the total
parameter which comes from props.line.duration
.
Copilot uses AI. Check for mistakes.
hello everyone, this is my first time ever contributing code, lol.
the new enhanced line effect is inspired by better-lyrics.
when i first saw their animation, i wanted it in this plugin too, so i spent about a week replicating and improving it. the effect should now feel smoother and closer to that experience.
along the way, i also fixed some related issues with providers and others (details below).
about
screenshot
video
enhanced1.mp4
enhanced2.mp4
features.mp4
note: these changes only apply to the enhanced style, not the others.
fancy.mp4
what do you think? should i also apply this to the other styles, or keep it exclusive to enhanced?