Skip to content
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

Allow Tags with spaces in them #868

Closed
sbonardt opened this issue Jan 30, 2014 · 18 comments
Closed

Allow Tags with spaces in them #868

sbonardt opened this issue Jan 30, 2014 · 18 comments

Comments

@sbonardt
Copy link
Contributor

When using a taxonomy of type 'tags' it is not possible to add tags with a space in it, e.g. 'Den Haag' or 'Belgian Beers'

The tagging function splits it automatically into two tags. Could tags be separated by comma?; or allow creation of tags with space be between quotes like "tags with spaces"?

@GwendolenLynch
Copy link
Contributor

+1 and I had been meaning to add this request myself... Of course because I wanted to tag 'Belgian Beers'

@mikerockett
Copy link

I'd never thought of this myself. I've always considered tags to be more like the tags you find on Stackoverflow, which are lower case, and separated by dashes. But I can see why one would want them in a site/blog.

I see that the documentation does not specify what kind of tags are recommended for Bolt either. However it makes reference to Delicious, which uses lower case tags.

This should go up for discussion as no specific rules have been defined. One thing that may be mentioned is that tags do not allow spaces as a) it makes them easier to slug, and b) it makes them less like categories.

@sbonardt
Copy link
Contributor Author

Yes, Delicious does allow tags with spaces, and with Capital letters as well. Among other things, this is what's stated on their "add link" interface near the tags field:

  • Lowercase tags are recommended
  • Spaces are allowed but not recommended

Although your last sentence does have a point. Spaces would make them harder to slug, but would a 'space to dash' conversion for the slug make sense?
Next to that your b) remark about them being less like categories made me question my real intention for this
My current 'problem' is I want my client to be able to add tags/categories 'on the fly' to a taxonomy when creating content. So I kind of need a category type taxonomy which allows for easy adding items/options to it through the interface when creating/editing a piece of content (like using tags) and I am currently (probably) misusing the tags taxonomy type for that.

So I think my real problem is a lack of an intuitive enduser interface for adding category options to a category type taxonomy.

But this still leaves us with the spaces in tags question though. Allowing spaces and making tag entering separated by comma would be nice I guess.I've found more duscussions about tags & spaces and delimiting them and two points in favor of comma separated tags and allowing spaces them are:

  • It's more natural (user-centric not techie-centric)
  • It reduces redundancy, as the example noted "favorite-recipes" "favorite_recipes" "FavoriteRecipes"

from: http://stackoverflow.com/questions/5681955/why-should-tags-be-space-delimited

@mikerockett
Copy link

Spaces would make them harder to slug, but would a 'space to dash' conversion for the slug make sense?

Didn't say it was harder, just said it was easier. It's just one of those things that separates tags from categories.

My current 'problem' is I want my client to be able to add tags/categories 'on the fly' to a taxonomy when creating content. So I kind of need a category type taxonomy which allows for easy adding items/options to it through the interface when creating/editing a piece of content (like using tags) and I am currently (probably) misusing the tags taxonomy type for that.

I think a better option here would then be to allow the users to add new categories on the fly from the content-type editor. However, it would be difficult as these are not stored in the database at first. One day it may become a feature, depending on how many developers would prefer it.

Having said that, I do agree with you. Tags should be quite flexible and much more natural to a user who is not familiar with the current specific setup.

Let's see what @bobdenotter thinks about this.

@bobdenotter
Copy link
Member

I think a better option here would then be to allow the users to add new categories on the fly from the content-type editor.

No, absolutely not. We already have a name for "categories you can add on the fly", which is "tags" ;-)

Changing the behaviour of tags to allow tags with spaces in them is fine by me, though. We should do that! See also related issue #826.

@GwendolenLynch
Copy link
Contributor

I'm having a look at this one at the moment @bobdenotter, it must be my week or something.

Making the change to Select2 is a two-line change in _sub_edittaxonomies.twig, but tags are written/retrieved in the slug field of bolt_taxonomy table... I am looking in Storage.php and Content.php, and I think that the retrieval point is at sortTaxonomy():

if ($taxonomytype['behaves_like'] == "tags") {
                continue;
            }

Is there an existing function in Storage that looks up the tag slug in the db that can be used/enhanced? And of the top of your head, where is the setting done for write back to the db?

@sachbearbeiter
Copy link

+1 have this problem now for (flexible) room tags like: "Exhibition area"

@leup
Copy link

leup commented Oct 21, 2014

