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

Add report fingerprint functionality #705

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

Conversation

WithoutPants
Copy link
Collaborator

Adds a vote field to the FingerprintSubmission input. This supercedes the unmatch field, which is now deprecated. If vote is positive, then the submission is treated as an ordinary submission. If vote is negative, then the submission is treated as a report. If vote is 0, then it is treated as an unmatch operation. If vote is omitted altogether, then it is assumed to be a normal submission, unless unmatch is set to true, per existing behaviour.

Adds reports field to the Fingerprint type. This value is the number of users that have reported a fingerprint. Also adds a user_reported field which returns true if the current user reported the fingerprint. Scene fingerprints are now ordered by submissions - reports.

The UI is changed to indicate how many reports a fingerprint has. The button to remove a user submission is shown in the appropriate place based on if the user submitted or reported the fingerprint.

image

@WithoutPants WithoutPants added the enhancement New feature or request label Aug 25, 2023
@InfiniteStash
Copy link
Collaborator

Looks good! Is the idea that the logic for submitting and evaluating reports stays is implemented in the stash tagging interface?

unmatch: Boolean
unmatch: Boolean @deprecated(reason: "Use `vote` with 0 instead")
"positive for default behaviour, negative to report as invalid, zero to remove vote"
vote: Int
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should ideally be an enum so we don't have to clamp it, but I guess that would mean duplicating the type and creating translate functions, which sounds tedious.

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

Successfully merging this pull request may close these issues.

None yet

2 participants