lab.js
lab.js copied to clipboard
enhance - script/dropDown : disable choice once already selected
What would you like or expect to see?
As discussed on the slack channel
Since having multiple time the same event listener will override the former one, we may do something to prevent user having trouble misunderstanding why his function didn't work.
Ideas
1 - Add a disable class with a text
We could color the already selected one in light-gray + we may add a text to describe that this is already been used (used
).
Pro:
- This may help the user realize that he cannot select multiple
- This may help the user realize what have already been used
2 - Remove the option
We could just remove the option, so the user wouldn't be able to select it
Pro:
- Easier and faster to select which one to chose
Con:
- Won't have the pro from the nr. 1
- May disturb the user, since he didn't see the option anymore and may don't know why
@FelixHenninger I'm more for the nr. 1 at the moment. What do you think of that?
Or maybe you have a better idea :)
Hej Raphaël, and thanks for the detailed write-up! I totally agree with you: Option 1 sounds great, and it's not a big step to the alternative.
That being said, as we discussed some time back I'm planning a major refactor from RRF to Formik which will touch a lot of the form components. I don't think the logic will change super-much overall, but you might wanna wait with the change (feel free to take a look and decide -- if you find this an easy fix, do go for it and the adaptation will be minor later on). Right now I'm first migrating from Redux v5 to v7, which is basically done in my local branch (the CI is failing right now b/c of our testing provider, when that works again I can push the commits), after that it's Formik time :-)
Thanks a lot for your issue, this is great! -Felix