OCHA-DAP / hdx-ckan

A repo for HDX's configurations and extensions to CKAN
Other
75 stars 24 forks source link

Paste Multiple Tags #2381

Open pjdufour opened 9 years ago

pjdufour commented 9 years ago

Users should be able to paste multiple comma separated tags into the "Tags" metadata field. The UI and underlying field values are not in sync. If you paste tags, they'll end up being added, but won't display in the actual form field consistently (so the user doesn't actually know if worked). Manually typing out multiple tags takes a lot longer than just copying and pasting from an existing list (that you've already created offline somewhere for other metadata purposes).

danmihaila commented 9 years ago

@mbellotti - I know you have assigned another issue related to tags. Can you also research this question from Patrick and give an estimate?

mbellotti commented 9 years ago

Essentially this is a bug in the Select2 library, you can see the same behavior in their example page (https://select2.github.io/examples.html). So fixing it means either replacing the select2 library for tags or modifying select2 to fix the bug.

It's hard for me to estimate this since this is a javascript task and javascript is by far my worst language. I've been playing around with this bug for the last two hours, probably more economical to assign it to someone else who's better with js.

aalecs commented 9 years ago

I tested out on the Select2 page pasting a comma separated list of items and it seemed to work... the only glitch is if you don't have a comma after the last item which can be fixed also ... see: http://stackoverflow.com/questions/25367499/auto-tokenize-last-item-in-pasted-string-using-select2 The only question now is if it's worth upgraging Select2 :) @cjhendrix

cjhendrix commented 9 years ago

I think you'll need to give an estimate to Aidan and Dan so they can prioritize the work. It's a request coming from some user a while back, so if it's not a major time investment, I'd suggest we do it. It would have been helpful in the first days after nepal when we were generating lots of datasets with many tags in common.

mbellotti commented 9 years ago

Even with the trailing comma I can't get it to work correctly. Not on FF, not on Chrome :/