Page MenuHomePhabricator

Update custom column label inputs to use OOUI widgets
Closed, ResolvedPublic5 Estimated Story Points

Assigned To
Authored By
STran
Jan 27 2021, 11:03 AM
Referenced Files
F34149538: image.png
Mar 10 2021, 12:03 PM
F34149501: after_custom_column_sign.png
Mar 10 2021, 11:39 AM
F34147947: wrapping.png
Mar 9 2021, 3:08 PM
F34147952: after_custom_column_sign.png
Mar 9 2021, 3:08 PM
F34147950: before_custom_columns_sign.png
Mar 9 2021, 3:08 PM
F34039282: image.png
Jan 27 2021, 11:03 AM

Description

The inputs for range voting custom labels are not using OOUI at the moment:

image.png (514×840 px, 28 KB)

They should be updated to do so (this happens in ./modules/ext.securepoll.htmlform/page.create.js and in ./includes/HtmlForm/HTMLFormRadioRangeColumnLabels.php). You can check out T272378: SecurePoll: Custom column labels do not appear (or do not appear correctly) [8h] for some additional context. You will probably have to use a layout to re-wrangle the table in OOUI.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 669715 had a related patch set uploaded (by DLynch; owner: DLynch):
[mediawiki/extensions/SecurePoll@master] Convert range voting custom column labels to OOUI

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

Change 669715 merged by jenkins-bot:
[mediawiki/extensions/SecurePoll@master] Convert range voting custom column labels to OOUI

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

dom_walden subscribed.

UI-wise, very little appears to have changed in terms of behaviour and appearance.

  • The labels corresponding to the inputs are no longer bold. But, this is now consistent with the rest of the form.
  • It wraps around when there are lots of columns. Previously, it just kept expanding to the right.
    wrapping.png (237×1 px, 14 KB)
  • The labels for the inputs don't automatically get changed from "n" to "+n" when you add a negative column value (bit confusing, see screenshots below). However, this difference is purely aesthetic.
    • Before:
      before_custom_columns_sign.png (412×1 px, 34 KB)
    • After:
      after_custom_column_sign.png (399×2 px, 40 KB)
  • It does not work without JS. This was also the case before. If editing an existing election which already uses custom column labels, you can update the custom label values and remove columns. But you cannot add columns. There does not appear to be a way to add custom labels when you are creating an election without JS.

Otherwise, I tested creating and editing an election to make sure that the correct custom labels are saved to the database.

Test Environment: https://vote.wikimedia.beta.wmflabs.org SecurePoll 2.0.0 (1276a79) 22:33, 8 March 2021.
Test Browser: Firefox 78

Tchanders added subscribers: Prtksxna, Tchanders.
  • The labels for the inputs don't automatically get changed from "n" to "+n" when you add a negative column value (bit confusing, see screenshots below). However, this difference is purely aesthetic.

@Prtksxna Should we raise a ticket about this? I think it looks a bit odd to see -1, 0, 1, 2, +3:

after_custom_column_sign.png (399×2 px, 40 KB)

Might it be better either always to have the + or never to have it?

It'll be a 5 minute patch to fix that, so up to you if you'd like the administrative overhead of a new ticket.

It'll be a 5 minute patch to fix that, so up to you if you'd like the administrative overhead of a new ticket.

Sounds good to me. Personally I'd ditch the +, but happy either way

Change 670272 had a related patch set uploaded (by DLynch; owner: DLynch):
[mediawiki/extensions/SecurePoll@master] Toggle signs on column labels after creation

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

I went with leaving the + sign, mostly because I think it leads to more clarity now that the inputs can wrap lines.

Change 670272 merged by jenkins-bot:
[mediawiki/extensions/SecurePoll@master] Toggle signs on column labels after creation

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

  • The labels for the inputs don't automatically get changed from "n" to "+n" when you add a negative column value (bit confusing, see screenshots below). However, this difference is purely aesthetic.

@Prtksxna Should we raise a ticket about this? I think it looks a bit odd to see -1, 0, 1, 2, +3:

after_custom_column_sign.png (399×2 px, 40 KB)

Might it be better either always to have the + or never to have it?

Sorry, even with the screenshots I'm having a hard time following what is going on here. We're talking about the numbers at the bottom, correct?

after_custom_column_sign.png (399×2 px, 61 KB)


I went with leaving the + sign, mostly because I think it leads to more clarity now that the inputs can wrap lines.

The inputs under the numbers can have wrapped lines? Sorry, could you please explain what you mean here.

Sorry, even with the screenshots I'm having a hard time following what is going on here. We're talking about the numbers at the bottom, correct?

after_custom_column_sign.png (399×2 px, 40 KB)

In the screenshot on the right, some of the positive numbers have a + and some don't; that's the bug we're fixing.

@DLynch's patch has fixed this so that all of the positive numbers have a + now:

image.png (626×777 px, 34 KB)

Moving to Done since the patch has been merged; @Prtksxna feel free to file a follow-up if you want to change anything.

image.png (626×777 px, 34 KB)

Thanks @Tchanders, I get it now. This screenshot explained what wrapping inputs meant.

Moving to Done since the patch has been merged; @Prtksxna feel free to file a follow-up if you want to change anything.

Sounds good, no follow-up needed.