Codelabz
Codelabz copied to clipboard
Feature: Enhance comment section and connect the upvote/downvote actions to backend
Is your feature request related to a problem? Please describe.
- Same button is used to display replies for a comment and a field to add a reply.
- No way to close the reply field once it is opened.
- All the replies on a comment are displayed at once unlike in comments where only 3 are shown and a
load more
option is provided. - Username is not displayed on the comment.
- While creating a comment a static value called
codelabzuser
is used instead of current user handle. - Upvotes/Downvotes are mere increment/decrement functions that are not connected to the backend.
- One user can upvote/downvote a comment infinitely.
Describe the solution you'd like
-
reply
button will continue to display the reply input field, but a different buttonshow replies
will be added which will display the replies on a comment. -
show replies
andreply
buttons would toggle display/hide state of replies and input reply field. - Display only 3 replies at once and a button
load more
is added to display more replies if they exist. - Display username on the comment to let users know who posted that comment.
-
userId
of the current user should be provided while creating a new comment instead of a static value. - Three new fields should be added to comments collection namely
totalUpvotes
,isUpvotedBy
,isDownvotedBy
, wheretotalUpvotes
is an integer which stores the net upvotes of a comment andisUpvotedBy
andisDownvotedBy
are two arrays which store IDs of users that upvote or downvote it. So, when a user upvotes a comment their ID is stored inisUpvotedBy
array of that comment andtotalUpvotes
is increased and vice versa. - User can only upvote or downvote once.
Additional context https://github.com/scorelab/Codelabz/assets/58631166/89472f5b-e15a-4669-a78c-ec9433852cd2
@shivareddy6 @ABHISHEK-PANDEY2 Hi, can I be assigned to work on this issue?
@shivareddy6 @ABHISHEK-PANDEY2 i am already working on the similar issue which covers this can i add more towards this i would like you to assign me
@Huzaif-Ahmed Hi, can you point me to the issue you are working on?
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.