Repository navigation
Issues with voting on Proposals #714
Copy link
Copy link
Open
Description
Activity
To me the expected behaviour should be:
- Upvote button behaviour:
- When the current user has not upvoted or downvoted the post (grey upvote button with blue hover effect): Clicking the upvote button should increase the vote count by 1, change the upvote button color to red.
- When the current user has already upvoted the post (red upvote button with no hover effect): Clicking the upvote button should decrease the vote count by 1, change the upvote button color to grey.
- When the current user has already downvoted the post (red downvote button with no hover effect): Clicking the upvote button should increase the vote count by 2, change the upvote button color to red, and change the downvote button color to grey.
- Downvote button behaviour:
- When the current user has not upvoted or downvoted the post (grey downvote button with blue hover effect): Clicking the downvote button should decrease the vote count by 1, change the button color to red.
- When the current user has already downvoted the post (red button with no hover effect): Clicking the downvote button should increase the vote count by 1, change the button color to grey.
- When the current user has already upvoted the post (red upvote button with no hover effect): Clicking the downvote button should decrease the vote count by 2, change the downvote button color to red, and change the upvote button color to grey.
This behaviour is similar to the Reddit upvote/downvote feature.
Please take a moment to review this behaviour and confirm that it meets the expectations? Once I receive the approval, I will proceed with implementing the changes and submit a pull request.
- Upvote button behaviour:
- added a commit that references this issue
on May 19, 2023 The issue occurred because proposals/detail/comments.html is included multiple times in the proposals/detail/base.html.
And due to this when clicking on the vote button jQuery vote handler gets multiple times.
I am working on this and will raise a PR.Raised following PR for the fix: #764
PR changes:
Added event.stopImmediatePropagation() in jQuery vote lister so it gets triggered only once.- added a commit that references this issue
on Jun 18, 2023
Watch the Screencast on YouTube
I tried to upvote to check if it's possible to do it on our own submissions. Initially, the number of votes on it was 2.
Browser: Mozilla Firefox 74.0
I don't know which of the issues I listed are features working as-intended, but the current UX certainly have some problems.