Page MenuHomePhabricator

Voting form display for STV polls [M]
Closed, ResolvedPublic

Assigned To
Authored By
Niharika
May 12 2021, 2:13 PM
Referenced Files
F34588723: Screen Shot 2021-08-09 at 1.07.55 PM.png
Aug 9 2021, 5:21 PM
F34588722: Screen Shot 2021-08-09 at 1.10.49 PM.png
Aug 9 2021, 5:21 PM
F34585572: Screen Shot 2021-08-04 at 9.54.38 AM.png
Aug 5 2021, 8:48 PM
F34556812: image.png
Jul 20 2021, 12:42 AM
F34533236: Screen Shot 2021-06-29 at 6.23.09 PM.png
Jun 30 2021, 3:55 PM
F34533241: Screen Shot 2021-06-30 at 10.06.14 AM.png
Jun 30 2021, 3:55 PM
F34533238: Screen Shot 2021-06-29 at 12.35.36 PM.png
Jun 30 2021, 3:55 PM
F34487160: image.png
Jun 8 2021, 4:40 PM
Tokens
"Stroopwafel" token, awarded by Prtksxna.

Description

User story

As a voter, I should be able to rank candidates as per my choice in the voting UI for a Single Transferable vote.

Mock
NormalMissing preferences error stateDuplicate preferences error state
image.png (773×450 px, 32 KB)
image.png (900×450 px, 42 KB)
image.png (924×450 px, 42 KB)
Acceptance criteria
  • Different voters should be shown options in different, randomized orders in a dropdown UI. The order of candidates should be consistent throughout the voting form.
    • The order should also be consistent if the form is submitted and the page is reloaded due to an error.
  • Default selected preference is "Select an option". This string is translatable.
  • Voters should be able to sequentially rank the options in their order of preference. For example, a voter can select their first, second and third preference but cannot select their first and third preference only. This would result in an error with the message: Preferences must be selected in sequential order. (See mock for details)
  • No option can be selected twice. If an option is selected twice this should result in an error and the form should not submit. The form data will not be lost. Error message: Options can’t be selected multiple times when ranking.
  • Voters do not need to mandatorily rank all options. They may rank as many candidates as they wish (minimum one).
Note

We'll tackle the disabled options in the dropdowns in a follow-up task.

Event Timeline

ARamirez_WMF renamed this task from Voting form display for STV polls to Voting form display for STV polls [M].May 12 2021, 4:53 PM

Change 690424 had a related patch set uploaded (by STran; author: STran):

[mediawiki/extensions/SecurePoll@master] Add voting form for STV polls

https://gerrit.wikimedia.org/r/690424

Default:

image.png (437×758 px, 82 KB)

(This is OOUI but my setup uses the default dropdown). I didn't know if we had number handling so I did a quick workaround and will look more into it. I just wanted to confirm that the gist of this was ok.

Example error:

image.png (607×785 px, 43 KB)

@Prtksxna could you take a look at these and let me know if they look ok? I used the "candidate" language requested in the task but what do we think about generalizing it to choice like the labels?

I just wanted to confirm that the gist of this was ok.

Yep, this is looking good.

@Prtksxna could you take a look at these and let me know if they look ok?

I've added new mocks for the error states. We don't need the See warnings buttons here. @Tchanders tells me that SecurePoll uses its own error message designs and that we should switch to OOUI at some point. I'll raise a separate task for that.

I used the "candidate" language requested in the task but what do we think about generalizing it to choice like the labels?

Yep, we'll be generalizing them to 'option' and 'preference'. I've updated the language in the ticket and mocks. Let me know if there are other cases which I might have missed.

Change 690424 merged by jenkins-bot:

[mediawiki/extensions/SecurePoll@master] Add voting form for STV polls

https://gerrit.wikimedia.org/r/690424

here's what it looks like now:

image.png (455×720 px, 43 KB)

I have performed test my verifying the acceptance criteria. I was able to create a poll with 20 options, one question, and multiple
poll question. Wikisource Version: – (ea98e7e) 06:26, 30 June 2021 GPL-2.0-or-later
Below are some screen shot of the expected error messages:

Screen Shot 2021-06-29 at 6.23.09 PM.png (1×2 px, 340 KB)

Screen Shot 2021-06-29 at 12.35.36 PM.png (1×1 px, 285 KB)

Screen Shot 2021-06-30 at 10.06.14 AM.png (1×2 px, 299 KB)

Also verify that user can test using mobile(andriod/apple), browsers(Safari, Firefox, Chrome), and ipad
Screen Shot 2021-08-09 at 1.10.49 PM.png (1×1 px, 376 KB)

Screen Shot 2021-08-09 at 1.07.55 PM.png (1×938 px, 143 KB)

Making a note here that I am seeing the non-OOUI dropdown on votewiki beta and it awkwardly covers the dropdown box itself. As seen on Chrome and Safari.

If this is a trivial fix, let's fix it.

image.png (1×2 px, 503 KB)

Change 709255 had a related patch set uploaded (by STran; author: STran):

[mediawiki/extensions/SecurePoll@master] Infuse DropdownInputWidget on vote page

https://gerrit.wikimedia.org/r/709255

Change 709255 merged by jenkins-bot:

[mediawiki/extensions/SecurePoll@master] Infuse DropdownInputWidget on vote page

https://gerrit.wikimedia.org/r/709255

The dropdown UI now matches the standard. Tested in Chrome, and Safari

Screen Shot 2021-08-04 at 9.54.38 AM.png (1×2 px, 298 KB)

Awesome. Thanks all!