android-fhir
android-fhir copied to clipboard
Make the autocomplete widget more usable
Is your feature request related to a problem? Please describe. I'm always frustrated when using the auto-complete widget to select a single option. To begin with, two letters need to be typed before any options are made visible. In addition, the widget unnecessarily expands to a multi-line widget.
Describe the solution you'd like
- When typing, I think it would be better if the suggestions would show after typing the first letter as opposed to the first two letters.
- If repeats is set to false i.e. only one option is allowed, after the option is selected, the widget should not expand to a multi line widget. It should remain on a single line.
- If repeats is set to false i.e. only one option is allowed, after the option is selected, the blinking cursor should disappear. If a user wants to replace the existing selection, they can tap the 'x' on the chip to remove it. Once it is removed, the blinking cursor can re-appear to signal they can add a selection once again.
Describe alternatives you've considered Currently using drop-downs instead.
Additional context N/A
Would you like to work on the issue? The autocomplete issue was originally worked on here, if the author could take a second look at it, that would be appreciated.
@f-odhiambo Kindly take a look
This will need to be triaged
i think these make a lot of sense
@KhumboLihonga Great suggestions, I agree with all of these recommendations.
Another challenge with the auto complete component is that you cannot see a list of options (if it were a dropdown you could see the list of all the options similarly to how https://github.com/google/android-fhir/issues/764 is described )
@KhumboLihonga What's the use case you're using auto complete for? Is seeing a list of options for auto complete important or not? Do you think you'd continue to use the auto complete component if the Filter/Search in a dropdown feature https://github.com/google/android-fhir/issues/764 was built.
Thanks for your input and feedback.
@shelaghm We have multiple places where we will use this. One of them is selecting a single practitioner out of a list of practitioners. These practitioners could be over a hundred names for some facilities so scrolling through that list can be a pain. Being able to quickly filter the names based on the initial input would really speed up the process.
With regards to https://github.com/google/android-fhir/issues/764, I think if this was implemented, we wouldn't need the autocomplete. Our current use cases deal with selecting a single item from the list so I think this would be great actually.
Thanks @KhumboLihonga Understanding your use case is very helpful. Sounds like https://github.com/google/android-fhir/issues/764 would be better since you don't need to select multiple options from the list. I would recommend we prioritize building https://github.com/google/android-fhir/issues/764 so you can use that component instead.
@shelaghm I agree.
Closed by https://github.com/google/android-fhir/pull/1722