WIP: feat(synced-lyrics): lyrics offset #3240

Draft
scratchusernamemrtbts wants to merge 9 commits from scratchusernamemrtbts/master into master
scratchusernamemrtbts commented 2025-04-15 14:55:06 +00:00 (Migrated from github.com)

Resolves #3237
please give me feedback on the labels and tooltips cus i am not a native english speaker
also right now positive offset means that lyrics show slower than the audio (used with bluetooth speakers which i think is the best usecase for this feature rn)
and negative might be used when the lyrics it pulled timestamp is offset slower than the actual song
might want to swap that but lmk which is best

Resolves #3237 please give me feedback on the labels and tooltips cus i am not a native english speaker also right now positive offset means that lyrics show slower than the audio (used with bluetooth speakers which i think is the best usecase for this feature rn) and negative might be used when the lyrics it pulled timestamp is offset slower than the actual song might want to swap that but lmk which is best
copilot-pull-request-reviewer[bot] (Migrated from github.com) reviewed 2025-04-16 14:10:33 +00:00
copilot-pull-request-reviewer[bot] (Migrated from github.com) left a comment

Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.

Files not reviewed (1)
  • src/i18n/resources/en.json: Language not supported
Comments suppressed due to low confidence (1)

src/plugins/synced-lyrics/menu.ts:17

  • [nitpick] The label and tooltip keys for the lyrics offset feature should clearly indicate its behavior. Consider updating the translation text to explicitly mention that a positive offset delays lyric display (lyrics show slower than audio) and a negative offset accelerates them, ensuring consistency with the feature description.
label: t('plugins.synced-lyrics.menu.offset.label'),
Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments. <details> <summary>Files not reviewed (1)</summary> * **src/i18n/resources/en.json**: Language not supported </details> <details> <summary>Comments suppressed due to low confidence (1)</summary> **src/plugins/synced-lyrics/menu.ts:17** * [nitpick] The label and tooltip keys for the lyrics offset feature should clearly indicate its behavior. Consider updating the translation text to explicitly mention that a positive offset delays lyric display (lyrics show slower than audio) and a negative offset accelerates them, ensuring consistency with the feature description. ``` label: t('plugins.synced-lyrics.menu.offset.label'), ``` </details>
Owner

Hello @scratchusernamemrtbts , would you be interested in inviting me to your fork so I can enhance this further?
I would like to add a way of changing the offset directly from the lyrics panel, instead of having to go to the menu settings.


I could of course do that on a follow-up PR, this ain't a dealbreaker

Hello @scratchusernamemrtbts , would you be interested in inviting me to your fork so I can enhance this further? I would like to add a way of changing the offset directly from the lyrics panel, instead of having to go to the menu settings. --- I could of course do that on a follow-up PR, this ain't a dealbreaker
scratchusernamemrtbts commented 2025-05-02 14:15:36 +00:00 (Migrated from github.com)

Hello @scratchusernamemrtbts , would you be interested in inviting me to your fork so I can enhance this further? I would like to add a way of changing the offset directly from the lyrics panel, instead of having to go to the menu settings.

I could of course do that on a follow-up PR, this ain't a dealbreaker

i'm so sorry for just seeing this now
i've just invited you to my fork now

> Hello @scratchusernamemrtbts , would you be interested in inviting me to your fork so I can enhance this further? I would like to add a way of changing the offset directly from the lyrics panel, instead of having to go to the menu settings. > > I could of course do that on a follow-up PR, this ain't a dealbreaker i'm so sorry for just seeing this now i've just invited you to my fork now
Owner

@scratchusernamemrtbts

I am quite satisfied with an implementation like this, because it allows for more complex options in the lyrics picker, w/o bloating the UI.

https://github.com/user-attachments/assets/b5fbeaf6-cc54-48eb-815e-675c93a420fc

what do you think?

(ofc the CSS has to be improved)

@scratchusernamemrtbts I am quite satisfied with an implementation like this, because it allows for more complex options in the lyrics picker, w/o bloating the UI. https://github.com/user-attachments/assets/b5fbeaf6-cc54-48eb-815e-675c93a420fc what do you think? (ofc the CSS has to be improved)
scratchusernamemrtbts commented 2025-05-04 17:59:49 +00:00 (Migrated from github.com)

not sure if the three dots provide a clear indication that it's for lyrics offset
(maybe a timer symbol)

not sure if the three dots provide a clear indication that it's for lyrics offset (maybe a timer symbol)
Owner

not sure if the three dots provide a clear indication that it's for lyrics offset (maybe a timer symbol)

The three dots are not for the offset, but for "advanced options"

because it allows for more complex options in the lyrics picker, w/o bloating the UI.

> not sure if the three dots provide a clear indication that it's for lyrics offset (maybe a timer symbol) The three dots are not for the offset, but for "advanced options" > > because it allows for more complex options in the lyrics picker, w/o bloating the UI.
Owner

Final design I can come up with

image

some minor changes should be made so it feels less rough, but other than that I am satisfied with it

Final design I can come up with ![image](https://github.com/user-attachments/assets/d2baf6a3-1249-44b8-be81-db7e494cb6a3) some minor changes should be made so it feels less rough, but other than that I am satisfied with it
Owner

PS: There is a weird bug when the lyricsOffset is updated using the original menu.

PS: There is a weird bug when the lyricsOffset is updated using the original menu.
scratchusernamemrtbts commented 2025-06-25 13:28:39 +00:00 (Migrated from github.com)

apparently the counter prompt type doesn't handle negative numbers correctly so I've also changed the prompt type to a normal input instead

apparently the counter prompt type doesn't handle negative numbers correctly so I've also changed the prompt type to a normal input instead
scratchusernamemrtbts commented 2025-06-25 13:29:35 +00:00 (Migrated from github.com)

PS: There is a weird bug when the lyricsOffset is updated using the original menu.

Not sure if this is the bug your talking about but i made the ui update when changing the config through the menu prompt

> PS: There is a weird bug when the lyricsOffset is updated using the original menu. Not sure if this is the bug your talking about but i made the ui update when changing the config through the menu prompt
scratchusernamemrtbts (Migrated from github.com) reviewed 2025-06-25 13:30:33 +00:00
@ -13,0 +35,4 @@
ctx.window,
);
if (!newOffset) return
ctx.setConfig({
scratchusernamemrtbts (Migrated from github.com) commented 2025-06-25 13:30:33 +00:00

also if anyone's got a better solution than this please lmk

also if anyone's got a better solution than this please lmk
Owner

I will be rebasing on master later this day week month, since I am the most familiar with the changes.

Edit: 😭

I will be rebasing on master later this ~~day~~ ~~week~~ month, since I am the most familiar with the changes. Edit: :sob:
Owner

Some slight CSS changes still need to be done after the rebase.

@scratchusernamemrtbts can you convert this into a draft for now?

Some slight CSS changes still need to be done after the rebase. @scratchusernamemrtbts can you convert this into a draft for now?
This pull request has changes conflicting with the target branch.
  • src/plugins/synced-lyrics/menu.ts
  • src/plugins/synced-lyrics/renderer/components/LyricsPicker.tsx
  • src/plugins/synced-lyrics/renderer/index.ts
  • src/plugins/synced-lyrics/types.ts
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin scratchusernamemrtbts/master:scratchusernamemrtbts/master
git switch scratchusernamemrtbts/master

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch master
git merge --no-ff scratchusernamemrtbts/master
git switch scratchusernamemrtbts/master
git rebase master
git switch master
git merge --ff-only scratchusernamemrtbts/master
git switch scratchusernamemrtbts/master
git rebase master
git switch master
git merge --no-ff scratchusernamemrtbts/master
git switch master
git merge --squash scratchusernamemrtbts/master
git switch master
git merge --ff-only scratchusernamemrtbts/master
git switch master
git merge scratchusernamemrtbts/master
git push origin master
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: YTMD/youtube-music#3240
No description provided.