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

toolbar modes #838

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

toolbar modes #838

wants to merge 10 commits into from

Conversation

codokie
Copy link
Contributor

@codokie codokie commented Jun 3, 2024

I added a list preference to the new toolbar section that allows one to select one of the following toolbar modes:

  1. Hidden -> hides the strip container completely when the main keyboard is open
  2. Toolbar keys -> shows only the selected toolbar keys. Hides the expand toolbar key*
  3. Suggestion strip -> shows only the suggestion strip & pinned keys. Hides the expand toolbar key*
  4. Expandable toolbar -> allows to switch between (2) and (3) with the expand toolbar key (current behavior, default)

(*) When incognito mode is on, the expand toolbar key will still be shown with the incognito icon but it won't allow expanding/collapsing the toolbar

I also tried to reduce some of the activity in the SuggestionStripView class depending on the selected mode.

fixes #732, fixes #374

# Conflicts:
#	app/src/main/java/helium314/keyboard/latin/LatinIME.java
#	app/src/main/java/helium314/keyboard/latin/settings/Settings.java
#	app/src/main/java/helium314/keyboard/latin/settings/SettingsValues.java
#	app/src/main/java/helium314/keyboard/latin/suggestions/SuggestionStripView.java
#	app/src/main/java/helium314/keyboard/latin/utils/ToolbarUtils.kt
@devycarol
Copy link
Contributor

Sorry to intrude, but do you think it'd be simple to have "flex space" as an item in the toolbar key list? This way, you could have icons on both sides of the toolbar/suggestion strip.

Perhaps the toolbar could then be a simple toggle, and the expander position could be a list pref of "start, end, none." You could probably still auto show/hide the suggestions in the 'none' case.

This is really cool stuff! :)

@codokie
Copy link
Contributor Author

codokie commented Jul 17, 2024

In my opinion a flex space toolbar item would make sense only if you could customize the toolbar keys by moving them around like in Florisboard/Desktop Firefox
I could add a toggle that enables/disables the toolbar, not sure if that would be preferable over the "Disabled" toolbar mode in terms of UX.
It is quite simple to add a preference for the expander position, I have done something similar here by replacing the "Variable toolbar direction" setting with an option to manually choose the direction (right, left, or variable) of the toolbar (which includes the expand toolbar key). I haven't opened a PR for it because I don't have time to ensure it satisfies all the contributions guidelines

@devycarol
Copy link
Contributor

devycarol commented Jul 17, 2024

Why remove the variable toggle? Selecting 'variable' from a drop-down doesn't imply a particular direction preference for LTR/RTL.

Imo, the best approach would be a choice of how to initially place the expander (right, left, none) and a choice of whether to invert for RTL.

@codokie
Copy link
Contributor Author

codokie commented Jul 19, 2024

Sorry I misspoke. It says "Subtype" in the new drop-down, which means it follows the direction of the currently selected subtype (current behavior when "Variable toolbar direction" is enabled). Perhaps "Follow subtype" would be a better fit for the option name.
I think the current setting is confusing and not applicable for ~90% of the user who don't type from RTL.
In my opinion, there would be no need to set the expand toolbar key position separately if you could set the direction of the whole toolbar (and then the expander key would follow it).
I also believe that key is still integral even when the toolbar is set to expand/collapse automatically.
But all that is mostly off-topic here

@herrbrixter
Copy link

  1. Expandable toolbar -> allows to switch between (2) and (3) with the expand toolbar key (current behavior, default

For mode (4), please add a preference as to which toolbar is the default. The current behavior is:

a. Defaults to suggestion strip then can be switched to toolbar.

I want the reverse because I rarely use the suggestions. I use the copy, paste, select all more often.

b. Defaults to toolbar then can be switched to suggestion strip.

@codokie
Copy link
Contributor Author

codokie commented Aug 3, 2024

@herrbrixter you could use the "auto show toolbar" setting (already available in stable release) to essentially set the (main) toolbar as the default

@CodeCubeNeo
Copy link

Maybe also add the option to just hide the toolbar (and suggestions) altogether?

@codokie
Copy link
Contributor Author

codokie commented Aug 5, 2024

@CodeCubeNeo but i've already added that..

Hidden -> hides the strip container completely when the main keyboard is open

@TitoCen
Copy link

TitoCen commented Aug 8, 2024

How would I be able to use this? Thank you

@BlackyHawky
Copy link
Contributor

@TitoCen
The only way to use this feature is to compile the application yourself and integrate this PR or wait for Helium to take care of it and integrate it into a future release.

@The-Koala
Copy link

Just registered to Github for that specific thread : I never use the toolbar on keyboards, having the ability to remove it entirely would be awesome and free up some screen space ! 😍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
7 participants