Page MenuHomePhabricator

Enhanced submission warnings
Closed, ResolvedPublic2 Estimated Story Points

Assigned To
Authored By
• Charlotte
Jun 30 2020, 9:57 PM
Referenced Files
F32187528: 2020-08-18 12.46.07.png
Aug 18 2020, 10:49 AM
F32187521: 2020-08-18 12.41.32.png
Aug 18 2020, 10:49 AM
F32187523: 2020-08-18 12.40.13.png
Aug 18 2020, 10:49 AM
F32187522: 2020-08-18 12.40.24.png
Aug 18 2020, 10:49 AM
F32128386: 2020-08-14 10.26.37.png
Aug 14 2020, 8:34 AM
F31962849: 2020-08-04 11.31.40.png
Aug 4 2020, 9:48 AM
F31962839: 2020-08-04 11.19.01.png
Aug 4 2020, 9:48 AM
F31962837: 2020-08-04 11.17.31.png
Aug 4 2020, 9:48 AM

Description

Outline

To improve the quality of edits submitted through SE, we would like to warn users when they type article descriptions or image captions with the following characteristics:

  • Warn if article descriptions begin with a capital letter in English (guidance)
    • If description that user is typing starts with a capital, show warning message saying that descriptions should normally begin lowercase.
  • Minimum length for captions and descriptions
    • Prevent users submitting image captions or article descriptions if less than 2 chars.
  • No ending punctuation
    • Prevent users submitting descriptions if they end with punctuation (red error message, inactive publish button)
  • Warn if article descriptions begin with a definite article in English (guidance)
    • If description that user is typing starts with a capital, show warning message saying that descriptions should not start with a definite article.

To be released as an A/B test - see if revert rate is less in treatment group than control group.

Guardrail: also look at effects on edit volume and editor retention.

Designs (👉 Zeplin)

DefaultWarningError: charactersError: punctuation
Direction A: “Native” with helper text
sev6-00a-default.png (720×1,440 px, 182 KB)
sev6-01a-warning.png (720×1,440 px, 215 KB)
sev6-02a-error-characters.png (720×1,440 px, 190 KB)
sev6-03a-error-punctuation.png (720×1,440 px, 211 KB)
Direction B: Custom
sev6-00b-default.png (720×1,440 px, 180 KB)
sev6-01b-warning.png (720×1,440 px, 211 KB)
sev6-02b-error-characters.png (720×1,440 px, 189 KB)
sev6-03b-error-punctuation.png (720×1,440 px, 209 KB)

👉 Zeplin

Additions

  • Per our discussion yesterday, Direction A: Native seems to be only partially feasible, since a “Warning” state can’t be achieved.
    • I was still interested in creating a mock for this — as I think it would be the way to go.
  • Direction B: Custom looks quite similar to A, but the text below the input field is a custom component. It imitates the native helper text.
    • It does not feature the additional character count input field as there’d be an visual imbalance of the helper text and the counter. Plus, error messages would be shown below the fold on smaller devices.
  • The concern of the warning/error states not being visible from yesterdays conversation are addressed by using inline icons in the input field itself to indicate that there’s an error.
  • Copy:
    • Warning
      • Start with a lowercase letter unless the first word is a proper noun
    • Error: characters
      • Use a minimum of 2 characters
    • Error: punctuation
      • Do not use punctuation at the end of your text input

Optional

  • The “Article” text at the top can be capped at two lines if we notice that the error messages are pushed below the fold when testing this.

Questions

  • Direction B: Custom:
    • Is there a way to implement a custom character count below the input field that could be aligned properly with the helper text?
    • Or alternatively, use the “Native” character count and set a minus margin on the helper text below to align with the counter.
    • The current reality/problem is this:


      sev6-01b-warning-reality.png (720×1,440 px, 214 KB)

Analytics questions

For SE edits where a warning was shown:

  • Is the revert rate less than the control group?
  • Is edit volume and 3-day editor retention less than the control group?

