Try out public polls


(Alan Tan) #1

The idea of having public polls like what the event signup sheet pugin is doing has been adapted and merged into the polls plugin. Public polls will display all users that have voted in the poll and can be created by adding public=true as shown below.

Do you like public polls?

[poll public=true]
- Yes
- No
- Maybe
[/poll]
  • Yes
  • No
  • Maybe

0 voters

Number of times you visit Meta per day

[poll public=true type=number][/poll]
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30

0 voters

I’ve also fixed a couple of bugs while working on this feature so be sure to upgrade if you’ve encountered them :slight_smile:




Poll UI: Adding Polls through a UI in the Composer Window
(Mittineague) #2

Is the Avatar tooltiip “team” intentional ?


(Alan Tan) #3

Nope :stuck_out_tongue:

Thanks for letting me know :slight_smile:


(Mittineague) #4

I bet it has something to do with the rearranging


(Alan Tan) #5

Fixed in


(Gerhard Schlager) #6

I :heart: it! I was waiting for a feature like that. Thanks!

How does it handle a large number of voters in the avatar list?


(@SenpaiMass) #7

@cpradio is it possible that we get an option regarding this in the plugin poll ui?


(cpradio) #8

Yeah, I might be able to get to that today.


(Felix Freiberger) #9

Strange things start to happen when a poll becomes public by editing:

Note that No has a vote but no avatar.

I’d simply disallow modifying this after the fact, at least by non-admins.

Bonus question: Should a poll inform the user that his vote will be made public?


(DenisD) #10

We appreciate that work very much! We will use it for event registration shortly (Yes, I will attend, Maybe, No), so it will be great to have option to customize “amount of votes” text to have a choice to change “votes” to attendees as in Event Signup Sheet Plugin
again, big thanks!


(DenisD) #11

At it looks stable, please advice how to enable it on working site? By upgrading to latest version of DS or wait for some more time? thx


(cpradio) #12

Upgrading to latest should do it.


(cpradio) #13

Poll Plugin is now updated (translators please submit PRs for the new translation that was added)


(Jeff Atwood) #14

This is fantastic work @cpradio we are going to be pulling this into core soon, and @tgxworld will work with you on that!


(Alan Tan) #15

We don’t track the ids of the voters when a poll is not declared to be public. Therefore, I’m adding a validation to make sure a private polls with votes cannot be made public.

There could be a use case where the poll should only be made public only after the poll has been closed though but I’ll hold back on implementing it until we are really sure of the use case.


(Alan Tan) #16

Good point :stuck_out_tongue: Previously I was just sending down the entire array of user records. Just submitted a PR to make it more efficient.



(Alan Tan) #17

Just added


(Gerhard Schlager) #18

Thanks @tgxworld for the pagination of the voters.

As I already mentioned in the Discourse Feature Voting topic I’d love to have a reusable component in Discourse for showing large amounts of users.

In my opinion it should be a popup that allows me to scroll through the user list. Clicking in order to load more is a UX nightmare and so old-school. It’s simply not the Discourse-way of doing things. :wink:

So, in case of the poll plugin it would show a list of up to N users (e.g. 10) below the poll option and if there are more voters I’d have to click a “more…” link in order to scroll through the complete list of voters.


(Rafael dos Santos Silva) #19

AKA the facebook way. It’s a good idea, and probably choosen because less reflows and repaints on the page.


(Chadrick Mahaffey) #20

Am I supposed to see pics of voters?