👍 I would also need to add "#" to the allowed characters list for tags, as in "C#"

@XusBadia
Copy link

Hope this doesn't get forgotten. ;) I'm trying to get tags with spaces and copy and paste sometimes works, but sometimes doesn't, which is a bit frustrating.

@bobdenotter
Copy link
Member

I - personally - don't give a rat's ass about this. This will either get implemented because a (paying) client needs it, or somebody from the community steps up, and makes a Pull Request for it. hint hint

@leup
Copy link

leup commented May 19, 2015

You could say that this is not a priority and so that you don't - personally - intend to implement it but that you don't give a rat's ass is not a valid argument. I had to go with a different CMS because of that issue and that was unfortunate because I really wanted to give Bolt a chance "in production". That did not happen. It was too much a job at the time to give a go to Bolt over another CMS. As you stated in the last development roadmap that you want Bolt to be as user friendly as possible, this is an issue that is definitely not user friendly (to my opinion). My comment here has nothing to do with the paying customer or community involvement part, I do understand your comment on that. Good luck with the hint ;)

@XusBadia
Copy link

I understand your position and that there are more important issues to tackle right now, but I still think this is not a niche feature, as well as the Capital letters for tags.

Hope someone follows the hint, though!

@bobdenotter
Copy link
Member

@leup

I had to go with a different CMS because of that issue and that was unfortunate because I really wanted to give Bolt a chance "in production".

Sorry, but I don't buy that. You're telling me that Bolt fit all your needs perfectly, and you decided not to use it because you couldn't use spaces in tags? That's blackmail, you know it, and I will have none of it.

As you stated in the last development roadmap that you want Bolt to be as user friendly as possible, this is an issue that is definitely not user friendly (to my opinion).

I do, but our collective time as developers is unfortunately limited. We choose to spend this time on stability fixes for 2.2, and adding new (often requested) features like inline editing and template-specific fields. You're absolutely right that there's room for improvement, but I'm sure the things we did work on are more important for a lot of people.

@XusBadia

Hope someone follows the hint, though!

So do I. Just to re-iterate, we'll gladly accept code-contributions for this. Including helping out with feedback and troubleshooting if needed.

@leup
Copy link

leup commented May 19, 2015

@bobdenotter
Blackmail ? Man you should relax. At the time (don't remember exactly but I think it was still the version 2 in beta) Bolt has other flaws, but some that we could work around, some that we could fix with module(s). This one was not fixable (space in tags but also special characters like #, see my other comment above) without a good amount of job. And indeed, between two CMS we had to choose. We had time and budget constraints too and so we choose the other one (which has his flaws too but that we could all work around or fix). We have used Bolt for other projects since then, projects with other requirements and constraints. We did not stay on "Hou Bolt don't do that, we won't use it never again ! Bah !". So please don't take my comment the wrong way. I just say that this is a real issue (I repeat: in my opinion), I do hope that this we'll be fixed someday. Not by us for the time being as we are too much busy right now. Keep up the good work !

@bobdenotter
Copy link
Member

I do hope that this we'll be fixed someday. Not by us for the time being as we are too much busy right now.

That's the thing that rubs me the wrong way, I think. To me this sounds like "This is very important for us. Just not important enough to fix ourselves, but still very important."

Yeah, i might come off a bit strong occasionally, but that's only because I care about Bolt, and I spend a lot of time working on it, and we do many feature requests. We just can't please everybody all of the time.

@aerth
Copy link

aerth commented May 19, 2015

Tags should have no spaces, and should be case insensitive. I think if you want spaces in your tags the best way is to have some kind of twig filter that changes dashes to spaces

@leup
Copy link

leup commented May 20, 2015

Is there a way to keep the tag management as-is and use the translation engine to have a formated label on the presentation side, may be as a twig filter as you suggest ? Could it be a workaround ? Just to be clear, it was not just spaces in tags but also some special characters (as the #). It's been a while that I take a look at this and a lot have changed since then so not sure what's possible or not nowadays. So having a tag "c-sharp" for example in the database but that could come out as "C#" via a text string translation: "c-sharp => C#'

@bobdenotter

To me this sounds like "This is very important for us. Just not important enough to fix ourselves, but still very important."

My 2 cents here were to say that other CMS offer this kind of ability and I think this could be a drawback for certain projects as I gave example by my experience.

@GwendolenLynch
Copy link
Contributor

Done thanks to @hannesl

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

No branches or pull requests

8 participants