HaolinZhong / PMCA

Practice Makes Code Accepted
MIT License
85 stars 10 forks source link

[Improvement]: Support undo operations #15

Closed ycaptain closed 5 months ago

ycaptain commented 8 months ago

Product requirement

Support undo and redo features for usage scenarios.

Background

People might delete a record unintentionally, like what I just did.

If it happened, the Ebbinghaus forgetting curve would be lost.

I want to use it without carefulness for non-regret operations.

Use cases

Freshman: Try to delete and recover a record. However, he can only reset this record after a deletion instead of returning to how things were.

Common: Regret to master or delete a record. However, he can only reset this record instead of returning to how things were.

Potential solution

Keep an operation store for each operation and necessary details: mark as mastered, reset progress, delete.

HaolinZhong commented 8 months ago

Hi, that's a very good suggestion. Will implement this along with the ongoing refactoring. Thank you!

HaolinZhong commented 5 months ago

Implemented in befedefed14347f2f6cc9ab2e2dbc666396617cf