Skip to content
This repository has been archived by the owner on Apr 3, 2024. It is now read-only.

Remember selected validators #92

Open
LeaTark opened this issue Feb 21, 2017 · 1 comment
Open

Remember selected validators #92

LeaTark opened this issue Feb 21, 2017 · 1 comment

Comments

@LeaTark
Copy link

LeaTark commented Feb 21, 2017

Currently selected validators aren't persisted in the picker so picking a new one wipes out those already picked unless all are picked again.
That behaviour may be intentional but it wasn't expected.

@Nicholas-Westby
Copy link
Contributor

We have a couple options to implement this. Here is what we currently have:

email-field

Here's the tree that appears when "Pick Validations" is selected (I clicked "Email Address" and "Phone Number" after it opened, which is why they are shown here as selected):

pick-validations

One option would be to make the "Pick Validations" button be additive. That is, when you pick more validations, they are added to the list. However, then there would be no means of removing validations, so then we'd probably want to allow each validation to be removed (maybe with a little "X" button next to each of them).

Alternatively, when "Pick Validations" is clicked, the tree could "remember" the already chosen validations, which would both allow for new validations to be chosen as well as allow for existing validations to be unchosen.

The second solution seems more intuitive, but I don't like that it could be challenging to deselect your already selected validations (since there are folders, it might be hard to find the validations you already have selected). Maybe we could provide a "Clear Selection" button to help with that? Or maybe we could show chosen items in a separate non-tree list that makes it easy to unselect them?

On the other hand, there are also some gotchas with the first solution. For example, do you display the already selected validations differently when the tree appears, to make it clear you cannot select already selected validations? Or, do you simply remove duplicates when combining the existing and the newly chosen validations?

Whoever works on this should think through these issues before a solution is chosen. The above solutions aren't necessarily the only options, but they were the first options that came to mind. Maybe we could go with a combination of the above ideas. I am definitely open to other solutions if anybody has ideas.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants