Page MenuHomePhabricator

editing data values using server-side parser/validation will disable "save" button until server responds
Closed, DeclinedPublic

Description

When editing a Snak value which uses server-side backend parser/validation (e.g. Quantities), the "save" button will be disabled until the request returns and says the value is valid.
Originally, we designed the system to always allow hitting "save" independently of backend validation - only immediate frontend parsing failure would immediately disable the save button after a value change and prevent any parse/validation request to the backend for the current value. If the backend had a problem with the value, the user would be notified and the edit mode would switch back on (with the save button disabled until the value changes again?).

Allowing to hit the save button before backend validation is done allows better use of keyboard only usage. E.g. I enter a quantity and hit enter. With the current implementation the enter might be ignored depending on how fast after entering the number I hit enter and how fast the connection works.


Version: unspecified
Severity: normal
Whiteboard: papercut, u=dev c=frontend p=0

Details

Reference
bz57665

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:25 AM
bzimport set Reference to bz57665.
bzimport added a subscriber: Unknown Object (MLST).
Lydia_Pintscher removed a subscriber: Unknown Object (MLST).
Lydia_Pintscher removed a subscriber: Unknown Object (MLST).Dec 1 2014, 2:53 PM

This has been the case for all datavalue types for a year. I suppose users adapted to it. Close?

I still think we should fix this tbh even if people get used to something broken.

I don't think it's broken per se. In any case, supporting saving of unparsed values (i.e. ad-hoc parsing) is quite some new feature which would require a lot of work.

I don't think it's broken per se. In any case, supporting saving of unparsed values (i.e. ad-hoc parsing) is quite some new feature which would require a lot of work.

By “ad-hoc parsing” do you mean client side parsing of the values on the front-end? We did this before and it's unfeasible.

I believe the simplest solution to enabling the save button while validation is going on would be this:
If “save” gets clicked while a validation is still running then the actual “save” action will be deferred until validation is successful. If validation fails, the “save” action gets cancelled and the user gets some sort of visual feedback (which should be the case anyhow because of the invalid value). This behavior shouldn't require a lot of work and would be really neat.

"Ad-hoc parsing" in this context means that, for example, a time value is stored exactly as the user has entered it, and only parsed when a machine-readable value is needed. All this would happen server-side.

There are no plans to implement something like this.

The behavior you are describing means the user can smash the return key very early, and will entirely miss the preview that is shown after the input was parsed and formatted. This is crucial in many cases, e.g. when the user types "01/02/2003" and expects this to become "January 1st", but it becomes "February 2nd".

All these considerations are the reason this got declined for now.

The behavior you are describing means the user can smash the return key very early, and will entirely miss the preview that is shown after the input was parsed and formatted.

Yes, it probably makes sense to decline this if you want to hold the average user's hand rather than satisfy pro users. On the other hand, consider how in MW we allow saving wikitext edits without using preview first.

"Ad-hoc parsing" in this context means that, for example, a time value is stored exactly as the user has entered it, and only parsed when a machine-readable value is needed. All this would happen server-side.

Is this even being discussed anywhere? Sounds like a pretty insane idea for a multitude of reasons.

I'm really disappointed to see that this was declined. I find this behaviour infuriating and I've developed a habit of hammering the enter key around 5 times when I want to save a statement because it's so slow and unresponsive.

I believe the simplest solution to enabling the save button while validation is going on would be this:
If “save” gets clicked while a validation is still running then the actual “save” action will be deferred until validation is successful. If validation fails, the “save” action gets cancelled and the user gets some sort of visual feedback (which should be the case anyhow because of the invalid value). This behavior shouldn't require a lot of work and would be really neat.

This is exactly how I would expect it to behave.

The behavior you are describing means the user can smash the return key very early, and will entirely miss the preview that is shown after the input was parsed and formatted. This is crucial in many cases, e.g. when the user types "01/02/2003" and expects this to become "January 1st", but it becomes "February 2nd".

You can't expect users to check the preview every single time. People's time/energy is limited and most values will be unambiguous and parsed correctly. Someone who is trying to save already thinks that the value will be correctly interpreted.

If you want people to pay attention to ambiguous values like "01/02/2003", then the interface needs to stop treating them like unambiguous values. For example, if a user enters "01/02/2003", list the possible interpretations and ask them to select which one they mean.