Page MenuHomePhabricator

Implement condition agreements in Special:Preferences [M]
Closed, ResolvedPublic

Description

From T264150: User needs to request access to IP information [L]

image.png (444×1 px, 39 KB)

There are two conditions that need to be met before the IP Information accordion displays information for the user:

  • User needs to enable the tool
  • User needs to accept to the terms of the tool

These are represented by two checkboxes in Special:Preferences, under the "User Profile tab" (see mock 1)

  1. Show the IP Information tool on Special:Contributions page for IP addresses.
  2. I agree to use this information for my patrolling and anti-vandalism work.

Note: The user cannot agree to the terms without enabling the tool. The second checkbox is disabled until the first checkbox is checked.

Event Timeline

ARamirez_WMF renamed this task from Implement condition agreements in Special:Preferences to Implement condition agreements in Special:Preferences [M].Sep 22 2021, 4:56 PM

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

[mediawiki/extensions/IPInfo@master] Implement use agreement checkbox for IPInfo in Special:Preferences

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

@Prtksxna Could I get some 👀 on the copy for this error message and also your opinion on the design? The ticket says to disable the use agreement checkbox if the enable checkbox has not been checked:

image.png (258×1 px, 28 KB)

@phuedx noted that hide-if is a utility provided by HTMLForm and as such, is the "default" UX for hiding/showing dependent options. Using hide-if would mean that the use agreement checkbox would only be visible if the enable checkbox is checked.

Do you have a preference between the two?

And here is the error message if you try to only agree to the use agreement:

image.png (320×1 px, 39 KB)

@Prtksxna Could I get some 👀 on the copy for this error message and also your opinion on the design?

Design matches the spec 👍🏾 The alignments seem a bit off but I'm guessing that is OOUI?
We're waiting on legal for the final messages, will create a ticket as soon as we have them.

The ticket says to disable the use agreement checkbox if the enable checkbox has not been checked:

image.png (258×1 px, 28 KB)

And here is the error message if you try to only agree to the use agreement:
image.png (320×1 px, 39 KB)

If the checkbox is disabled, how can someone reach this state?


@phuedx noted that hide-if is a utility provided by HTMLForm and as such, is the "default" UX for hiding/showing dependent options. Using hide-if would mean that the use agreement checkbox would only be visible if the enable checkbox is checked.

Do you have a preference between the two?

Yep, we have a preference to disable instead of hiding UI elements in most cases. This way we avoid the UI jump (no animations in mw yet 🙁) and its better for a11y (hiding and showing is possible through aria tags but their support isn't universally good).

If the checkbox is disabled, how can someone reach this state?

@STran answered in a meeting - no-JS.

Everything looks good, then 👍🏾

@phuedx noted that hide-if is a utility provided by HTMLForm and as such, is the "default" UX for hiding/showing dependent options. Using hide-if would mean that the use agreement checkbox would only be visible if the enable checkbox is checked.

Do you have a preference between the two?

Yep, we have a preference to disable instead of hiding UI elements in most cases. This way we avoid the UI jump (no animations in mw yet 🙁) and its better for a11y (hiding and showing is possible through aria tags but their support isn't universally good).

I defer to your expertise and domain knowledge. Is there a task tracking migrating away from conditional hide/reveal of UI elements in forms? If not, should we create one?

Change 723065 merged by jenkins-bot:

[mediawiki/extensions/IPInfo@master] Implement use agreement checkbox for IPInfo in Special:Preferences

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

Verified that IP info box shows on the page after.
updated page ur: https://en.wikipedia.beta.wmflabs.org/wiki/Special:Preferences
Screen shot of IP Info:

Screen Shot 2021-10-08 at 4.17.43 PM.png (1×3 px, 1 MB)

Screen Shot 2021-10-08 at 4.18.01 PM.png (1×2 px, 315 KB)

Verified that IP info box shows on the page after.
updated page ur:
Screen shot of IP Info:

I think this is missing the screenshots, @imaigwilo. But I can move it along on your word!

@Niharika pardon me, I have added the screen shots now it works as expected. Thank you.