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] Upvote feature for blogs #173

Open
SamakshAgarwal1112 opened this issue Jul 15, 2024 · 2 comments
Open

[FEATURE] Upvote feature for blogs #173

SamakshAgarwal1112 opened this issue Jul 15, 2024 · 2 comments
Assignees
Labels
BSoC'24 Issues available during BSoC 2024 difficulty - hard enhancement New feature or request

Comments

@SamakshAgarwal1112
Copy link
Collaborator

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

The blogs model has a field 'upvotes' but currently it is not being used anywhere. Now that detailed blog pages are ready at '/blogs/' and general page at '/blogs' is almost done, we need to add an upvotes button for blogs.

Describe the solution you'd like!

Since currently we only have a detailed blog page for every blog at /blogs/<id>, so let's start the solution from there and when the basic setup is done, we can easily do it for blogs on /blogs page as well. The solution might include :

  • Making a new model upvotes, for mapping blogs and the user that upvoted it.
  • Use Ajax to update the upvote count dynamically without requiring a page reload.
  • User must be logged in to upvote a blog.
  • There is no need for a separate downvote button. If a user has upvoted a blog, simply deselecting will undo the upvote.
  • When the blog page at /blogs is ready, will be adding the feature there as well.

Describe alternatives you've considered

Feel free to suggest!

Developer Help

Feel free to ask for help incase of any doubt.

@SamakshAgarwal1112 SamakshAgarwal1112 added enhancement New feature or request difficulty - hard BSoC'24 Issues available during BSoC 2024 labels Jul 15, 2024
@ritankarsaha
Copy link
Contributor

@SamakshAgarwal1112 I would like to work on this issue. The approach would include updating the blog model to incorporate the upvote button and then rendering it in the respective blog template file to show the button.

@SamakshAgarwal1112
Copy link
Collaborator Author

@ritankarsaha Go ahead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BSoC'24 Issues available during BSoC 2024 difficulty - hard enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants