Commit 7e56062
feat(webapp): randomise the order of downgrade feedback options
**Before:** the "Why are you thinking of downgrading?" dialog always
listed its six reasons in the same fixed order, so options near the top
were more likely to be picked than the ones at the bottom.
**After:** the same six reasons appear in a random order, reshuffled on
each page load. The free-text box below the list is unchanged.
How: the list is lifted to a module-level constant and shuffled once per
mount with a Fisher-Yates shuffle over a copy, through a `useState`
initialiser so ticking a checkbox does not reorder the list
mid-interaction. Answers are submitted by value rather than by position,
so the reordering does not change the submitted payload; the checkbox
ids now derive from the label instead of the index.
Mono-RevId: 79ad55c0c74576161864d85f1d1eb07891499ede1 parent f3922e6 commit 7e56062
1 file changed
Lines changed: 32 additions & 11 deletions
Lines changed: 32 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
313 | 313 | | |
314 | 314 | | |
315 | 315 | | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
316 | 342 | | |
317 | 343 | | |
318 | 344 | | |
| |||
330 | 356 | | |
331 | 357 | | |
332 | 358 | | |
| 359 | + | |
| 360 | + | |
333 | 361 | | |
334 | 362 | | |
335 | 363 | | |
| |||
367 | 395 | | |
368 | 396 | | |
369 | 397 | | |
370 | | - | |
371 | | - | |
372 | | - | |
373 | | - | |
374 | | - | |
375 | | - | |
376 | | - | |
377 | | - | |
378 | | - | |
| 398 | + | |
| 399 | + | |
379 | 400 | | |
380 | | - | |
| 401 | + | |
381 | 402 | | |
382 | 403 | | |
383 | 404 | | |
384 | 405 | | |
385 | 406 | | |
386 | 407 | | |
387 | | - | |
| 408 | + | |
388 | 409 | | |
389 | 410 | | |
390 | 411 | | |
| |||
0 commit comments