Helium314 / HeliBoard

Customizable and privacy-conscious open-source keyboard
Apache License 2.0
2.45k stars 97 forks source link

Show toolbar when all text has been deleted #993

Open Uranusek opened 4 months ago

Uranusek commented 4 months ago

Is your feature request related to a problem? Please describe. No, but it would make my typing more comfortable. This would also be compatible with the "auto show toolbar" setting, since once everything is deleted, the input field looks like when you open the keyboard, so the toolbar should be displayed.

Describe the solution you'd like After deleting all text, the toolbar will be displayed.

Use case I use the "select all" button, so sometimes I accidentally click that button and delete everything I typed. I can restore it with another button, but this requires expanding the toolbar, which is not convenient when typing quickly. By showing the toolbar after deleting everything, I could quickly restore it.

Describe alternatives you've considered (if any) Each time, expand the toolbar and click the "undo" button.

codokie commented 3 months ago

The toolbar should be shown if the 'auto show toolbar' setting is enabled and all text is deleted. If it does not, could you provide a recording or exact steps for reproduction + name of the app(s) with the issue?

Uranusek commented 3 months ago

This happens in every app. After deleting all the text, the words I use most often are displayed, i.e. "a", "i" and emoji.

I turned off "personalized suggestions" and turned it back on and now it's fine. I'll see if the problem persists if the keyboard learns the words. Then I will record.

I thought this was intended behavior and that's why I didn't report it as a bug.

Uranusek commented 3 months ago

The keyboard learned a few words and the problem returned.

See video https://github.com/user-attachments/assets/daf7e4f4-4ce5-41e3-8e99-76f78e37ecef

The app I'm typing in is Notally, but the problem probably occurs everywhere. I also noticed this on My Brain, Discord and in the browser.

codokie commented 3 months ago

thank you for the explanation, I do remember now this quirk with personalized suggestions from testing, but I wasn't sure if the toolbar was more important than those suggestions.

I think adding back the !suggestedWords.isPrediction() condition seen in line 1607 here should prevent those suggestions from auto-hiding the toolbar, but I have no time to test that currently

Uranusek commented 2 months ago

I'm testing. So far it's working great. Thanks.