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

Display autosuggest suggestions on initial focus #5420

Open
BenParizek opened this issue Jan 10, 2020 · 0 comments
Open

Display autosuggest suggestions on initial focus #5420

BenParizek opened this issue Jan 10, 2020 · 0 comments

Comments

@BenParizek
Copy link
Contributor

@BenParizek BenParizek commented Jan 10, 2020

Description

Currently, if you have an empty autosuggest field and no value in it when you focus on the field the autosuggest field continues to display just like a plain text field. If you add a value, the unfocus from the field and return to focus on the field, the autosuggest suggestions dropdown immediately appears. If you have a value and delete the characters of that value until there are no characters in the field, the suggestions dropdown also appears.

It would be nice if the suggestion dropdown appeared the first time the field is focused on as well.

For common suggestions like Environment Variables and Aliases and Templates, it may be clear what a user will want to type in an Autosuggest field. However, in less common settings in plugins, where we want to stay consistent with the UI, it is not always as obvious what the user may want to type into the autosuggest field and having the suggestions appear immediately helps communicate the range of options available.

For one example, in Sprout SEO we let a user choose a character that displays between two sections of the meta title. In this case, the dropdown suggestions for the autosuggest field are single characters:

- : Dash
| : Pipe
/ : Forward Slash

While this example is likely one of the extremes, it illustrates well that for less common suggestions, when the suggestions don't appear immediately, it may not be clear to the user that common options are suggested to them as examples, until they start adding characters to the field. The main goal here isn't to ease the users ability to choose a single character but to show the user several examples of how they can use the field. Using the autosuggest field to show these examples is a nice, in-context way to do this as an alternative to a lengthy, paragraph-style, instructional comment.

Steps to reproduce

  1. Create a new Asset Volume
  2. Focus on "File System Path" setting
  3. No autosuggest options appear

VS

  1. Edit an existing Asset Volume
  2. Focus on "File System Path" setting that already contains a value
  3. See autosuggest options immediately appear as a dropdown

Additional info

  • Craft version: Craft CMS 3.3.19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.