ansible / galaxy

Legacy Galaxy still available as read-only on https://old-galaxy.ansible.com - looking for the new galaxy -> https://github.com/ansible/galaxy_ng
Apache License 2.0
854 stars 328 forks source link

Allow hyphens in tags #1563

Open cutwater opened 5 years ago

cutwater commented 5 years ago

Feature Request

Use Case

Many users request allowing hyphens and underscores in tags.

This issue is for discussion and tracking progress on this topic.

chouseknecht commented 5 years ago

The problem we get into is people combining words. For example, if we make this change, then oracle_database becomes a valid tag, when in fact it should probably be two separate tags.

A tag is an object in our database, and we've attempted thus far to prevent duplicate tags. We already have an oracle tag and a database tag. With this change we would be allowing duplicates.

Now contemplate the Search interface. Using my example, I'm worried that in order to find all Collections related to Oracle and database, the user will need to search for tags oracle, database, oracle_database and oracle-database. That feels like bad UX.

cutwater commented 5 years ago

This is valid concern, however there are cases when having separator in tag is not for separating words but is a significant part of term itself. For example name of a standard nist_800-53 mentioned in #1150 or some real example from our database: csr1000v, oauth2proxy, oracle12cR2.

Also restricting users from having any allowed separator doesn't prevent them from combining words. These are also examples of existing tags people use.

AmazonDrive
ansiblerole
continuousintegration
continuousdelivery
virtualmachine

We cannot guarantee that people won't abuse tags and there will be no ambiguity. It's their responsibility to make their content searchable and use common sense when writing tags list.

Although allowing more than one separator may create extra ambiguity:

nist-800-53
nist_800_53
nist-800_53
nist_800-53

So I would not recommend allowing more than one:

chouseknecht commented 5 years ago

It's user data, so maybe we shouldn't care, and we should allow - and _.

ironfroggy commented 5 years ago

i think separators in tags are good, I like them over at StackOverflow for example, but I think Alex makes a good case about the ambiguity with all those variations of essentially the same thing. Allowing creators to express things is important, but coaxing them to create a good curation experience for all the consumers is, perhaps, more important, because that's the whole point of allowing them to tag content in the first place.