Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve inline suggestions #675

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft

Conversation

codokie
Copy link
Contributor

@codokie codokie commented Apr 11, 2024

Some password managers like KeepassDX and Bitwarden spam inline suggestion requests (at least in Android 14) so it flickers/disappears whenever a character is typed.

inline-flicker.mp4

This PR attempts to fix this issue to ensure the clipboard suggestions #647 work in tandem with the inline suggestions.
I also changed the expand toolbar key to show a "X" icon that dismisses the inline suggestions and prevent them from reappearing until the input is restarted. So it should also fix #681 as well

@codokie codokie changed the title inline suggestions flickering improve inline suggestions Apr 12, 2024
@codokie
Copy link
Contributor Author

codokie commented Apr 12, 2024

@RHJihan it should be possible to dismiss the inline suggestions now. Could you test it on your end?

@RHJihan
Copy link
Contributor

RHJihan commented Apr 12, 2024

Thanks. Works perfectly. Loved it.

I'm wondering what if someone needs the inline suggestions as well as the toolbar key? As the close button replaces the toolbar key. However, I have not found any case in my mind where this could possibly happen.

@codokie
Copy link
Contributor Author

codokie commented Apr 12, 2024

Thanks for testing it

I'm wondering what if someone needs the inline suggestions as well as the toolbar key?

If they frequently do that for a specific key then they can pin it.
It now works roughly the same way that Samsung keyboard handles it. If you dont need the suggestions then you would naturally dismiss them.
Once dismissed, inline suggestions may reappear only if the keyboard is reopened (the input is restarted)

@RHJihan
Copy link
Contributor

RHJihan commented May 31, 2024

Could you reproduce the inline suggestion clipping with this PR?
I can't confirm it myself as I don't have access to Android Studio right now. It's an older build with this & other PRs.

Screenshot_20240601_051617_Firefox

@RHJihan
Copy link
Contributor

RHJihan commented Jun 1, 2024

Samsung Keyboard has this dismiss button there and the inline suggestion is clipped. I don't know, but I thought it might be helpful for this behavior.

Screenshot_20240601_100529_Firefox

@codokie
Copy link
Contributor Author

codokie commented Jun 1, 2024

@RHJihan I checked and it seems like this empty space appears when no toolbar keys are pinned.
So far I don't think it is caused by the mPinnedKeys view.
The issue also occurs in the latest stable release so it was not introduced by this PR

@codokie
Copy link
Contributor Author

codokie commented Jun 1, 2024

Actually it is indeed related to the mPinnedKeys view.
I've set that view minWidth to 0dp in the xml and now the empty space is gone when there are no pinned keys.
No adverse effect on the pinned keys as far as I can tell

@RHJihan
Copy link
Contributor

RHJihan commented Jun 1, 2024

Great! Thanks for fixing this!

@codokie
Copy link
Contributor Author

codokie commented Jul 14, 2024

This PR needs to adjust to the breaking changes made in #647 and #674.
Unfortunately I won't have the time to do that soon.
I have also stopped using HeliBoard a while back so there is no real incentive for me to test it thoroughly

@codokie codokie marked this pull request as draft August 10, 2024 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Option to dismiss Inline Suggestion
2 participants