Skip to content
This repository has been archived by the owner on Feb 13, 2024. It is now read-only.

Implement Undo functionality #4078

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Abdulbaqi-Alshareef
Copy link
Contributor

📒 Description

🕶️ Types of changes

New feature** (non-breaking change which adds functionality)

🤯 List of changes

-Support Undo deletion.
-Avoid interrupting the running time entry so you can undo the deletion while having time entry running.

Undo

👫 Relationships

Closes #4077

🔎 Review hints

-Delete one or more time entries.
-Right-click on TimeEntry List (same as you do when removing time entry) and choose "Undo delete time entry"
-This PR only supports Undo not Redo(I can add it if requested).
-Undo only supports the deletion of time entries.
-You can use undo only using the mouse, ctrl + z reserved for another functionality.

Copy link
Contributor

@skel35 skel35 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution @Abdulbaqi-Alshareef!

I have not fully reviewed and tested the PR yet, but I have 2 notes based on my initial review:

  1. Ctrl+Z can be supported if the keyboard focus is inside the time entry list. It should be straightforward to add.
  2. Why do we need a TimeEntrySnapshot class? TogglTimeEntryView should fit here.

@skel35 skel35 added the windows label May 18, 2020
@Abdulbaqi-Alshareef
Copy link
Contributor Author

-You are right, at first, I wrote TimeEntrySnapshot class at first steps implementing the function but now no need for it.
-I added Ctrl+Z shortcut to undo deletion, and it only works if the time entry list got focused and that's difficult for the user due to the timer's behavior to retain focus.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support Undo deletion of time entries
2 participants