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

[FEATURE]: Add Rating System for Definitions #121

Open
1 task done
AyendiSimeon1 opened this issue Dec 3, 2024 · 4 comments
Open
1 task done

[FEATURE]: Add Rating System for Definitions #121

AyendiSimeon1 opened this issue Dec 3, 2024 · 4 comments

Comments

@AyendiSimeon1
Copy link
Contributor

Is this a unique feature/idea?

  • I have checked "open" AND "closed" issues and this is not a duplicate

Is your feature request related to a problem/unavailable functionality? Please describe.

No

Proposed Solution

This pull request introduces a new feature that allows users to rate definitions on a scale of 1 to 5 stars. This enhancement aims to improve user engagement and ensure the accuracy and quality of the content on jargons.dev.

Screenshots

No response

Do you want to work on this issue?

Yes

If "yes" to above, please explain how you would technically implement this

Ratings are stored in the database, associated with each definition, allowing for easy retrieval and display.
The system calculates and displays the average rating for each definition, providing valuable feedback to users.

@belloibrahv
Copy link

Hi @AyendiSimeon1,

I’m excited about the opportunity to contribute to the jargons.dev project and would like to work on [Issue #121](#121), which proposes adding a rating system for definitions.

My Plan for Implementation:

  • Database Integration: I will create a database schema to store ratings associated with each definition. This will allow ratings to be easily retrieved, updated, and displayed.
  • User Interface:
    • Implement a star rating component (likely using React) to allow users to rate definitions.
    • Display the average rating alongside the definition for transparency and engagement.
  • Backend API: I’ll implement API endpoints to handle rating submissions and retrieve the average rating for a definition.
  • Frontend Integration:
    • Ensure the rating system integrates seamlessly with the existing UI built with Astro and React.
    • Display real-time updates to the rating whenever a user submits a new rating.
  • Validation and Testing:
    • Validate ratings to ensure they are within the scale of 1 to 5 stars.
    • Write unit tests to ensure the feature is robust and bug-free.

Expected Outcomes:

  • A user-friendly rating feature that allows contributors and users to provide feedback on definitions.
  • Improved user engagement through interactive features.
  • Enhanced quality and relevance of content through visible ratings.

@AyendiSimeon1
Copy link
Contributor Author

@belloibrahv thanks for your interest. But we considering a case whereby a definition is updated, how do we manage the rating in that scenario?
What will be your approach to the challenge?

@belloibrahv
Copy link

belloibrahv commented Dec 14, 2024

@AyendiSimeon1 @babblebey

The Problem

When a definition is updated, the ratings may no longer match the new version. For example:

  • If people rated the old version 5 stars, but the definition changes, those ratings might not make sense anymore.
  • We need a way to handle ratings so they remain fair and useful after updates.

Ideas to Solve the Problem

  1. Start Fresh When a Definition is Updated

    • Each time a definition is updated, we clear the old ratings.
    • Why? This ensures that people only rate the new version of the definition.
    • Example: "This definition has been updated. Be the first to rate it!"
  2. Keep Old Ratings but Mark Them as "Outdated"

    • Old ratings stay, but we tell users they are for the previous version of the definition.
    • Example: "This definition was updated. Ratings before [date] are for the old version."
    • This keeps things transparent but still allows people to see old feedback.
  3. Track Versions of Definitions

    • Add a “version number” to each definition (like Version 1, Version 2).
    • Ratings will belong to a specific version.
    • Show only the current version’s ratings, but allow users to see ratings for older versions if they want.
    • Example:
      • "Version 2: ⭐⭐⭐⭐ (4 stars)"
      • "Version 1: ⭐⭐⭐⭐⭐ (5 stars) — Old Version"

@AyendiSimeon1
Copy link
Contributor Author

This is a nice idea
@babblebey whats your take on this?

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

No branches or pull requests

2 participants