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

Initial release & roadmap #1

Closed
6 tasks done
mxlje opened this issue Apr 26, 2021 · 1 comment
Closed
6 tasks done

Initial release & roadmap #1

mxlje opened this issue Apr 26, 2021 · 1 comment

Comments

@mxlje
Copy link
Contributor

mxlje commented Apr 26, 2021

Events

For now I have only implemented a single event, select, which is fired when the user selects a suggested item in the autocomplete. What other events (if any) do we want to fire?

Possible options/suggestions:

  • every time a list of results comes back (similar to onChange but with all results)
  • when no results are found
  • for errors (rate limiting & network errors)
  • as the user types (onChange basically)

Customization

I have implemented all autocomplete API params, but I think we should add a couple more customization options, more specifically:

  • placeholder text for the input field
  • debounce time (currently set to 300 ms)
  • autofocus

Do we need anything else to be customizable? This excludes visual changes like styling, dark mode, icons, etc, see below

Transitions / Animations

Do we want to add any of this? Notably Algolia Places does not have any either. I personally like not having animations as they very easily make the UI feel sluggish.

Clear button

We could add a little x button on the right to clear the input field.

Loading spinner

We could add a spinner animation for when the component is fetching results (#2)

No results

We don’t currently show a "no results found" message (and neither does the algolia places demo). Is this necessary?

Icons for different result types

Briefly discussed in Slack, we could vary the icon next to a result depending on its type. For example a train for train stations, a city for cities, etc.

Use browser location

We could allow using the user’s location through the browser API as is implemented in the component on our website.

Potential features after release

  • style customization (either fully through CSS or maybe through themes)
  • dark mode support for default theme

autofocus attribute

  • We should pass down the autofocus attribute as is expected for text input fields

add request header with component version

we could add a header to every request which would contain the version of the autocomplete component, which we could use to gain some insight into how many requests are made using the component as well if people upgrade the version etc

@missinglink missinglink self-assigned this May 3, 2021
@mxlje
Copy link
Contributor Author

mxlje commented Jun 10, 2021

I think we can close this and pick up individual items in separate discussions, if necessary.

@mxlje mxlje closed this as completed Jun 10, 2021
@missinglink missinglink removed their assignment Aug 17, 2021
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

No branches or pull requests

2 participants