AY1920S1-CS2103-T16-1 / main

SugarMummy
https://ay1920s1-cs2103-t16-1.github.io/main/
MIT License
0 stars 5 forks source link

Issue on clearing the textField #145

Closed nus-pe-bot closed 4 years ago

nus-pe-bot commented 4 years ago

If an invalid or unknown command is entered, the input box is not cleared. User has to manually delete by themselves


[original: Cary-Xx/ped#1]

whneo97 commented 4 years ago

[For reference; commented on original issue]

Hi, this behaviour for the input box is intended, as we have commands that may require quite a number of fields. As such, when a user types a line of command that is erroneous, it is likely that most of the commands are correct and that the user would not wish to have the enter line cleared to retype everything again.

For instance, a user may key in the following:

editbio dp//Users/bob/Desktop/doge.png desc/hello world n/testName nric/testNric gender/testGender dob/1919-11-12 p/91234567 e/81234567 m/testMedicalCondition a/example address 123 goal/testGoal o/testOtherInfo

If a bio does not already exist, all the user has to do is to change editbio to addbio

An alternative case would be a typo of a prefix (eg. typing n/ as N/.

Or a case where the file at the file path in dp//Users/bob/Desktop/doge.png cannot be found / loaded and requires modification or removal.

We believe in most scenarios such as those described above, it would be much easier for the input box to remain uncleared, as the user would more likely intend to modify the errors in their line of command rather than enter a completely new command.

Please kindly let us know if this helps to explain the described problem and whether it is reasonable, or whether there are any alternatives. Otherwise, will close the issue?

Thank you!