wilhelmklopp / simple-poll

:bar_chart: Create native and simple polls in Slack.
195 stars 25 forks source link

Support for more than 10 options #9

Open nathanredblur opened 8 years ago

nathanredblur commented 8 years ago

I just try to create a very long poll and I get 500 error.

/poll "¿Qué canales te gustan?" "ada-lang" "agiles" "al-co" "algoritmia" "androiddev" "angularjs" "barranquillajs" "beam-langs" "bigdata" "bitcoin" "bogotacss" "bogotajs" "botstests" "bucket-ideas" "calijs" "call_of_bala_ps4" "codies" "cpp" "crypto" "crypto-anarchy" "data" "db" "dev-co" "devfestcomunidad" "devops" "distsys" "djangobogota" "docker" "editores" "eng-leadership" "erlang" "ethical-hacking" "florenciajs" "fp" "frontend" "game-dev" "general" "gigax" "golang" "hackdesign" "hardware" "haskell" "hybridappscolombia" "ios-lang" "javascript" "jvm" "jvm-langs" "kubernetes" "lambda-quilla" "links" "linux" "lisps" "medellinjs" "medellinphp" "medphp" "meteor" "mongodb" "monteriajs" "nerdrage" "nodebots" "nodejs" "pereirajs" "perl" "phpcolombia" "popayanjs" "python-lang" "python-medellin" "quibdojs" "r" "railsgirls" "random" "rgsoc" "rpg" "ruby" "ruby-lang" "rubybaq" "rust-lang" "security" "software-testing" "strangeloop" "teams" "test1" "thanksjohn" "trabajos" "ux" "webdev"
wilhelmklopp commented 8 years ago

Hey Nathan,

at the moment Simple Poll only supports up to 10 options.

This is because there are only ten number emojis (see image) Emoji numbers

However, it would be fairly simple to extend the number of options. I am just not sure which emoji to use...

Do you have any suggestions for what emoji would be suitable?

nathanredblur commented 8 years ago

:/ I don't know. Maybe normal characters if is higher that 10 ? : <1>, <2>....<100>

or a combination of emoji with numer :metal: 1 :metal: 2

I don't know.

wilhelmklopp commented 8 years ago

This gives a proper error message now.

Support for more than :keycap_ten: options coming soon!

Zaret commented 6 years ago

Hello. I have an idea for this, but I don't know if it's possible. I want to illustrate it using this cases and their actual result.

Case 1: This works, and it gives me a poll with the default numbers (1 to 10) /poll “Case 1” “One” “Two” “Three” “Four” “Five” “Six” “Seven” “Eight” “Nine” “Ten”

Case 2: This works too, and it shows a poll with the default numbers (1 to 8), and then a little fire for "Nine", and then the default number (10) for "Ten" /poll “Case 2” “One” “Two” “Three” “Four” “Five” “Six” “Seven” “Eight” “Nine” :fire: “Ten”

Case 3: But this doesn't work because there are 11 options, not 10 /poll "Case 3" "One" "Two" "Three" "Four" "Five" "Six" "Seven" "Eight" "Nine" :fire: "Ten" "Eleven"

But what if you count the number of options with a "default emoji", and that number is the one that cannot exceed 10 (instead of the count of the whole list of options)? Also, if you want that to work, those default emoji numbers should be showing "in order" instead of representing the number in the options list (not skipping numbers that were replaced by another emoji).

What I try to say is, in the case 3 there are just 10 options with a "default emoji" because the "Nine" option will have a different one, so it should be permitted. Also following the second change that I mentioned, it should look like this:

Case 3 1️⃣ One 2️⃣ Two 3️⃣ Three 4️⃣ Four 5️⃣ Five 6️⃣ Six 7️⃣ Seven 8️⃣ Eight 🔥 Nine 9️⃣ Ten 🔟 Eleven