ManeraKai / simplytranslate_mobile

Privacy friendly frontend to Google Translate
https://manerakai.github.io/simplytranslate_mobile/
GNU General Public License v3.0
173 stars 15 forks source link

Select text #61

Closed Valdnet closed 1 year ago

Valdnet commented 3 years ago

Steps:

  1. Enter a very long text.
  2. Select all text.

The selection menu with the "tear" is visible outside the text window:

obraz

ManeraKai commented 3 years ago

Hopefully: https://github.com/ManeraKai/simplytranslate_mobile/actions/runs/1349216426

Valdnet commented 3 years ago
  1. The problem still occurs when you paste long text through this bar:

obraz

When you scroll and select it again, the text automatically scrolls.

  1. After exceeding 32399 characters, the problem also arises when selecting the text.
ManeraKai commented 3 years ago

After exceeding 32399 characters, the problem also arises when selecting the text.

bruh

ManeraKai commented 3 years ago

btw, why should we limit the character limit to below 99999 if it won't affect anything? I can just stop the character counter from counting more rather than editing and changing the text.

Valdnet commented 3 years ago

I think you got me wrong.

Text must be supported up to 99999.

Currently, if you type or paste text above 32399 characters, the text selection problem reoccurs.

The application does well up to 32399 characters, but if it exceeds that number, a problem arises again when selecting the text.

ManeraKai commented 3 years ago

Didn't happen to me.

ManeraKai commented 3 years ago

I think you got me wrong.

Text must be supported up to 99999.

I understood, but because it's getting too complicated and any bug can rise as we are now playing with the text selection values from multiple parties.

Valdnet commented 3 years ago

So, the application is supposed to work properly up to a certain number of characters, and then it can automatically scroll the text uncontrollably by the user?

ManeraKai commented 3 years ago

No, I'm trying to find and fix that bug, but just for simplicity of code and preventing future bugs I'll remove the force limiter as there is no need to it.

Valdnet commented 3 years ago

Well. So I will wait for the corrected version 😉.

ManeraKai commented 3 years ago

Those problems have to do with system's animations. I'm delaying functions and testing. I was successful in reproducing the issue and tried to fix it: https://github.com/ManeraKai/simplytranslate_mobile/actions/runs/1349576435

Valdnet commented 3 years ago

It doesn't always work properly. Sometimes it allows more characters to be pasted and works right, sometimes it only allows fewer characters.

ManeraKai commented 3 years ago

It's a sneaky workaround, not a real solution. The real solution is centering the cursor. Waiting for an answer: https://stackoverflow.com/questions/69587533/center-cursor-in-textfield-flutter

Valdnet commented 3 years ago

And that would be the best solution 😉.

So what I said before. Keep the cursor in a visible place in the window and this solves the whole problem 😁.

ManeraKai commented 3 years ago

I'll leave this issue then for another time. At least we minimized the problem for now.

Valdnet commented 2 years ago

For a window with translated text, remove "Cut" and "Paste" from the text edit bar. It is an uneditable window.

obraz

ManeraKai commented 2 years ago

Fixed that + the Select All button will disappear once all text is selected on both inputs: https://github.com/ManeraKai/simplytranslate_mobile/actions/runs/1358469033

Valdnet commented 2 years ago

Is it possible to count the number of lines of text, then count how many lines are scrolled forwards or backwards and calculate on which line the cursor should appear?

ManeraKai commented 2 years ago

Add to that equation the wrapped text as a new line. I can create an equation if I'm able to detect wrapping in text. Didn't find a way to detect it yet.

ManeraKai commented 2 years ago

@Valdnet is the problem solved in the latest beta version?! https://github.com/ManeraKai/simplytranslate_mobile/actions/runs/2045778266

ManeraKai commented 2 years ago

Here is it disabled: https://github.com/ManeraKai/simplytranslate_mobile/actions/runs/2047328527

Valdnet commented 2 years ago

@ManeraKai Have the changes been made or have you opted out of them?

ManeraKai commented 2 years ago

no I've disabled the selection tool bar. It's now vanilla input you can say.

Valdnet commented 2 years ago

In my opinion, it works incorrectly. It leaves the main application window.

ManeraKai commented 2 years ago

It just becomes hidden when the cursor leaves the screen right?

Valdnet commented 2 years ago

The edit bar overlaps the top bar of the application. I suggest that the selected text disappears when you scroll the text in the window. This will eliminate the problem of the edit bar leaving the main application window.

This is how it is done in other applications.