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

"Enter" as line break #39

Closed Valdnet closed 3 years ago

Valdnet commented 3 years ago

When writing the text to be translated, the "Enter" key should start a new line of writing. Currently, it starts translating immediately.

ManeraKai commented 3 years ago

Thought of this. Either you have the Enter key or Auto Translating. You can't live without one of them.

Valdnet commented 3 years ago

I don't know if we understood each other well.

"Enter" - new line "Translate" - translation

ManeraKai commented 3 years ago

Enter means submitting the form so translating

A quote from my brain dictionary

I think you meant to change Enters key functionality from submitting to adding a new line?

Valdnet commented 3 years ago

I think you meant to change Enters key functionality from submitting to adding a new line?

Yes :+1:.

ManeraKai commented 3 years ago

@Valdnet It'll be done like that: https://github.com/ManeraKai/simplytranslate-flutter-client/pull/40#issuecomment-922257911

ManeraKai commented 3 years ago

Changed it. Added a float button for translation:

ManeraKai commented 3 years ago

Any design issue will be discussed here #33

Valdnet commented 3 years ago

The "Enter" key on the keyboard does not work. After tapping a key, it does not start a new line.

ManeraKai commented 3 years ago

Working fine on my emulator. Downloaded last artifact to my real device. Working fine too.

Valdnet commented 3 years ago

On my Android 10 smartphone, something like this is happening:

obraz

ManeraKai commented 3 years ago

Try to restart the device. I know one thing that may be causing this problem.

Valdnet commented 3 years ago

Try to restart the device.

Did not help. There is something in the application 😉.

ManeraKai commented 3 years ago

Hope it works: https://github.com/ManeraKai/simplytranslate-flutter-client/actions/runs/1275434226

Valdnet commented 3 years ago

No change. The "Enter" key still does not work.

ManeraKai commented 3 years ago

Can you try it on another device, because I really didn't change anything.

Valdnet commented 3 years ago

Previously, it worked on my smartphone 😁.

ManeraKai commented 3 years ago

One minute. Do the previous artifacts work fine at the moment?

Valdnet commented 3 years ago

The artefact Flutter build apk #50 does not work properly.

Valdnet commented 3 years ago

Maybe this commit did something wrong: https://github.com/ManeraKai/simplytranslate-flutter-client/commit/419982cfeb5f4fd230d7245a2c2a07ebf5332247.

ManeraKai commented 3 years ago

This commit was about the TextSelectionToolbar

Valdnet commented 3 years ago

Other commits would probably not spoil it.

ManeraKai commented 3 years ago

Let me try to comment the customization of the TextSelectionToolbar and see what happens.

ManeraKai commented 3 years ago

TextSelectionToolbar is disabled: https://github.com/ManeraKai/simplytranslate-flutter-client/actions/runs/1275539214

Valdnet commented 3 years ago

There is still a problem 😬.

Valdnet commented 3 years ago

For black theme, a gray frame appears around the window when I tap the "Enter" key. Maybe it will help?

obraz

Valdnet commented 3 years ago

This frame can be the glow of that gray background that appears in a light theme.

ManeraKai commented 3 years ago

Try to paste multi line text

Valdnet commented 3 years ago

Try to paste multi line text

I can paste without any problem.

ManeraKai commented 3 years ago

So you can paste. Can you add a new line or what can you and can't you do now?

Valdnet commented 3 years ago

If I paste a new line, I can only delete it.

ManeraKai commented 3 years ago

Can you try to change from Swift keyboard to the stock one.

ManeraKai commented 3 years ago

btw I meant pasting from the toolbar options. Not from the side buttons.

Valdnet commented 3 years ago

I can paste new lines from the toolbar and just delete them.

I noticed that when I type a space character tapping the "Enter" key removes it. If he enters several space characters, he removes them one by one each time he taps the "Enter" key, until it encounters a character, e.g. letters or numbers.

Valdnet commented 3 years ago

When removing the space characters with the "Enter" key, there is still a glow in the window, which I showed above in the screenshot.

Valdnet commented 3 years ago

Can you try to change from Swift keyboard to the stock one.

I don't have another keyboard in my system.

Valdnet commented 3 years ago

When selecting a language from the list of languages, the "Enter" key works correctly. Selects the given language.

ManeraKai commented 3 years ago

I'll disconnect the controller for that TextField. So You'll have just a vanilla multi-line TextField to type in, without character limit or anything like that.

ManeraKai commented 3 years ago

Or one minute, my emulator doesn't detect my keyboard Enter key. When I disabled the custom TextSelectionToolbar, I forgot that the textfield was wraped by a TextSelectionToolbarTextButton widget: image Going to delete that and see, but this will disable the custom TextSelectionToolbar.

ManeraKai commented 3 years ago

The glow even appeared for me too.

ManeraKai commented 3 years ago

I'm confident it will work: https://github.com/ManeraKai/simplytranslate-flutter-client/actions/runs/1275877228

Valdnet commented 3 years ago

It works in this version 👍.

ManeraKai commented 3 years ago

Means that it's because of the custom TextSelectionToolbar

Valdnet commented 3 years ago

You mean we can't use it?

And there will still be a problem with issue #61.

ManeraKai commented 3 years ago

Issue #61 is not a critical one as this issue. I'll find a fix for it, but we should get a release running at the time, because there has been so many changes done. Some Instances have even changed their domain name. We don't have time.

Valdnet commented 3 years ago

Well. Release a new version 😉.

Check also PR #109.

ManeraKai commented 3 years ago

Check also PR #109.

I've added some comments.