Add multiple choice polls
This PR adds an option to set the maxSelections parameter in the createPollDialog, and allows users to vote for more than one option based on that parameter. Instead of radio buttons, multiple choice polls feature checkboxes, which do however use the same styles as the radio buttons. If maxSelections is greater than 1, an indication telling the user the number of remaining votes is shown. Options can be deselected to vote for another option.
Closes #23319
https://user-images.githubusercontent.com/94838646/201692244-229094f0-3427-4cfb-b6ed-e3fc191c15d3.mov
Signed-off-by: Ole Wieners [email protected]
Here's what your changelog entry will look like:
✨ Features
- Add multiple choice polls (#9519). Contributed by @owi92.
Thanks for your contribution @owi92 :+1:
They needs at least a review from design. Probably also from product. When merging this feature for Web it would not be available on the mobile apps. This could lead to a not so nice experience.
Thank you for the review and suggestions! I believe I have addressed mosty everything with my lates push. I'm still missing the cypress end2end tests but will try to get them done tomorrow.
Is there something missing for this to get merged?
@jakewb-b It would be great to get your thoughts on this PR as an Enhancement to a feature you're close to. If this is something we want to move ahead with, let's engage with Design (@rufuskahler)
@daniellekirkwood - definitely keen to have this as a feature; it was on our backlog originally so would be great to have it added. There are some existing designs that @gaelledel did that may cover this as well, so worth getting her and Rufus to take a look.
@gaelledel – Please advise on the preferred design solution here.
+1 would love to have this feature, a team I'm involved in would like to conduct multi-select polls. Would this only be available in the web client if merged?
I've been looking at this to try & get it moving forward. I think the main obstacle at the moment is the question of what other clients do in the face of a multiple choice poll, since we'd be launching this feature on element web but not mobile. eg:
- If on mobile you don't even notice that you could have more votes, that might be ok
- If you vote lots on web and then view the poll on mobile and it's not accurate, thats a problem
It will also be quite weird if you see other people clearly voting for more than one option, but can't do so yourself, although maybe not the end of the world.
I know other clients have support for this, but it being different in Element on different platforms is more of a problem.
In general, I would advise talking to us before implementing large features like this: they're not trivial to ship, unfortunately.
I'm going to close this for now. If someone if able to pick up to work of establishing what the experience is, exactly, of having it on web and mobile, we can re-open and continue work on it.