rampaa / JL

JL is a program for looking up Japanese words and expressions.
Apache License 2.0
200 stars 4 forks source link

Program scrolling up automatically #89

Closed RLNao closed 5 months ago

RLNao commented 5 months ago

Hi, here is my problem i'm adding text via websocket but the text appears at the bottom of the window and the program is scrolling up automatically so when i try to scroll down to see the new lines of text it will automatically scroll up again so i can't check the text

rampaa commented 5 months ago

i'm adding text via websocket but the text appears at the bottom of the window

What do you mean by that? The new text copied from the WebSocket shouldn't appear at the bottom of earlier texts. Do you mean the new text is quite long and so it doesn't fit the main window, so you need to scroll down to look up a word that appears in the later section of the text? Or are you perhaps entering the backlog mode mistakenly?

the program is scrolling up automatically so when i try to scroll down to see the new lines of text it will automatically scroll up again

I can't reproduce this behavior. Are you using a device with a touchscreen, or are you scrolling it down with your mouse wheel? Does it automatically scroll up when a popup appears due to an unintended lookup? Can you reproduce the problem when you scroll up when using the scrollbar directly?

I'd appreciate a video demonstrating the problem.

RLNao commented 5 months ago

Hi, thanks for the answer, here is the video demonstrating my problem : [

https://github.com/rampaa/JL/assets/107620399/43b554e7-9aa6-4d32-9c66-6e7947cdf3f8

](url)

rampaa commented 5 months ago

Thanks for the video. If I'm interpreting the video right, you are using a Speech-To-Text program that generates Japanese text from Japanese audio. And it seems like it is doing the text generation in real-time instead of generating the sentences beforehand, so it constantly re-copies the whole text as it generates more of it like: "人の世の見つけぬ花や軒の栗... はるか山陰", "人の世の見つけぬ花や軒の栗... はるか山陰の"... "人の世の見つけぬ花や軒の栗... はるか山陰の小里に石なかば土にうずもれてあり。". If my understanding is correct, then JL is behaving as expected.

You may still want to try the following though: 1) See if the Speech-to-Text tool you use allow you to generate Japanese texts for the audio file all at once beforehand. If it does, it may be able to copy the whole "はるか山陰の小里に石なかば土にうずもれてあり。" sentence at once when the voice starts to say "はる", in which case everything will work as expected. 2) Try increasing the "Preferences->Main Window->Max dynamic height", if you increase it enough so that all the text fits inside it you won't need to scroll down.

If none of those is possible/realistic for your use case, I can look into whether I can add an option to make JL play better with your use case, though I am not sure if I can make the experience seamless, ideally this should be fixed by the Speech-To-Text program you use.

rampaa commented 5 months ago

Added two options for your use case. Since I don't know what Speech-To-Text tool you use, I couldn't test it with it so I don't know if it will work as expected. The new options will be included in the next version of JL. When the new version of JL comes out, you can enable the new functionality through "Preferences->Main Window->Merge sequential texts when they match", you can also fiddle with the value of "Preferences->Main Window->Only merge sequential texts when they match within milliseconds". When the new version of JL is out, please do let me know whether or not the new options solve your problem.

RLNao commented 5 months ago

Thanks you so much i love you

Le dim. 2 juin 2024 à 17:49, rampaa @.***> a écrit :

Added two options for your use case. Since I don't know what Speech-To-Text tool you use, I couldn't test it with it so I don't know if it will work as expected. The new options will be included in the next version of JL. When it comes out, you can enable it through "Preferences->Main Window->Merge sequential texts when they match", you can also fiddle with the value of "Preferences->Main Window->Only merge sequential texts when they match within milliseconds". When the new version of JL is out, please let me know whether or not the new options solve your problem.

— Reply to this email directly, view it on GitHub https://github.com/rampaa/JL/issues/89#issuecomment-2143908882, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZVCQL5VDAIKZGYLLA54TFDZFM5J7AVCNFSM6AAAAABITXSKP6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBTHEYDQOBYGI . You are receiving this because you authored the thread.Message ID: @.***>

rampaa commented 5 months ago

FYI: The new version of JL is out. Try enabling the "Preferences->Main Window->Merge sequential texts when they match" option and let me know how it goes.

RLNao commented 5 months ago

https://github.com/rampaa/JL/assets/107620399/0a85e5c6-6319-44b6-9ef5-0188ea3806da

Hi, it's me again, I just tried the update and I wanted to thanks you !!! Everything works perfectly now i can watch live videos and use the pop up dictionnary on them, it's perfect Thanks you so much