Topics are now rewritten into names they were never defined to be

Summary

Somewhere between the %11.8 and the %11.11, project labels were renamed to project topics, and the values set as project topics are now modified between their settings and what is displayed on project page, and topic search page.

This is not only inconsistent, but also unneeded.

Steps to reproduce

  1. Create a project,
  2. Add three topics by using the following line: "CaseSensitive, foo-bar, space in the middle"
  3. Topics are comma separated, and trimmed, so we should end up with "CaseSensitive", "foo-bar", and "space in the middle"
  4. Topics on project page are shown as "Case Sensitive", "Foo Bar" and "Space In The Middle".

Note that APPCAPS, lowercase will also be transformed into "Allcaps" and "Lowercase"

What is the current bug behavior?

None of these rewrites are warranted:

  • Commas are used for topic separation. For that reason, spaces in the middle of topics were already accepted before.
  • There's no rational for separating "CamelCase" into "Camel Case". ie: if the topic is "GitLab", then it becomes "Git Lab" and that is incorrect. Also, "DevOps", "AngularJS", ...
  • There's no rational for lower casing: acronyms are frequent, "GNU" or "MIT" would become "Gnu", "Mit". Also
  • Same for dashes: "gitlab-ci" becomes "Gitlab Ci"

All the tags mentioned above are currently used as project topics.

Any valid software project name, IT acronym, etc that exist as of now, and that is used as a project topic on GitLab, is now printed incorrectly: GitLab, DevOps, IMAP, .NET, VLC, DotJS, GNU, RHEL 7, g++, git-svn, ...

What is the expected correct behavior?

Do not toy around, apart from a ltrim + rtrim, with topics.

Misc

  • The new behavior isn't even consistent with the tool tip shown when there are more then 3 topics. The topics hidden in the tool tip aren't modified.

gitlab_topics

  • New behavior is not consistent with issue labels nor merge request labels.

I know I'm being pedantic, but there was nothing wrong with how it was before.

Edited by Julien Lecomte