Skip to content

Renaming tag -> community_tag#6296

Merged
Nutomic merged 11 commits intomainfrom
rename-tag-to-community-tag
Jan 28, 2026
Merged

Renaming tag -> community_tag#6296
Nutomic merged 11 commits intomainfrom
rename-tag-to-community-tag

Conversation

@dessalines
Copy link
Copy Markdown
Member

This is a lot clearer since the tag table has a required community_id column.

Tables / objects should be named by their ownership level, and these tags are created and maintained by communities.

If in the future we want to add PersonTag, we can.

Unfortunately this PR breaks a diesel patch that adds image_details and person_actions to the joinable entities, solely because this changes the name of the tag table which is on an affected patch line.

I tried for like an hour to get this patch fixed, but I can't figure out how to do it properly.

This is a lot clearer since the tag table has a required community_id
column.

Tables / objects should be named by their ownership level, and these
tags are created and maintained by communities.

If in the future we want to add PersonTag, we can.

- Fixes #6292
Comment on lines -20 to -30
@@ -1333,8 +1333,10 @@ diesel::allow_tables_to_appear_in_same_query!(
registration_application,
report_combined,
search_combined,
site,
site_language,
tag,
+ person_actions,
+ image_details,
);
diesel::allow_tables_to_appear_in_same_query!(custom_emoji, custom_emoji_keyword,);
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is incredibly frustrating that just because tag is included in these lines, it breaks this entire section. I couldn't figure out how to fix this patch in this file.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Editing the patch file manually doesnt work in my experience. You need to make a copy of the auto-generated schema file, then make the changes manually and generate a new patch file with diff.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thx, I think I got it.

@Nutomic
Copy link
Copy Markdown
Member

Nutomic commented Jan 26, 2026

This will likely produce a lot of conflicts with #6290, best to merge that one first.

@dessalines dessalines marked this pull request as ready for review January 27, 2026 17:27
@dessalines dessalines requested a review from Nutomic January 27, 2026 17:27
@phiresky
Copy link
Copy Markdown
Collaborator

phiresky commented Jan 27, 2026 via email

@dessalines
Copy link
Copy Markdown
Member Author

Without going over all that discussion again, I think going forward its easier to just have separate tag tables by ownership level. Then they won't have conflicting namespaces also. These tags are created by community owners and belong to communities, so its clearer to have them be community_tag.

I'm doing all the front end for this now and its much clearer.

@Nutomic
Copy link
Copy Markdown
Member

Nutomic commented Jan 28, 2026

User tags would also be associated with a specific community (see #1456). There is also an issue for global user flairs but those would work in a completely different way. Other than those I cant think of any reasonable use for flairs which would be unrelated to a community. So this name change only makes it more explicit what the tags are used for.

Edit: API tests need fixing.

@Nutomic Nutomic enabled auto-merge (squash) January 28, 2026 11:09
@Nutomic Nutomic merged commit a42e6bc into main Jan 28, 2026
2 checks passed
@Nutomic Nutomic deleted the rename-tag-to-community-tag branch January 28, 2026 20:50
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

Successfully merging this pull request may close these issues.

Rename Tag to CommunityTag

3 participants