-
-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Desktop: Use the react-select library for tag input #1589
Conversation
I think deleting tags with backspace is fine. It's not that you delete the tag, but remove it. Thus re-adding it will not be an issue, if a user accidently removes it. |
I also think that using backspace for deletion is fine. It's nice that you found a lib we can use for this. I'll try your pr soon. |
Okay, I've enabled backspace to delete tags. I anticipate that there will be a few complaints about it, but I agree that the majority should appreciate it. |
Looks good overall, just a few things I've noticed:
If it's too complicated to customise the tag CSS (i.e. if we need to add special CSS files or rules to theme.js) then just ignore the last two comments. |
All done! I didn't think the css tweaks were possible but when I looked again it was pretty easy to do. |
It works great now, thanks a lot @CalebJohn! |
By the way, it's fine to have multiple commits on a pull request. In the end I always do a "Squash and merge" anyway so there will be only one commit on master. |
Thanks @laurent22 that's good to know. |
I finally found a stable input that we can use for tags, react-select
It's very flexible which means we can change the behaviour however we like.
One thing I was sure about is deleting tags with backspace.
Currently the user cannot delete tags by pressing backspace while the cursor is next to an item. I intentionally disabled this to prevent users from accidentally deleting tags. Personally I would prefer to delete using backspace, so I thought I would reach out for opinions and see what others felt would be the most sane behavior.
edit: fixes #1535