FEATURE: Tag synonyms

This feature adds the ability to define synonyms for tags, and the ability to merge one tag into another while keeping it as a synonym. For example, tags named "js" and "java-script" can be synonyms of "javascript". When searching and creating topics using synonyms, they will be mapped to the base tag.

Along with this change is a new UI found on each tag's page (for example, `/tags/javascript`) where more information about the tag can be shown. It will list the synonyms, which categories it's restricted to (if any), and which tag groups it belongs to (if tag group names are public on the `/tags` page by enabling the "tags listed by group" setting). Staff users will be able to manage tags in this UI, merge tags, and add/remove synonyms.
This commit is contained in:
Neil Lalonde
2019-12-04 13:33:51 -05:00
committed by GitHub
parent 15c2755b7b
commit 875f0d8fd8
40 changed files with 1246 additions and 105 deletions

View File

@@ -0,0 +1,7 @@
# frozen_string_literal: true
class AddTargetTagIdToTags < ActiveRecord::Migration[6.0]
def change
add_column :tags, :target_tag_id, :integer
end
end