Poll Plugin - Min / Max / Step Ranges

AI-generated summary

A discussion about the Poll Plugin - Min / Max / Step Ranges was initiated by RobMeade, who reported a potential issue where increasing the step and max values in the poll functionality could cause the browser to lock up. They also suggested that using text boxes with validation instead of dropdown menus could be a better approach. Additionally, RobMeade pointed out another issue with the Multiple Choice type, where the min value can be set equal to the total number of options.

Codinghorror acknowledged the bug and requested tgxworld to fix it. RobMeade apologized for posting in the wrong category and for generating more problems.

Nbianca offered to work on the issue and submitted a pull request, which was later merged by tgxworld.

Hi,

I wouldn’t say this is a huge issue, but something that may be worth being aware of.

Whilst experimenting with the poll functionality this evening I initially assumed that the range was set at 1 to 20. I then noticed that increasing the step had a bearing on the max - which in turn, if you select the highest value has a bearing on the step - repeat this about 4 (I think) times and you can achieve this;

The whole browser locked up, presumably whilst hundreds more options were being dynamically added to the drop down menus. Eventually, given enough time, it responded again and I was quick to set it to something lower, but I’m guessing potentially I could keep raising these values to a literal breaking point.

As I say, it’s not a massive issue, who would be silly enough to do this anyway right? (me! /waves) - I was actually in the process of writing a little guide on how to put the polls into your posts when I started experimenting.

Any reason these are drop down menus and not just text boxes with some validation that a number has been entered?

Oh, and as I am writing this in the context of the world revolving solely around myself :wink: - I’ll add that having the Show Who Voted option in a different order for the Number Rating poll type compared to the Single Choice and Multiple Choice is playing havoc with my OCD (CDO)…! :slight_smile:


Just spotted that when choosing the Multiple Choice type, you can select the Min value equal to the total number of options - meaning a user would have to select everything on the poll.

4 Likes

Hmm definitely a bug, can you fix @tgxworld?

2 Likes

Wasn’t sure if this was supposed to go under support of directly into the plugins category, my apologies if not in the right place Jeff.

(and for my meddling and generating more problems!)

Hello,

I would like to work on this.

EDIT: Changed combo-box to number inputs for min, max and step values. by nbianca · Pull Request #4756 · discourse/discourse · GitHub

10 Likes

PR has been merged. Thank you @nbianca

4 Likes