AY2425S1-CS2103T-F12-1 / tp

MIT License
0 stars 5 forks source link

Implement undo and redo #158

Closed lithops-zty closed 3 weeks ago

lithops-zty commented 1 month ago

UI:

Backend:

weiseng18 commented 1 month ago

Proposed idea:

User should type in undo and press <Enter> to execute UndoCommand. Assumption for the first 2 section is that we only implement undo. The 3rd section explains how we implement redo, after implementing undo

UI

Backend:

This is not explicitly discussed yet, but I think we should go with option 1 since it is a universal method which is easier to implement.

image

Future redo support:

weiseng18 commented 1 month ago

Other points of discussion:

  1. Are we ok that the "command history" on the right only shows commands that modify the list?
  2. This approach means that undo/redo will refer to only the modifying commands as the history timeline.
  3. How to display undo
MAOXIONGKAI commented 1 month ago

@weiseng18 Thanks for the detailed description on this part! I think implementing both undo/redo should be feasible because such implemented as been given in AB4 Developer Guide. If you haven't read through this, I think maybe we can discuss on the feasibility of fully adapting this approach, or any adjustments to be made to match our own product requirements. Regard rest of the things, since I am the one doing undo/redo feature, I will seek advice from @lithops-zty as well, thank you