-
Enhancement
-
Resolution: Unresolved
-
P5
-
None
-
None
When the user interactively enters quantities (or other values, mainly numerical) as text, the parser can often tolerate some deviations from the canonical format.
Small deviations such as extraneous white space or thousand separators can and should silently be ignored. When enter is pressed, the text field content should be replaced with the canonically formatted value.
Large deviations that makes the value totally unparseable should give an error. When enter is pressed, the text field today typically reverts to the previous value. (An alternative way would be that the text field keeps focus until the user corrects the mistake or presses escape, or similar. In this case, some hint about this should be provided to the user.)
However, there are a number of deviations where the parser is able to extract some reasonable value, but it is less clear that this was what the user intended. Examples include extraneous non-white space characters (trailing or possibly leading), component values (such as day of month) out of range, or unsupported precision.
Today, some of these are silently ignored, and some (after JMC-2771) are treated as errors.
It would be better to handle these differently. Less intrusive than an error, not losing the edit once enter is pressed. Ideally, the user should be aware of parts of the string being ignored or adjusted while typing as well as that an adjustment was made after having pressed enter. Reverting to the old value, or the entered string, would both be useful features.
It might actually suffice to extend the content assist to provide feedback while typing. If we continue to forcibly show the content assist, the user more or less have to select one correction before submitting the text field (enter does the former, not the latter, in this case).
One problem is if the user didn't notice the content assist suggestions, but just pressed enter anyway. In this case, showing a small warning marker might help, if we can figure out when to remove it. (On the second enter press, when leaving the text field?)