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

Delete changeset tags #5309

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

AntonKhorev
Copy link
Collaborator

@AntonKhorev AntonKhorev commented Nov 7, 2024

Lets moderators delete changeset tags. A typical use case is somebody creating a changeset with a comment tag that says "my house" or "<person's name>'s house" which DWG is later asked to remove.

Fixes #5219.

Moderators will see the "Manage changeset tags" link at the bottom of the changeset page:
image

It leads to a page like this:
image


There was another attempt at tag hiding with a different approach #1167. It required database schema changes and marked the entire changeset as having its tags hidden. The tags were still kept in the database.

This PR doesn't change the schema and actually deletes the tags. Such deletions are not unusual and happen during regular changeset updates:

ChangesetTag.where(:changeset => id).delete_all

@gravitystorm
Copy link
Collaborator

The big question for me is how updates are propagated to the changeset replication feed. Otherwise if you delete tags on the website, they will still be shown in all systems that consume the feed.

@AntonKhorev
Copy link
Collaborator Author

AntonKhorev commented Nov 7, 2024

The big question for me is how updates are propagated to the changeset replication feed

This is one of the excuses why hiding/deleting changeset tags wasn't done before. There are others such as we don't have changeset versions to store previous set of tags.

If the feed is generated by this, tag deletions probably won't be propagated. But we can automatically add a changeset comment saying that some tag was deleted, this should get picked up by the feed.

@gravitystorm
Copy link
Collaborator

This is one of the excuses why hiding/deleting changeset tags wasn't done before.

I'd call it a 'good reason', not an 'excuse'. Having a user interface to remove or edit tags is straightforward, but making sure the updates are properly replicated is required too.

@AntonKhorev AntonKhorev marked this pull request as ready for review November 9, 2024 11:12
@AntonKhorev
Copy link
Collaborator Author

I've decided against automatically adding a comment to trigger the replication. Surely moderators can add a comment after deleting tags. Or they can choose not to add a comment if they don't want to replicate the changes, although that's less likely.

@AntonKhorev AntonKhorev added changesets Related to the Changesets feature moderation Related to moderator features, like reports, issues or user blocks labels Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changesets Related to the Changesets feature moderation Related to moderator features, like reports, issues or user blocks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add the ability to redact changeset comments
2 participants