Page MenuHomePhabricator

Improve handling of invalid qualifiers
Open, Needs TriagePublic

Description

User story: As a Commons user, when I'm adding or editing a qualifier, I want feedback if I enter an invalid value.

We have this: When a user adds a new coordinate location qualifier, the publish button is disabled until complete and valid data is entered. However, if a user changes an existing qualifier to an invalid value, they can hit publish and the qualifier is removed with no error message. To replicate:

  1. Add a coordinate location qualifier, publish
  2. Click edit and change latitude or longitude to something erroneous, e.g. over 180
  3. Hit publish and be confused...

I tested quantity locally (by editing the quantity to be blank) and the behavior was similar.

We want this: The qualifier is getting removed before the submit() method runs, therefore there is no error to catch and nothing is shown to the user. We either need to disable the publish button when there is invalid data (recommended) or ensure that an error message can be shown on publish.

Acceptance Criteria:

  • When an invalid value is input, the Publish button becomes disabled and an error message is shown to the user. Once the input becomes valid, the Publish button is enabled.

OR

  • When an invalid qualifier value is input, on publish, the process fails and an error message is shown to the user, and the qualifier is not removed.

During development, please test the following:

  • Test this feature while logged in AND logged out
  • Test this feature on at least one mobile browser
  • Test that this feature works on the file page AND the Add Data step on UploadWizard (if applicable, some features only exist on one or the other)

Details

Related Gerrit Patches:
mediawiki/extensions/WikibaseMediaInfo : masterWIP: Handle globecoordinate errors

Event Timeline

AnneT created this task.Sep 16 2019, 8:47 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 16 2019, 8:47 PM
AnneT claimed this task.Jan 15 2020, 5:08 PM
AnneT moved this task from To Do to Current Work on the Structured-Data-Backlog board.
AnneT moved this task from To Do to Doing on the Structured-Data-Backlog (Current Work) board.

Change 566316 had a related patch set uploaded (by Anne Tomasevich; owner: Anne Tomasevich):
[mediawiki/extensions/WikibaseMediaInfo@master] WIP: Handle globecoordinate errors

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