Resources

Event Timeline

• Charlotte updated the task description. (Show Details)
SNowick_WMF lowered the priority of this task from High to Medium.Jul 15 2020, 12:29 AM
SNowick_WMF moved this task from Triage to Kanban on the Product-Analytics board.
SNowick_WMF edited projects, added: Product-Analytics (Kanban); removed: Product-Analytics.
SNowick_WMF moved this task from Next 2 weeks to Blocked on the Product-Analytics (Kanban) board.

@schoenbaechler
Here is how the screen looks on an actual real device, namely the Samsung Galaxy S9 (the second most-used device by our statistics):

device-2020-07-21-094047.png (1,440×2,960 px, 207 KB)

There are plenty of other devices with even less generous vertical real estate.

@schoenbaechler
Another small question:

Since we're showing errors as the user types in real time, the user will always hit the error state of the description being too short (when the user types the first letter). And when the user types the second letter, the error will disappear. Is this desirable?

@Dbrant

Since we're showing errors as the user types in real time, the user will always hit the error state of the description being too short (when the user types the first letter). And when the user types the second letter, the error will disappear. Is this desirable?

You just entered the world of an ancient UX question. Luke Wroblewski (author of Mobile First) summarized it best in this article from 2009:

(...) negative reactions, longer completion times, and error rates illustrate that validating inputs prematurely can be harmful. Instead, when you validate open-ended questions, give feedback after the user finishes providing an answer. Or in situations in which people need help sooner, give feedback while they work toward an answer, but use an appropriate delay so premature error messages don’t frustrate them.

Long story short: can we implement an appropriate delay on the validation so users won’t be frustrated?

Long story short: can we implement an appropriate delay on the validation so users won’t be frustrated?

What's an appropriate delay?

@Dbrant, good question ... can we fine tune it together once implemented? I guess approximately 300ms after a user has stopped typing.

@schoenbaechler and cc @Dbrant
The helper text, activation indicator, and icons can be customized easily. I've tried to enable a bold text style to the helper text and it worked.
Here's the detail of the TextInputLayout in Material Design: https://material.io/develop/android/components/text-fields

One thing I noticed that we may need the "warning icon" resource, could you please make that downloadable in Zeplin?

One thing I noticed that we may need the "warning icon" resource, could you please make that downloadable in Zeplin?

Isn't it just the Material warning icon?

One thing I noticed that we may need the "warning icon" resource, could you please make that downloadable in Zeplin?

Isn't it just the Material warning icon?

Oops, you are correct.

@schoenbaechler I'm noticing that the error text in Direction A uses roboto-regular, but Direction B uses roboto-medium. Which one do we want to use? The default is roboto-regular. If we want to switch to roboto-medium, are we OK with all other input fields in the app using roboto-medium for the error text?

Let’s go with Roboto Medium for the helper text @Dbrant. Also, can we use Roboto Medium for all input labels? I saw some inconsistencies, e.g. here:

2020-07-27 12.58.21.png (1,080×2,160 px, 160 KB)
2020-07-27 12.58.41.png (1,080×2,160 px, 95 KB)

Thx for caring about the details!

Thanks @Dbrant, looks good so far and I think you nailed the timing of these messages.


Current implementation

From what I observed / tested — these are the four messages that we’re now introducing:

Article warningCapitalization warningLength errorPunctuation error
2020-08-04 11.16.25.png (1,080×2,160 px, 97 KB)
2020-08-04 11.19.01.png (1,080×2,160 px, 102 KB)
2020-08-04 11.17.08.png (1,080×2,160 px, 90 KB)
2020-08-04 11.17.31.png (1,080×2,160 px, 98 KB)

Article warning
Do not start with articles like "a" or "the".

Capitalization warning
Start with a lowercase letter unless the first word is a proper noun.

Length error
The text is too short.

