Page MenuHomePhabricator

[Bug] Weird answer selection on single-answer freeform survey [4H]
Closed, ResolvedPublic

Assigned To
Authored By
Madalina
Nov 15 2021, 1:38 PM
Referenced Files
F34873542: image.png
Dec 10 2021, 12:54 AM
F34873627: image.png
Dec 10 2021, 12:54 AM
F34873532: image.png
Dec 10 2021, 12:54 AM
F34873547: image.png
Dec 10 2021, 12:54 AM
F34749882: bug screenshot.png
Nov 16 2021, 10:06 AM
Tokens
"Doubloon" token, awarded by Jhernandez.

Description

Steps to reproduce

  1. Visit https://en.wikipedia.beta.wmflabs.org/wiki/African_wild_dog?quicksurvey=internal%20example%20survey%20with%20description%20and%20freeform%20text
  2. Click one of the answers: "Yes", "No" or "Not sure"

Expected results

  • Answer is selected.

Actual results

  • Order of answer changes, one answer is selected and another answer is focused.

bug screenshot.png (306×271 px, 129 KB)

Environments observed

  • Browser version: Chrome 95.0.4 and Firefox 94.0.1
  • OS version: macOS Big Sur 11.6
  • Device model: MacBook Pro
  • Device language: English

Event Timeline

Madalina renamed this task from [Bug] Cannot submit answer on single-answer freeform survey to [Bug] Weird answer selection on single-answer freeform survey.Nov 16 2021, 10:06 AM
Madalina updated the task description. (Show Details)
ARamirez_WMF renamed this task from [Bug] Weird answer selection on single-answer freeform survey to [Bug] Weird answer selection on single-answer freeform survey [4H].Nov 17 2021, 4:10 PM

it looks like all props for the button array are recomputed any time a descendant of the buttons container changes. shuffleAnswers() is part of that computation, so it's very clear why this is behaving the way it is.

I peeked at the git blame, and it looks like the function that creates the buttons was created as part of the initial migration to Vue.js rendering, so this looks like a genuine oversight.

Change 743258 had a related patch set uploaded (by Jsn.sherman; author: Jsn.sherman):

[mediawiki/extensions/QuickSurveys@master] WIP: Don't reshuffle when clicking a button

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

Change 743258 merged by jenkins-bot:

[mediawiki/extensions/QuickSurveys@master] Don't reshuffle when clicking a button

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

Scardenasmolinar changed the task status from Open to Stalled.Dec 8 2021, 4:58 PM
Djackson-ctr changed the task status from Stalled to In Progress.Dec 9 2021, 12:24 AM

@Madalina
I have verified the information listed in the ticket Description (per Expected Results) has been implemented and is working successfully at the following url: https://en.wikipedia.beta.wmflabs.org/wiki/African_wild_dog?quicksurvey=internal%20example%20survey%20with%20description%20and%20freeform%20text


Compatibility Testing was performed on the following:
Desktop  – Firefox version 94 Mac OS Big Sur / Chrome 95 Mac OS Big Sur / Chrome version 96 Windows 10 / Microsoft Edge version 96 Windows 10 / Firefox version 95 Windows 10 / Opera version 82.0.4227.23 Windows 10 / Safari version 15 Mac OS Monterrey / Safari version 14 Mac OS Big Sur.

Mobile Devices – Android version 11 Samsung FE20 phone / Android version 8.1 Galaxy A10 tablet / iOS version 15 iPad Pro 5th generation / iOS version 15 iPhone 13 Pro Max.


Below are screenshots of new code changes:
(NOTE: please disregard blurriness of screenshots, this is due to device simulation and is not related to the code changes):

screenshot for Chrome 95 / Mac OS Big Sur 11

image.png (632×830 px, 243 KB)

screenshot for Firefox 94 / Mac OS Big Sur 11

image.png (708×1 px, 341 KB)

screenshot for iPhone 13 Pro Max / Mac iOS version 15

image.png (855×396 px, 172 KB)

screenshot for iPad Pro 5th generation / iOS version 15

image.png (660×784 px, 264 KB)

Looks good to me! Marking this as solved.