When a user votes on an issue, the page reloads and all previous selections are cleared

Issue #76 resolved
udemi repo owner created an issue

We should make the issue voting 'on the fly', with nothing changing/updating/moving apart from the vote count on the page.

Comments (13)

  1. David Marrs

    UPDATE: Currently, I can still click on a thumb so that it appears I've voted up or down an issue if I'm not logged in. But if I'm not logged in it doesn't actually save my vote. I assume that rather than letting anonymous users vote we just want to disable the thumbs?

    Also, should the default display (0 votes up or down) be half red and half green rather than all red?

  2. David Marrs

    Because there was a problem with reverse lookups on the vote forms for issues at the bottom of the profile page, I have begun to move that display of issues into AngularJS on the develop branch.

  3. David Marrs

    Message from André (regarding yesterday's update):

    We want both.

    In case a user its not logged in the thumbs shouldn't be shown. Also, for security reasons we have to ensure requests to that call are not available to unauthenticated users.

  4. David Marrs

    I have added a check to the templates before outputting an anchor tag for the thumbs on the develop branch: if the user is not authenticated then a span is output instead.

    I am not sure that clicks for logged in users are registering on the server though: I need to check this next.

  5. David Marrs

    The database table likes_uservote is updating ok, it's just that I need to rebuild the solr index every time I vote to see the effect.

    I'm not sure that a user should be able to vote on their own issue though? I think we can assume they would be in favour, so no point giving them a vote.

  6. Enrico Piccini

    Yes, maybe you're right... if a user posted an issue, we can presume he's in favour... but on facebook you can like your post, so we can consider the post owner like like a extra favour :) it's ok like it working for now...

  7. David Marrs

    Huh, I didn't know you could like your own posts on facebook: weird!

    I have checked in the database and by examining the network tab in Chrome Developer tools, and it seems that you can't vote if you're not logged in (you get a 403 response). So if that check wasn't in place back in January, it has since been added.

    I have made a change so that the progress bars are half green and half red if no votes have been cast.

  8. Enrico Piccini

    Yes, if you're not logged in you can't vote... ok for the change you made... it's ok... Is develop branch working on your local machine without login error?

  9. Log in to comment