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

Enhance OuiComboBox - refine type to search error handling #95

Open
3 tasks done
KrooshalUX opened this issue Oct 25, 2022 · 7 comments
Open
3 tasks done

Enhance OuiComboBox - refine type to search error handling #95

KrooshalUX opened this issue Oct 25, 2022 · 7 comments
Assignees

Comments

@KrooshalUX
Copy link
Contributor

KrooshalUX commented Oct 25, 2022

Problem:
Currently, OuiComboBox offers a variation for single selection. A user can either open the selectable UI and scroll to select a value, or search within the combo box to find a match for their query, and can make a selection, and the selectable portion of combo box is dismissed, retaining the selected value in the search field.

However, if the entered search does not match any values, the user is presented with an error state, and the search box is not cleared when the combo box search results are closed, retaining the error state. This feels clunky and like "yelling at the user", and could be further refined.
Screen Shot 2022-10-25 at 5 03 27 PM
Screen Shot 2022-10-25 at 5 03 32 PM

Solution:
As a user is typing, it is valid to present an error state when no match is found. However, if no selection is made because no value was selected, when the focus is lost from the input box, the value should be cleared or returned to the last valid selection. Provide a prop to builders to set this interaction (clear or returned).

In addition, it is not immediately obvious that search can be performed in the combo box, and I propose adding a prop to allow OuiIcon to be turned on/off by the builder.

Tasks:

@KrooshalUX KrooshalUX changed the title Enahnce OuiComboBox - refine type to search interaction Enahnce OuiComboBox - refine type to search error handling Oct 26, 2022
@ashwin-pc
Copy link
Member

ashwin-pc commented Oct 26, 2022

If this is supposed to behave as a select box, it should always have one of its options always selected, which means that

  1. I can provide a default value (This already has that)
  2. Once I select a value, I should not be able to clear it.I should only be able to select between other values. By clearing the value when the user loses focus for an incorrect value, I lose this behavior

@KrooshalUX
Copy link
Contributor Author

KrooshalUX commented Oct 26, 2022

@ashwin-pc good call out with # 2, I have updated the issue. Since its appropriate in some cases to clear the value, and other cases to fall back to the last valid selection, I have requested a prop to be added that would allow builders to configure the interaction.

@kaddy645
Copy link
Contributor

kaddy645 commented Oct 28, 2022

I thought , it allows us to select multiple options so default option won't be there. is it supposed to behave like "select" element in HTML ? There are different variant of Combo box, some allow us to add non existing option as custom option. so which one exactly we are talking about ?

@KrooshalUX
Copy link
Contributor Author

In the case of selecting multiples or a single (which is the use case for @ashwin-pc ) it is still weird when a value that is entered doesn't match anything. There is another implementation where if a string doesn't match a value, the user can create the value that way.

I am not sure how the component is constructed, but I do think we need to touch up the interaction.

@KrooshalUX
Copy link
Contributor Author

According to @ashwin-pc a default value can be set already. Is this accurate ?

@kaddy645
Copy link
Contributor

Default value here, means initially we can set selectedOptions, but once user start entering anything right or wrong, that value will get overridden and we will have retain that .

@KrooshalUX
Copy link
Contributor Author

KrooshalUX commented Oct 28, 2022

@kaddy645 I am not sure why we must retain that. Its leading to a poor user experience and is likely to increase errors.
The request is to clear the value (or at least allow clearing the value to be configurable) if it doesn't match unless the component is configured for custom options (renderOption & OuiComboBoxOptionOption)
Screen Shot 2022-10-28 at 3 15 01 PM

So, while this UI is correct while the focus is on the input box:
Screen Shot 2022-10-28 at 3 18 32 PM

this is not ideal once the focus is lost:
Screen Shot 2022-10-28 at 3 19 20 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Icebox : Do Not Action
Development

No branches or pull requests

5 participants