Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add undo functionality with ctrl+z #676

Merged
merged 8 commits into from
Oct 4, 2023
Merged

feat: add undo functionality with ctrl+z #676

merged 8 commits into from
Oct 4, 2023

Conversation

kamui-fin
Copy link
Contributor

@kamui-fin kamui-fin commented Sep 21, 2023

Resolves #673

Essentially creates an undo stack reducer with callbacks that perform the opposite operation of any user action (handle* functions). So far seems to be working, however, I will perform some more manual testing before merging.

@kamui-fin kamui-fin requested review from a team and akevinge as code owners September 21, 2023 18:50
@github-actions
Copy link

Copy link
Member

@akevinge akevinge left a comment

Choose a reason for hiding this comment

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

Overall looks okay aside from a few bugs here and there. As discussed on Discord, we shouldn't undo for filters and selections though.

src/components/planner/SemesterContext.tsx Outdated Show resolved Hide resolved
src/components/planner/SemesterContext.tsx Outdated Show resolved Hide resolved
Copy link
Member

@akevinge akevinge left a comment

Choose a reason for hiding this comment

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

Seems like there's a build error in a weird spot. Could you sync with develop? #679 changes the implementation of handleDeleteAllSelectedCourses.

src/components/planner/SemesterContext.tsx Outdated Show resolved Hide resolved
src/components/planner/SemesterContext.tsx Outdated Show resolved Hide resolved
@github-actions
Copy link

Copy link
Member

@akevinge akevinge left a comment

Choose a reason for hiding this comment

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

It seems like deleting a course from a semester can't be undone atm. I think we should have that.

Also, do you think you could add an undo for mass deletion of selected courses? Overall looks good though! Can't wait to see this in prod

@github-actions
Copy link

github-actions bot commented Oct 3, 2023

@github-actions
Copy link

github-actions bot commented Oct 4, 2023

@kamui-fin kamui-fin enabled auto-merge October 4, 2023 20:36
@kamui-fin kamui-fin merged commit 46ac206 into develop Oct 4, 2023
@kamui-fin kamui-fin deleted the undo branch October 4, 2023 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request] Add ability to undo in editor NP-104
2 participants