Page MenuHomePhabricator

Improve how linter errors in signatures are communicated in Special:Preferences
Closed, ResolvedPublic

Description

T140606 ensures the custom signatures people set in Special:Preferences do not contain any linter errors.

This is a task is about ensuring that when a signature does contain a linter error, people are able to easily and clearly understand:

  • Error(s) are preventing the signature they have set from being saved
  • What those errors mean
  • How those errors can be corrected so they can save a custom signatrue

Implementation details

When complete, this section will contain the adjustments we will make to meet the objectives defined in the bullet list above.

Open questions

This section contains the open questions that will constrain/inform the changes we implement.

  • 1. Why does the top-most Missing end tag: small... error's Show error location button highlight the entire range [i] rather than the precise tag that's missing a corresponding end tag as the the middle Missing end tag: small... error's Show error location button does? [ii]
  • 2. Is it possible to suppress the last Multiple unclosed formatting tags on the page error rather than the first two? [iii]
    • Thinking: the error messages people see should be related as explicitly and precisely as possible to the cause of said error message.
  • 3. Within the Missing end tag: small error, is it possible to replace the small text with </small>?
    • Thinking: the error message should provide people explicit instructions about what they need to do to resolve the error.

Done

  • All "Open questions" are answered
  • The behavior described in the "Implementation details" is implemented

i. Top-most Missing end tag: small...
Screen Shot 2020-07-31 at 11.59.34 AM.png (446×1 px, 93 KB)
ii. Middle Missing end tag: small...
Screen Shot 2020-07-31 at 11.59.43 AM.png (462×1 px, 98 KB)

iii. T140606#6314356

Event Timeline

  • 1. Why does the top-most Missing end tag: small... error's Show error location button highlight the entire range [i] rather than the precise tag that's missing a corresponding end tag as the the middle Missing end tag: small... error's Show error location button does? [ii]

They both highlight the entire range – but for the middle one, there is nothing following the opening tag, so the result is the same as if it only highlighted the tag.

  • 2. Is it possible to suppress the last Multiple unclosed formatting tags on the page error rather than the first two? [iii]

Yes

  • 3. Within the Missing end tag: small error, is it possible to replace the small text with </small>?

Yes

I wonder if it would help to change the list from bulleted to numbered, to make it clear that the two "Missing end tag" errors are actually separate errors and not some accidental duplication?

I think we should do this as well.

Change 618406 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/core@master] SignatureValidator: Tweaks to linter error messages

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

These all appear to me to be features of the Linter engine. I see all of these features when I use LintHint on articles, and I agree that they could be improved. It might be a good idea to add the Linter project to this ticket.

It seems to me that the changes would need to be made separate in each interface that displays lint errors though… and I'm also not sure if they all would make sense in all of them, e.g. having the "Multiple unclosed formatting tags" category is probably still useful on https://en.wikipedia.org/wiki/Special:LintErrors even if it's redundant.

Change 618406 merged by jenkins-bot:
[mediawiki/core@master] SignatureValidator: Tweaks to linter error messages

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

This looks like an improvement to me [i]; nice, Bartosz.


i.

Screen Shot 2020-08-14 at 4.30.10 PM.png (910×1 px, 234 KB)