nus-cs2103-AY2324S1 / pe-dev-response

0 stars 0 forks source link

Undo command undoes a command further back from the one that I last used #5994

Open nus-se-script opened 1 year ago

nus-se-script commented 1 year ago


video:https://raw.githubusercontent.com/nus-cs2103-AY2324S1/pe/master/files/b1eed719-dcea-43aa-a7c1-cb7f38e9d4b0.mp4

Not sure if this is a functionality flaw (if this was intended). However, after using a command that is not undoable, and using the undo command, it will undo the last undoable command.

This could be detrimental as I may not even realize that I had undone something accidentally. I may have thought that the command was undoable and used it, only to delete the last person I had added, or edited.

Undo function should instead report that the last command is not undoable, or ask for further confirmation if they want to proceed to undo the last undoable.

While this is fixable using the redo command, people may not even realise they had used this incorrectly.

An error message would instead be more helpful


[original: nus-cs2103-AY2324S1/pe-interim#5973] [original labels: type.FeatureFlaw severity.Medium]

zacwong2151 commented 1 year ago

Team's Response

I guess I could have made the description more clear.

The UG currently describes the undo command as Undoes an undo-able command. However, a more clear description could be Undoes the latest undo-able command

Undo function should instead report that the last command is not undoable This is not valid as the undo command should successfully work in the example given by the tester

However, I did explicitly state which commands are undoable, which implies that the commands not stated are not undoable. Hence, in the example above, the eshow command will not affect the undo history stack, and calling undo will undo the vcreate command

Thus I reject this as what happened in the vid above is the expected behaviour

Duplicate status (if any):

--