near the end of http://drupal.org/node/51561, dries brought up that he didn't like the way i was trying to display the current user's vote, so he removed that stuff from the code that was actually committed to the repository. however, that issue is getting too confusing, and i'm planning to just close it so the spin-off tasks can be tracked (and perhaps assigned/worked on) individually. so, if any of the more CSS-clueful are interested in working on this, please assign this issue to yourself and roll a patch. ;) otherwise, i'll work on it someday.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 67931-5.patch | 3.5 KB | lendude |
Comments
Comment #1
gábor hojtsyThis sounds like a UI improvement, definitely not a fix. Goes to Drupal 7.
Comment #2
jody lynnComment #3
alexpottPoll is no longer part of core
Comment #4
adammaloneIn 8.x, when we determine if the user is allowed to vote on a poll, we check if they have voted prior. The hasUserVoted method actually returns an array including the choice the user made. My thought is that it would be relatively simple to feed that choice into the template and add a class to the appropriate meter if the user voted for that choice. This could then either be left to the site theme to display or included by default in poll module.
Comment #5
lendudeThis adds classes to the selected and non-selected options, this doesn't add any default styling since that would break BC. But with the classes people have the option to style this.
Also adds some minimal test coverage for this and updates the Javascript test to not use phantomJs anymore because, pffff
Comment #7
berdirHuh, previous last comment from 2014, you've been digging deep here ;) And a 5-digit issue from 2006...
It does add another query because getUserVote() isn't statically cached, maybe it should be. But you get bonus points for converting the JS test, so I'll create a follow-up for that: #3094531: Statically cache PollVoteStorage::getUserVote(). And it's already a lazy builder, so not in the critical path.