[quote=“cpradio, post:20, topic:11911”]
I agree with this as the initial implementation, but would like to see being able to choose multiple options later (a feature that likely doesn’t get a lot of usage; but there are times it is needed).[/quote]
How about something like:
`
choose one option
or choose another option
but can’t choose more than one
`
and
`
choose this option
and this option, if you like
CHOOOZ ALL THE OPSHUNS!!
`
for distinguishing between single/multiple choice?
Or would that be too limiting … I guess maybe you need to be able to restrict the number of multiple choices, eg “Choose up to 3”. Would you need to distinguish between “Choose 3” and “Choose up to 3”?
So you could have <poll max=3>, <poll set=3> or just <poll> for an unlimited multiple choice.
If this is going to be implemented as a plugin, couldn’t you use that plugin’s render capability anywhere whether it’s the first post or not? That way anywhere a <poll> element is found the plugin can handle it?
True, but it would have been useful in this post where a choice was a natural part of the discussion. I understand that I could have created a linked post, and started with a poll - but I don’t know if that would have the right flow.
Yes, it was a part of the discussion, but I disagree in that it was natural.
Actually the topic you mentioned would optimally contain a variety of choices, stacked up in due course. After that, a poll could be added if an authorized individual were to decide that that particular stack is big enough to choose one element from the stack. Said poll could be edited into the first post, attached to it or attached to the whole topic.
Your list of choices is perfect because it preserves the flow, whereas a poll would likely make the user stop reading. The way it is right now actually forces people to answer and explain their choice, which adds semantics to following user contributions.
Polls rarely have the purpose of doing that. Instead, they give an overview of the general opinion on a matter or, in some cases, define what is going to happen.
Whenever well-founded contributions are needed, polls are superflous.
I feel it is rather the nature of a topic to only discuss a single topic - as the name suggests. Kind of like how functions should only ever do one thing, topics containing a poll should only ever return results which all refer to the same affair.
I second @codinghorror here. Though I feel a better process is to create a new topic with a focus on the poll once there is an agreement in the discussion about which things should be voted upon instead of changing the first post (always a bit awkward imho). But yes, polls in the middle of a topic will be hard to find, especially since we jump the user to the last part of the conversation every time, it should be clear where to find a poll if it is in a topic.
Regrading the implementation of this, I was wondering whether there are plans to make this a core feature. As we want this kind of feature for the OpenTechSchool community, I was thinking of creating a plugin for this when the conversation gained momentum again. My problem with writing that plugin in the current framework is that it is unclear to me how to do backend, ruby model and migration additions to discourse. Is the recommended way of doing that building your own gem or shall this work with the ./plugin infrastructure? I’d volunteer for building that plugin if I get some hints here.
Nice to see new forum prophet. When I’m reading your posts it feels like I am reading my mind from large distance. Same way of thinking how the things should be.
I’ve got this basically working, just need to improve the interface and clean things up a bit.
@sam is there any way to do an atomic get-and-set on PluginStore rows, or maybe an interface to use Redis-backed locking?
Also when you say this:
Do you mean the user who created the poll shouldn’t be able to change the options after 5 minutes, or that after voting a user can’t change their vote after 5 minutes?
I had a chat with @codinghorror and we would like to include the poll plugin in the Discourse source tree, so its installed and enabled by default, just like the emoji one is.
Can you put a pull request through and I will work through getting this shipshape
Indeed, I am colorblind, and I use/see this type of visualization quite often. I rarely encounter any issue with color schemes as long as they were correctly selected. I believe that’d be the case for discourse as we have time, before pushing into production the feature, to pick a color scheme.
Make your topic title start with "Poll: " and include a list in your post. The first list will be used. If you don’t want it to be the first list, do this:
Intro Text
- Some list
- Some list con't
Here are your choices:
[poll]
- Option 1
- Option 2
[/poll]
Currently, the options bug out if you do any markdown other than a list, escaping the <b> and <a> tags and such, so try to avoid formatting in the choices for now until that’s fixed.