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

Add command entry autocomplete #299

Open
2 tasks done
andrewtavis opened this issue Apr 29, 2023 · 8 comments
Open
2 tasks done

Add command entry autocomplete #299

andrewtavis opened this issue Apr 29, 2023 · 8 comments
Labels
-priority- High priority feature New feature or request help wanted Extra attention is needed

Comments

@andrewtavis
Copy link
Member

andrewtavis commented Apr 29, 2023

Terms

Description

Now that the data solution has been improved in #96, Scribe has dramatically more memory available to do some things that would have been difficult before. One great feature would be to add autocomplete to the command bar such that a user would be able to press to complete the rest of a word that's alphabetically the next word in the index column of the table being queried. Things to consider are:

  • We need to have the remaining text be greyed out to indicate that the autocomplete is possible
  • We cannot use the spacebar for this as there could be reflexive verbs in the future (to apply in German is sich bewerben) or small phrases
  • We need to figure out some kind of indicator to show that user that autocomplete is possible

With this in mind, to me the most obvious place for the user to click would be on the command bar itself. We could also show a similarly greyed out icon on the right side of the command bar to indicate that the bar can be clicked to enter the autocomplete text. The icon would only appear when a user begins typing in the command bar, and would disappear if they delete back to the prompt. A good option for an icon would be hand.tap from SF Symbols, which can be seen in the mockup below (note that the command bar cursor | would be between the entered and suggested text):

Screenshot_2023-04-30 00 15 40

Contribution

Happy to work on this myself or collaborate with someone on this :) I think this would be another really great feature to add!

@andrewtavis andrewtavis added feature New feature or request help wanted Extra attention is needed -priority- High priority labels Apr 29, 2023
@andrewtavis
Copy link
Member Author

@SaurabhJamadagni, would be great to get your feedback on this! I think it could really improve the user experience as it would also mitigate how much people would enter in something wrong 🤔 Would be very grateful to hear if you think this is the best way to do this though 😊

@andrewtavis
Copy link
Member Author

Suggestions for how best to implement this would also be welcome :D

@MykytaBabanin
Copy link

MykytaBabanin commented May 1, 2023

Hello, @andrewtavis I'd like to take this issue, so could you please assign it to me. It will be my first issue on this project.
I have for now, only one question, is this feature might be in English keyboard, or in every keyboard?

@andrewtavis
Copy link
Member Author

Hello @MykytaBabanin! 👋 Great to have your interest in Scribe! Happy to assign you :)

As of now Scribe actually doesn’t have an English keyboard, but we’ll be adding one in #7 once #16 is done. This feature would be available in all current keyboards though. Generally my thinking is that each time the user types in a command there is a new query of the corresponding SQLite database that returns the next word alphabetically (LIMIT 1 at the end). So a user presses the conjugate button after pressing the Scribe key and they’re asked to enter a verb to conjugate. As they type the word updates and they can press the icon on the side of the command bar or maybe the command bar itself to complete it.

Happy to answer more questions about where to look for things! This should be a fun issue and you’ll learn a lot about how the app works 😊

@SaurabhJamadagni
Copy link
Collaborator

Hey @andrewtavis, this sounds like a reasonable solution. My only concern with this is unintentional keyboard clicks when trying to tap the command bar. I think this would be a good solution. What about long pressing the spacebar? Could that be an option if we can't have just clicking the spacebar? The icon idea is great as well. 😄

@andrewtavis
Copy link
Member Author

Maybe let's go with just clicking the icon and not the command bar itself? We can also reuse some of the mechanics from commandState = .invalid in that case :) I'm thinking that getting someone to know that they need to long hold the spacebar is something that would be too difficult to do without a full tutorial.

@andrewtavis
Copy link
Member Author

@MykytaBabanin, checking in with you to see if there’s anything we can do to support you here. This is definitely a tough issue, so let us know if you need parts of the codebase explained or if we should break it down into smaller steps :)

@SaurabhJamadagni
Copy link
Collaborator

Yes @andrewtavis, I would be willing to assist @MykytaBabanin as well! Please let me know if there is any assistance I can provide :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-priority- High priority feature New feature or request help wanted Extra attention is needed
Projects
Status: Todo
Development

No branches or pull requests

3 participants