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

[Tooling] Support undo/redo #14042

Open
carolhmj opened this issue Jul 11, 2023 · 9 comments
Open

[Tooling] Support undo/redo #14042

carolhmj opened this issue Jul 11, 2023 · 9 comments
Assignees
Labels
Milestone

Comments

@carolhmj
Copy link
Contributor

This would improve user experience on NME, GUI Editor, etc... And a generic solution can be used in future tools.

@carolhmj carolhmj added enhancement nme Node Material Editor gui editor labels Jul 11, 2023
@carolhmj carolhmj added this to the 7.0 milestone Jul 11, 2023
@Pryme8
Copy link
Contributor

Pryme8 commented Jul 18, 2023

I have a generic script for "Commands" that you could wrap all the existing functionality in pretty easy.

https://github.com/Pryme8/Doomish/blob/main/src/Editor/Commands/Command.ts

Not sure if this would do it for you, but it has worked in every project that I have made that needs undo redo.

You can see how its used by the editor here:
https://github.com/Pryme8/Doomish/blob/main/src/Editor/Editor.ts#L295

and then a simple example command would be like this:
https://github.com/Pryme8/Doomish/blob/main/src/Editor/Commands/Common/DeleteRoomCommand.ts
Normally you just define them inline and not on a separate file like this, here is an example of that:
https://github.com/Pryme8/Doomish/blob/main/src/Editor/Gizmos/Gizmos.ts#L91

This can also be tied into a notification system that stacks little popups to the user notifying them when they have ran/undone a command etc.

If you are interested let me know, if not no worries!

@thomlucc thomlucc modified the milestones: 7.0, Future Sep 12, 2023
@borismoyosa
Copy link

Hi, I'm curious if there are any updates on this feature? It would really improve the ux of the editor :)

@RaananW
Copy link
Member

RaananW commented Oct 18, 2023

This is still on our agenda. It is simply not that trivial with our current architecture. If we want to deliver something, we want to deliver it the best we can.
We have no timeline on this, sadly.

@borismoyosa
Copy link

I understand, thanks for the reply!

@thomlucc thomlucc modified the milestones: Future, 8.0 Mar 12, 2024
@Jeggery
Copy link

Jeggery commented Mar 21, 2024

https://github.com/Pryme8/Doomish/blob/main/src/Editor/Commands/Command.ts

The link you provided cannot be opened, I would like to refer to it

@dennemark
Copy link
Contributor

Since NME etc. are mainly based on JSON it might be very simple to use immer and Json patches?
Immer can generate changes and inverseChanges

Immer however produces immutable data structures. And every change on the json would need to be wrapped by immer then. But it is pretty convenient.

Copy link

github-actions bot commented May 9, 2024

This issue has been automatically staled because it has been inactive for more than 14 days. Please update to "unstale".

@github-actions github-actions bot added the stale label May 9, 2024
@thomlucc thomlucc modified the milestones: 8.0, Future Aug 13, 2024
@Jeggery
Copy link

Jeggery commented Sep 6, 2024

Are you making progress

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

No branches or pull requests

7 participants