Page MenuHomePhabricator

Delay the display of error message when gloss language is wrong
Closed, ResolvedPublic3 Story Points

Description

Following T198203, now when a gloss language code is incorrect, the "Publish" button is blocked and an error message appears.
This behaviour is correct, but when I start typing a language code, for example "fr", as soon as I type the "f", the field immediately gets red, the error message appears, and that's confusing, since I didn't finish typing the code.

Ideally, we would have a solution to keep blocking the save button and warning the user, while letting them the time to type the language code quietly.

Here's what I suggest:

  • keep the Publish button blocked as long as the language code is incorrect
  • wait 5 seconds and check again before displaying the error message and coloring the field in red

Event Timeline

Restricted Application added a project: Wikidata. · View Herald TranscriptSep 26 2018, 11:14 AM

An alternative approach would be to listen for change events instead of for input events: change only fires when the change “is committed by the user”, e. g. when the input field loses focus. But I have no idea if that’s possible to do with Vue.js.

Ohhh that would be even better!

Addshore set the point value for this task to 3.

Change 464008 had a related patch set uploaded (by Ladsgroup; owner: Amir Sarabadani):
[mediawiki/extensions/WikibaseLexeme@master] Check gloss language on change and not on input

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

Restricted Application added a project: User-Ladsgroup. · View Herald TranscriptOct 2 2018, 6:02 PM

Change 464008 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexeme@master] Check gloss language on change and not on input

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

Addshore closed this task as Resolved.Oct 8 2018, 10:51 AM

Verified on beta. Gif attached...

Nikki added a subscriber: Nikki.Oct 18 2018, 4:23 PM