Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiples Poll's per thread #70

Open
leoGalani opened this issue Sep 22, 2016 · 6 comments
Open

Multiples Poll's per thread #70

leoGalani opened this issue Sep 22, 2016 · 6 comments

Comments

@leoGalani
Copy link

Would be awesome to have multiples poll's per thread 👍 :)

@Schamper
Copy link
Collaborator

Schamper commented Sep 22, 2016

Some concerns I can currently think of:

  • The poll editor currently only supports a single poll per post. It attempts to parse any poll markup in a post so you can edit it. Possible solution would be to simple support multiple polls/markup. E.g. have a button "add another poll" at the bottom.
  • Don't know if the serializer currently supports multiple poll markup, would have to check/fix.
  • Rendering multiple polls should be a fairly easy modification
  • The hard part: currently poll ID's are linked to a post/topic as a field in the post/topic data structure. This has the benefit that it's included whenever a post/topic is loaded by the client, by which we can load the actual poll. This ensures that we're not doing unnecessary network requests to check if there's a poll. I can think of some ways to solve this (e.g. hasPoll field instead of pollId), but it'd require reworking some core stuff, in addition to breaking current polls (which can be resolved with updating all the database entries, but still). Another solution could be enriching the post data using a hook, instead of relying on inserting custom fields in there. The latter might be the preferred way. (less prone to breaking by NodeBB updates)

@yariplus
Copy link
Contributor

For what reason would someone want multiple polls per thread?

@leoGalani
Copy link
Author

Imagine if you have a thread for "Oscar Winners"... you could have a pool for each award ( best movie, best actor, ..etc)

@yariplus
Copy link
Contributor

Oh okay. Sorry, I misunderstood. I thought you wanted polls in any post. Multiple polls in the main post makes sense to me. +1

@FaizanZahid
Copy link

This will be awesome to be able to add multiple polls in 1 TOPIC. Please add this?

@ferumdev
Copy link

ferumdev commented Mar 6, 2023

Me to! This cool feature!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants