Page MenuHomePhabricator

CommunityConfiguration: numerical field warnings
Open, Needs TriagePublic

Description

As a follow-up for T367720: GrowthExperiments CommunityConfiguration: Add minimum and maximum validation constraints to applicable fields
Values like 3e10 are accepted. The success confirmation is displayed and the value gets stored in MediaWiki json file.

e.g. https://test.wikipedia.org/w/index.php?title=MediaWiki:GrowthExperimentsMentorship.json&oldid=599464

The confusion can be resolved by introducing hard limits on the integer size. For example, Minimum required link score from https://test.wikipedia.org/wiki/Special:CommunityConfiguration/GrowthSuggestedEdits only supports numbers between 0 and 1. Setting a hard limit is useful in cases where there is a technical restriction on the numbers we can process, such as the link score. For those fields, setting the limit is also fairly easy (as there is no possible dispute about its value).

On the other hand, there is no (clean) way to define a hard limit for other values. While 3e10 definitely makes no sense in Getting started notification context, it is hard to draw an exact line between "makes sense" and "makes absolutely no sense". To prevent the confusion in those cases, it could be helpful to have a warning system. That way, CommunityConfiguration could say "most users set this to less than 500, you set it to 30 millions, are you sure you want to proceed". If the user confirms, then the change is intentional and should be honoured. If not, then the user would be given an opportunity to change their mind (and perhaps realise their typo).

Event Timeline

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

(2) Blanking a numerical field is saved and the field is not listed anymore.

As I understand it, that is working as designed. What behavior would you have expected?

(1) Values like 3e10 are accepted. The success confirmation is displayed and the value gets stored in MediaWiki json file.

It does get stored as as a proper 30000000000 though. So I think we're fine from the point of view that a valid config will be stored. What behavior would you have expected?

(2) Blanking a numerical field is saved and the field is not listed anymore.

As I understand it, that is working as designed. What behavior would you have expected?

I wasn't sure what values are are actually saved when numerical fields are blanked. For example,

  • on Special:CommunityConfiguration/GrowthHomepage I delete values from Try Suggested edits notification and Keep going notification , and click "Save changes"
  • the success message is displayed and the form showed those two fields without any values in them

However,

  • View history doesn't record this edit
  • MediaWiki:GrowthExperimentsHomepage.json doesn't show the fields that I just blanked.
  • clicking on View form shows the form with the fields and with the previous values (that I tried to remove) displayed.

As a user at this point, I might be confused why my edits haven't been saved.

(1) Values like 3e10 are accepted. The success confirmation is displayed and the value gets stored in MediaWiki json file.

It does get stored as as a proper 30000000000 though. So I think we're fine from the point of view that a valid config will be stored. What behavior would you have expected?

Yes, the value is stored correctly, exactly as the format says. My concern is two-fold:

  • users might type this by pure mistake without quite realizing what such format means
  • the values might have unpredictable impact on functionality.

(1) Values like 3e10 are accepted. The success confirmation is displayed and the value gets stored in MediaWiki json file.

From a CommunityConfiguration perspective, this sounds okay. If an extension expects an arbitrary integer, we should accept any number the user gives us. From a GrowthExperiments perspective, I totally understand this might be confusing,

The confusion can be resolved by introducing hard limits on the integer size. For example, Minimum required link score from https://test.wikipedia.org/wiki/Special:CommunityConfiguration/GrowthSuggestedEdits only supports numbers between 0 and 1. Setting a hard limit is useful in cases where there is a technical restriction on the numbers we can process, such as the link score. For those fields, setting the limit is also fairly easy (as there is no possible dispute about its value).

On the other hand, there is no (clean) way to define a hard limit for other values. While 3e10 definitely makes no sense in Getting started notification context, it is hard to draw an exact line between "makes sense" and "makes absolutely no sense". To prevent the confusion in those cases, it could be helpful to have a warning system. That way, CommunityConfiguration could say "most users set this to less than 500, you set it to 30 millions, are you sure you want to proceed". If the user confirms, then the change is intentional and should be honoured. If not, then the user would be given an opportunity to change their mind (and perhaps realise their typo).

Since introducing a warning system to Community Configuration would be a substantial project, I propose we don't do anything about this for now (at least until this actually confuses someone). @KStoller-WMF @Etonkovidova @Michael, does that sound like a good approach to you?

(2) Blanking a numerical field is saved and the field is not listed anymore.

Good catch! This is definitely a bug that should be fixed. I filled it separately as T377486: Blanking a numerical field in CommunityConfiguration does not take any effect, adding in my own notes as well.

KStoller-WMF renamed this task from CommunityConfiguration: numerical field validation for scientific format and empty values to CommunityConfiguration: numerical field warnings.Thu, Oct 17, 10:22 PM
KStoller-WMF updated the task description. (Show Details)

Thanks! Since we filed T377486 separately, I've update this task to only reflect the potential warning system idea.

I don't think this is worth pursuing immediately, but let's leave this task open in case we start to see examples of where this would have been helpful.

(1) Values like 3e10 are accepted. The success confirmation is displayed and the value gets stored in MediaWiki json file.

Since introducing a warning system to Community Configuration would be a substantial project, I propose we don't do anything about this for now (at least until this actually confuses someone). @KStoller-WMF @Etonkovidova @Michael, does that sound like a good approach to you?

Thx, @Urbanecm_WMF -yes, this is an edge case. My concern was that such big values might break some functionality. Since there is no risk of that, the issue is about usability only (and potential confusion). Generally, I agree that until some actual use case, such issues can wait.