Page MenuHomePhabricator

Community configuration: Decision about how to display the boolean controls in Special:CommunityConfiguration/Mentorship
Closed, ResolvedPublic

Description

Splitting from T361324: [QA task] Community Configuration UI evaluation by @Etonkovidova.

In Special:CommunityConfiguration/Mentorship, boolean controls are displayed with x next to them:

Screen Shot 2024-03-28 at 1.47.45 PM.png (664×1 px, 88 KB)

This happens, because we have communityconfiguration-mentorship-gementorshipautomaticeligibility-control-label and communityconfiguration-mentorship-gementorshipenabled-control-label set to x. This was done, because without doing so, the form looks even worse:

image.png (462×2 px, 93 KB)

The Figma designs specify Yes/No radio buttons instead:

image.png (282×752 px, 36 KB)

Within this task, we should do two things:

  1. settle on how we want to render booleans by default (a checkbox makes sense, but it likely should not have two labels, which is what results in this issue)
  2. in Mentorship, either use the non-standard way (WIP patch exists, also see T358663) or switch to whatever standard way we agree on

Event Timeline

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

@JFernandez-WMF @KStoller-WMF Do any of you have any thoughts on how boolean controls should be displayed by default (ie. not necessarily in our context)? Should we be using checkboxes with a question next to them (so no bold label at top, and instead of the x, a question)? Should we have the question at top, and then instead of x, say Disabled (or Enabled)? Should we use the radio buttons approach for everyone? Something else?

@Sgs Please note this task, as it somehow overlaps with the scope of T358663.

Thanks for creating this task to help escalate this decision, @Urbanecm_WMF!

I'm assigning this to @JFernandez-WMF as I think this is a UI / design question that she might need to consult with other designers on.

I know that we are attempting to move towards on/off language rather than enabled/disabled.
https://doc.wikimedia.org/codex/latest/style-guide/writing-for-copy.html#this-is-for-everyone

KStoller-WMF renamed this task from Community configuration: Settle on a Avoid displaying the `x` next to the boolean controls in Special:CommunityConfiguration/Mentorship to Community configuration: Decision about how to display the boolean controls in Special:CommunityConfiguration/Mentorship.Mon, Apr 8, 10:09 PM

Radio buttons or toggles are better than a checkbox with an "x". This "x" will certainly be one of the first obvious feedback we will get.

If we go with radio buttons, the yes/no choice should be privileged, as it simplifies a lot the translations.

The toggle description says:

Use the ToggleSwitch component only where an instant change in the user-interface based on their assigned action is intended.

Community Configuration edits site configuration, which affects people after it’s saved, not immediately, so it’s not what ToggleSwitch is intended for. What remains is:

  • A checkbox with a readable label (e.g. put the checkbox in front of Should users be automatically eligible for mentorship?, in the same line, rather than below it).
  • Two radio buttons. A pre-made yes/no choice (translated only once) is a good idea.

Thank you all for bringing this to my attention, and thank you @Tacsipacsi for chiming in. That is correct, ToggleSwitch is meant for an immediate response (it saves changes in real-time). This wouldn't accommodate our use case, since we have a 'Save' button.

I say let's use radio buttons — thoughts?

This happens, because we have communityconfiguration-mentorship-gementorshipautomaticeligibility-control-label and communityconfiguration-mentorship-gementorshipenabled-control-label set to x. This was done, because without doing so, the form looks even worse:

Looking back, maybe this was not a good decision and it's causing confusion. The community configuration boolean control as it is now holds three message keys, all of them optional:

  • communityconfiguration-PROVIDER_NAME-PROPERTY_NAME-label
  • communityconfiguration-PROVIDER_NAME-PROPERTY_NAME-control-label
  • communityconfiguration-PROVIDER_NAME-PROPERTY_NAME-help-text

Screenshot 2024-04-15 at 13.34.11.png (1×3 px, 522 KB)

This setup makes it trivial to display a checkbox with inlined text by only setting the "-control-label" message and leaving the rest empty:

Screenshot 2024-04-15 at 13.37.19.png (1×3 px, 347 KB)

I think this approach should have preceded the "x" label decision, which as far as I remember was just a shortcut to prevent an ugly form.

The mess here comes from the historical treatment of booleans in the GrowthExperiments extension Special:EditGrowthConfig form. This form has been crafted over years and the code backing it has resulted in tons of special casing which are not appropriate for a generic form generator (see source). Across the multiple special casing that form has there are two different controls used to capture booleans: yes/no radio buttons and checkboxes. Both are appropriate but present some problems when trying to make them generic. See:

Screenshot 2024-04-15 at 13.45.18.png (204×1 px, 48 KB)
Screenshot 2024-04-15 at 13.43.49.png (870×2 px, 154 KB)

Two radio buttons. A pre-made yes/no choice (translated only once) is a good idea.

This can be challenging. The radio buttons approach requires extra context information for some answers, eg: Yes, allow users meeting all eligibility criteria below to enroll as mentors.. We could support the extra information as help text but it seems it could result in a long explanation for each option, so not an ideal UX. Another problem with the radio button approach is that it forces writing the label in a question-like format, which might be ok for some cases but not sure it is a good fit for all booleans. Take in account a use case similar to the "Gadgets" section in Special:Preferences.

Screenshot 2024-04-15 at 13.57.50.png (1×2 px, 351 KB)

In the checkbox approach the problem is minor, maybe even not a problem but let me elaborate. When the user faces the "Copyedit" checkbox, they should read "Disabled" as an assertion and then the social convention is that marking the checkbox and saving will make the system comply to that assertion. In this case the assertion "Disabled" is kind of a negative clause (Not enabled). People with dyslexia can struggle to solve this puzzle. In general, I'd say a form guideline for checkboxes should be to propose a positive clause by the side of the control. It should be trivial to turn a "opt-out" checkbox like this one into a marked checkbox with a positive clause, then the mark and the text match in terms of semantics.

@Sgs Please note this task, as it somehow overlaps with the scope of T358663.

It is somehow related because I used the yes/no boolean control as the first consumer of the feature T358663: Allow consumers to customize the default editor UI representation for an option. However I find that feature interesting, aside of the decision we make here. It would support known desired use cases such as the one mentioned in T356857: Allow providers to add a custom field (which is probably a dup btw).

tl;dr

I say let's use radio buttons — thoughts?

I think we should support both, but the checkbox should remain as the default. I think we want to update copy texts to better match the default checkbox control and drop the yes/no radio button from GrowthExperiments forms as soon as we can. The reason why we did support this particular case was probably a wrong assumption, which consisted on setting the UI expectation to be 100% mimic Special:EditGrowthConfig.

In the checkbox approach the problem is minor, maybe even not a problem but let me elaborate. When the user faces the "Copyedit" checkbox, they should read "Disabled" as an assertion and then the social convention is that marking the checkbox and saving will make the system comply to that assertion. In this case the assertion "Disabled" is kind of a negative clause (Not enabled). People with dyslexia can struggle to solve this puzzle. In general, I'd say a form guideline for checkboxes should be to propose a positive clause by the side of the control. It should be trivial to turn a "opt-out" checkbox like this one into a marked checkbox with a positive clause, then the mark and the text match in terms of semantics.

Agree having the default as 'negative' may be confusing. Can we use 'Turned on' as the default?

I think we should support both, but the checkbox should remain as the default. I think we want to update copy texts to better match the default checkbox control and drop the yes/no radio button from GrowthExperiments forms as soon as we can.

Got it, that makes sense. Should we accommodate all most? radio buttons to checkboxes? I'm wondering what would happen when the question doesn't imply Yes/No answers. For example:

ex radio buttons.png (123×442 px, 7 KB)

Using a checkbox here isn't really cohesive IMO. Since I am guessing this example only allows one selection and radio buttons are best for that kind of case.

Agree having the default as 'negative' may be confusing. Can we use 'Turned on' as the default?

Yes, can we capture this somewhere in the form guidelines?

Got it, that makes sense. Should we accommodate all most? radio buttons to checkboxes?

Right, we should update copy texts accordingly. So far, the mentorship ones, should I create separate task for this?

Screenshot 2024-04-16 at 18.00.19.png (420×1 px, 66 KB)

I'm wondering what would happen when the question doesn't imply Yes/No answers. For example:

ex radio buttons.png (123×442 px, 7 KB)

Using a checkbox here isn't really cohesive IMO. Since I am guessing this example only allows one selection and radio buttons are best for that kind of case.

Indeed, after discussing this problem with engineers we decided that we will represent this selection as an enumeration of strings rather than a boolean, see T362685.

Yes, can we capture this somewhere in the form guidelines?

Sure, I'll add it.

Right, we should update copy texts accordingly. So far, the mentorship ones, should I create separate task for this?

I have created T362905: Community Configuration: update copy to accommodate radio buttons to checkboxes in Special:CommunityConfiguration/Mentorship for this matter and I will update the task description with the suggested copy. Feel free to make any changes to the task you feel are necessary :)

Can we consider this task resolved?

I have created T362905: Community Configuration: update copy to accommodate radio buttons to checkboxes in Special:CommunityConfiguration/Mentorship for this matter and I will update the task description with the suggested copy. Feel free to make any changes to the task you feel are necessary :)

Thank you!

Can we consider this task resolved?

Indeed.