Punctuation error
The text must not end with punctuation.


A few notes / questions

01) The messages above apply to both article descriptions and image captions. Is that what we want? E.g. I’m not 100% sure if the Article warning and Capitalization warning should be applied when editing image captions. What do you think @Charlotte
@Dbrant ?

02) Can we use the same typographical baseline for the helper text + character count? (see blue line below)

2020-08-04 11.31.40.png (1,080×2,160 px, 165 KB)

03) The current copy for Article warning reads like an error. We need to change it to something less urgent, as users will still be able to submit. Also, use correct typographical opening and closing quotes (“ and ” not "). I propose to change it to: Avoid starting with articles like “a” or “the”.

04) How do we handle warnings and errors in languages other than English? What languages do we support? I noticed that, e.g. the Article warning is not applied in German. Thanks for clarifying!

use correct typographical opening and closing quotes (“ and ” not ")

This is a bit odd, because we don't use typographical curly quotes anywhere else in the app, nor are they used in most Wikipedia articles. The Wikipedia style guide directs editors to use straight quote marks, not curly ones.

What languages do we support? I noticed that, e.g. the Article warning is not applied in German.

At the moment it's English. To support other languages, we need to hard-code a list of all indefinite/definite articles to avoid in each language. If you provide the possible German ones, I'll add them.

The messages above apply to both article descriptions and image captions. Is that what we want?

Although Commons doesn't yet have specific guidelines for captions (as Wikidata does), I would advocate for using the same rules for captions as we do for descriptions.

The messages above apply to both article descriptions and image captions. Is that what we want?

Although Commons doesn't yet have specific guidelines for captions (as Wikidata does), I would advocate for using the same rules for captions as we do for descriptions.

I disagree. Both warnings are unnecessary: an image caption is a proper sentence and can therefore start with an article and ought to start with a capital letter. Please make sure these warnings only apply to article descriptions.

I disagree. Both warnings are unnecessary: an image caption is a proper sentence and can therefore start with an article and ought to start with a capital letter. Please make sure these warnings only apply to article descriptions.

👍

@Dbrant, these are unchanged in the latest Alpha? 👇

02) Can we use the same typographical baseline for the helper text + character count? (see blue line below)

2020-08-04 11.31.40.png (1,080×2,160 px, 165 KB)

03) The current copy for Article warning reads like an error. We need to change it to something less urgent, as users will still be able to submit. Also, use correct typographical opening and closing quotes (“ and ” not "). I propose to change it to: Avoid starting with articles like “a” or “the”.

04) How do we handle warnings and errors in languages other than English? What languages do we support? I noticed that, e.g. the Article warning is not applied in German. Thanks for clarifying!

In T256816#6378894, @schoenbaechler wrote:

04) How do we handle warnings and errors in languages other than English? What languages do we support? I noticed that, e.g. the Article warning is not applied in German. Thanks for clarifying!

At the moment it's English. To support other languages, we need to hard-code a list of all indefinite/definite articles to avoid in each language. If you provide the possible German ones, I'll add them.

In T256816#6378894, @schoenbaechler wrote:

04) How do we handle warnings and errors in languages other than English? What languages do we support? I noticed that, e.g. the Article warning is not applied in German. Thanks for clarifying!

At the moment it's English. To support other languages, we need to hard-code a list of all indefinite/definite articles to avoid in each language. If you provide the possible German ones, I'll add them.

You can add the French ones: le, la, les, un, une, des
and Spanish: el, los, la, las, un, unos, una, unas

@schoenbaechler can correct me if I miss any of the German ones: der, den, dem, des, das, die

Perhaps @cooltey and @Sharvaniharan can give us lists of articles in the languages they speak (if the languages have articles at all - Latin, for example, does not). That will at least cover the most common languages.

I suppose since these lists are not visible anywhere in the app, it's not possible to use Translatewiki to source the others?

I suppose since these lists are not visible anywhere in the app, it's not possible to use Translatewiki to source the others?

