Closed oliviertassinari closed 1 year ago
To get some idea on how Undo and Redo should work in different scenarios: https://github.com/appsmithorg/appsmith/issues/1426#issuecomment-810842190
First prerequisite for undo/redo: https://github.com/mui/mui-toolpad/issues/845
As a follow up to https://github.com/mui/mui-toolpad/pull/1225 we should make following UX improvement:
High level pseudo-code proposal:
function getViewForDom(dom: AppDom): ToolpadView
function isSameView(view1: ToolpadView, view2: ToolpadView): boolean
function navigateToView(ToolpadView): void
High level pseudo-code proposal:
Maybe focusOnView
instead of navigateToView
? Other than that sounds good if we need this type of solution.
This was just some pseudo-code to illustrate an idea, I didn't intend for this to be used as a starting point or anything.
https://user-images.githubusercontent.com/3165635/201174983-5b2f95b7-0a90-4d9e-a1af-2afeef9a8855.mov
When I press Cmd+Z key, it undo 2 actions, not one. In the same way, when I press the shortcut to redo my change after the undo, it doesn't work. It seems that undo/redo is strongly tight to what is committed on the backend. I think that it would be great to decorrelate the two notions. Fixed in #1328
Or Figma, even better:
The undo / redo has a bug
@oliviertassinari thanks, that's a great catch. I already found the cause - it happens because throttled undo stack update is triggered after we undo action which messes up the state. I have one working solution to the issue that makes situation way better, but not perfect yet, I should post an update soon
I don't think that the undo/redo button will ever be used more than 5% of the time, I think that it could be hidden from the interface, into a submenu like notion has
I do agree, I could just remove the buttons. @gerdadesign any issues from your end if we remove the buttons? Maybe you could share what was the motivation of having them designed in the UI? Maybe we are missing some important details?
[ ] I could find a strange behavior: when doing an undo or a redo, the sync state doesn't show correctly: It keeps saying "All changes saved". I don't know when my change is actually saved. So I don't know if I can leave the page or not.
I do agree, I could just remove the buttons. @gerdadesign any issues from your end if we remove the buttons? Maybe you could share what was the motivation of having them designed in the UI? Maybe we are missing some important details?
This seems fine. For context:
?
to access the keyboard shorts list). They also show feedback for the action in the form of a small temporary banner. So, especially for a tech-fluent audience, I think that keyboard shortcut would suffice. This would probably require adding Keyboard shortcuts to the Help menu:
and then from there, showing the list of available keyboard shortcuts
I'm removing undo/redo buttons as part of https://github.com/mui/mui-toolpad/pull/1308 👍
This has been implemented
The very first frustration I had using the tool today is not being able to undo a change. I have tried a change that didn't work, now, I'm not sure how to get back to the previous state that was better. It doesn't incentive me to experiment.
To do:
How do other tools push to history when typing text?