Page MenuHomePhabricator

Add error handling to description editing interface.
Closed, ResolvedPublic0.5 Estimated Story Points

Description

This is to create a visual component that shows error information received from the server when the description is rejected (AbuseFilter, or other type of error).

  • The component will be shown inline with the editing interface (i.e. below the edit field).
  • The component will appear only when an error condition was returned by the server.

Event Timeline

MBinder_WMF set the point value for this task to 0.5.Oct 14 2016, 6:34 PM

Change 319760 had a related patch set uploaded (by Niedzielski):
Marshal DescriptionEditFragment Bundle not Intent

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

Change 319760 merged by jenkins-bot:
Marshal DescriptionEditFragment Bundle not Intent

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

Change 319917 had a related patch set uploaded (by Niedzielski):
Add @TestedOnBool annotation for @Theory tests

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

Change 319918 had a related patch set uploaded (by Niedzielski):
Hygiene: replace requestFocus idiom with util

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

Change 319919 had a related patch set uploaded (by Niedzielski):
Add DescriptionEditViewTest

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

Change 320311 had a related patch set uploaded (by Niedzielski):
Fix potential NPE & hygiene in DescriptionEditView

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

Change 320313 had a related patch set uploaded (by Niedzielski):
Hygiene: add layout prefixes to description IDs

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

Change 319917 merged by jenkins-bot:
Add @TestedOnBool annotation for @Theory tests

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

Change 319918 merged by jenkins-bot:
Hygiene: replace requestFocus idiom with util

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

Change 319919 merged by jenkins-bot:
Add DescriptionEditViewTest

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

Change 320311 merged by jenkins-bot:
Fix potential NPE & hygiene in DescriptionEditView

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

Change 320313 merged by jenkins-bot:
Hygiene: add layout prefixes to description IDs

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

Change 320543 had a related patch set uploaded (by Niedzielski):
Add error feedback UI to description editing

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

Change 320543 merged by jenkins-bot:
Add error feedback UI to description editing

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

hi @Niedzielski – I'm unable to see any error messaging on the latest alpha. The linear progress indicator is just animating in a loop with no message at all to design review. Am I missing a trick?

pasted_file (1×1 px, 92 KB)

@RHo, you should see something like this (I just flipped on airplane mode and pressed submit):

screenshot-2016-11-21-12-46-24-808815886.png (2×1 px, 204 KB)

hi @Niedzielski – can we fix this so the error message doesn't push down the counter?

Expected:

pasted_file (266×832 px, 37 KB)

(screenshot from the demo component on the Angular material site)

Secondly, I will file a separate ticket since I think we should display system errors (such as no connectivity) as toasts/snackbar rather than inline validation, since the error has nothing to do with the input itself.

Change 323987 had a related patch set uploaded (by Niedzielski):
Update: hide description length on error, show on edit

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

@RHo, it looks like we were using a custom view for this when we should have been using the built in platform components from Google. I've refactored this view and now the counter fades out on error and back in when editing. Does this work for you?

screenshot-2016-11-28-16-11-53-718590551.png (2×1 px, 170 KB)
screenshot-2016-11-28-16-11-59-041276575.png (2×1 px, 183 KB)

Change 323987 merged by jenkins-bot:
Update: hide description length on error, show on edit

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

Hi, could someone please write Steps to reproduce/Expected Results/Actual Results so I can reproduce the scenario using an Android Handset? Thanks.

o/ @Nicholas.tsg

  1. Go to the Wikipedia:Wikidata/Wikidata Sandbox page
  2. Edit the description by tapping the first pencil
  3. Put the device in airplane mode
  4. Change the description and submit

Testing specs: Samsung-SM-J120A, Android version 6.0.1, Wikipedia app build 2.4.184-alpha-2016-12-23. This is working as expected as error information is shown:

T148203.png (800×480 px, 65 KB)