No, I'm afraid not — and I'm guessing there are numerous languages for which the rules are more complex than matching a literal article at the start.

I suppose since these lists are not visible anywhere in the app, it's not possible to use Translatewiki to source the others?

No, I'm afraid not — and I'm guessing there are numerous languages for which the rules are more complex than matching a literal article at the start.

Yes, but presumably agglutinative languages and other languages where the article is implied don't have the same requirement on Wikidata.

Oh, and I forgot for French there's a partial article that's added when the next word begins with a vowel - L'

02) Can we use the same typographical baseline for the helper text + character count? (see blue line below)>

2020-08-04 11.31.40.png (1,080×2,160 px, 165 KB)

The standard component does not allow this to be changed.

03) The current copy for Article warning reads like an error. We need to change it to something less urgent, as users will still be able to submit. Also, use correct typographical opening and closing quotes (“ and ” not "). I propose to change it to: Avoid starting with articles like “a” or “the”.

👍

le, la, les, un, une, des
el, los, la, las, un, unos, una, unas
der, den, dem, des, das, die

👍

For German: der, die, das, den, dem, des, ein, eine, einem, einen, eines, einer

@Dbrant @Charlotte

@Dbrant → the feature seems to be disabled in the latest alpha (2.7.50330-alpha-2020-08-12)? I tested it with both article descriptions and image captions.

@schoenbaechler it sounds like you're in the "B" group.

I'll have to make a change to turn the feature always-on in the Alpha build.

@schoenbaechler
(in the newest alpha) To put yourself in the A-group, go to Developer settings, scroll all the way to the "a/b tests" section at the bottom, and change the setting to an even number, e.g. 0.

Thx @Dbrant for adding the setting!

There are some issues left to fix for the warning state

  • Input bottom-border does not adapt to warning state color
  • Input label (Article description) does not adapt its color in some cases (not as responsive, e.g. when typing an in English, it does not update to orange until space bar is tapped)

2020-08-14 10.26.37.png (1,080×2,160 px, 223 KB)

@schoenbaechler Whoops, the latest Material library had a regression that presented as this bug. I've had to work around it. Try again!

@Dbrant, okay!

01) While adding a few article descriptions with punctuation, this was happening quite a lot:

2020-08-18 12.41.32.png (1,080×2,160 px, 135 KB)
2020-08-18 12.40.24.png (1,080×2,160 px, 132 KB)
2020-08-18 12.40.13.png (1,080×2,160 px, 127 KB)
2020-08-18 12.46.07.png (1,080×2,160 px, 152 KB)

Can you look into it?

02) Also, when adding a few descriptions, I noticed that we need to prolong the delay as it’s too immediate. What is the current value? I suggest to at least 1.5x or 2x it.

Thx!

In T256816#6392724, @schoenbaechler wrote:

02) Also, when adding a few descriptions, I noticed that we need to prolong the delay as it’s too immediate. What is the current value? I suggest to at least 1.5x or 2x it.

Let's do 2x. It's super quick as-is.

In T256816#6392724, @schoenbaechler wrote:

01) While adding a few article descriptions with punctuation, this was happening quite a lot:

2020-08-18 12.41.32.png (1,080×2,160 px, 135 KB)
2020-08-18 12.40.24.png (1,080×2,160 px, 132 KB)
2020-08-18 12.40.13.png (1,080×2,160 px, 127 KB)
2020-08-18 12.46.07.png (1,080×2,160 px, 152 KB)

Can you look into it?

Ugh, this component is super buggy. I believe I've fixed it now.

02) Also, when adding a few descriptions, I noticed that we need to prolong the delay as it’s too immediate. What is the current value? I suggest to at least 1.5x or 2x it.

👍

Success @Dbrant → moving to QA signoff 👏

I know that this is closed, but FYI.
On the English Wikipedia, the article description is local and should start with a capital.