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

Replace Upvote/Downvote System with Like/Dislike Feature to Prevent Negative and Infinite Counts #143

Open
lokeshwar777 opened this issue Jun 13, 2024 · 0 comments · May be fixed by #144
Open
Assignees
Labels
bug Something isn't working feature UI/UX

Comments

@lokeshwar777
Copy link
Collaborator

Title: Bug in Upvote/Downvote System Allowing Negative and Infinite Counts

Describe the bug
The current upvote/downvote system for tutorials and comments allows negative and infinite counts, which leads to inaccurate and inconsistent data representation.

To Reproduce
Steps to reproduce the behavior:

  1. Go to any tutorial or comment.
  2. Click on the downvote button multiple times.
  3. Observe that the count can go negative.
  4. Click on the upvote button repeatedly without limit.
  5. Observe that the count can become excessively large (potentially infinite).

Expected behavior
The upvote/downvote system should be replaced with a like/dislike feature that ensures counts are finite and non-negative. Specifically:

  • Users should only be able to like or dislike an item once.
  • The count should accurately reflect the total number of likes and dislikes, without going below zero or exceeding realistic limits.

Desktop :

  • OS: macOS
  • Browser: Chrome
  • Version: 125.0.6422.141 (Official Build) (arm64)

Additional context
This issue highlights the need for a new like/dislike feature to replace the existing upvote/downvote system. The new implementation should:

  • Ensure the database interactions for user likes and dislikes align with the existing database design.
  • Implement these interactions for both tutorials and comments.
  • Include validation to prevent negative and infinite counts.
  • Provide a clear migration path from the current system to the new feature to maintain data integrity.
@lokeshwar777 lokeshwar777 self-assigned this Jun 13, 2024
@github-actions github-actions bot added bug Something isn't working feature UI/UX labels Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working feature UI/UX
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant