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

Closed
lokeshwar777 opened this issue Jun 13, 2024 · 2 comments · May be fixed by #144
Closed
Assignees
Labels
bug Something isn't working feature stale 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.
Copy link

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale label Jul 14, 2024
Copy link

This issue was closed because it has been inactive for 14 days since being marked as stale.

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 stale UI/UX
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant