Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

First Action cannot be undone #555

Closed
tilmx opened this issue Jun 12, 2018 · 7 comments
Closed

First Action cannot be undone #555

tilmx opened this issue Jun 12, 2018 · 7 comments

Comments

@tilmx
Copy link
Member

tilmx commented Jun 12, 2018

Issue assigned to @barinali

Describe the bug
The first action after opening or creating a project cannot be undone.

To Reproduce
Steps to reproduce the behavior:

  1. Open or create a new project
  2. Do something (e.g. add a new element to the element list)
  3. Try Cmd+Z

Expected behavior
The first action should be undo-able, as well.

@barinali
Copy link
Contributor

Hey @tilmx,

Sorry that I couldn't come back with a solution yet because of lacking time. But I have an intention to fix this since I somehow caused that. Is it possible to assign this issue to me?

@tilmx
Copy link
Member Author

tilmx commented Jun 12, 2018

Hey @barinali
yes, of course! I’ll assign it to you. Let us know if you need anything!
And thanks for contributing!

@barinali
Copy link
Contributor

I have opened a pull request for this, #556.

While working with the history, I noticed that we can apply 'undo' command to go back from "Pages" view to "PageDetail" view and vice versa. 🤔 I do not think that should be possible. So I would suggest removing store.commit() from ViewStore.setActiveAppView. Also, if we do that, this will require us to manage separate histories for each AlvaView. Because while being on "Pages", we shouldn't be able to undo/redo actions for "PageDetail" view (like undo-ing adding a component) and so on.

Therefore, I guess file history management/actions (undo, redo) need some work.

@tilmx
Copy link
Member Author

tilmx commented Jun 12, 2018

Hey @barinali
Sounds good, thank you very much! Your note makes totally sense, we are currently in the process of bringing the page view into the page detail view (#554) – to avoid problems as you noticed and to speed up page switching.

@tilmx
Copy link
Member Author

tilmx commented Jun 12, 2018

Closed with #556

@tilmx tilmx closed this as completed Jun 12, 2018
@marionebl
Copy link
Contributor

marionebl commented Jun 12, 2018

Closed via landing #556, thanks @barinali!

While working with the history, I noticed that we can apply 'undo' command to go back from "Pages" view to "PageDetail" view and vice versa. 🤔

Impressive you catched the quirkiness of the undo/redo system on the first try! We went back and forth about the undo/redo feature internally. @tilmx decided on a flow where every undo/redo is executable regardless of current view but the app shows the relevant view when performing the operation.

--

@tilmx Beat me to it. The quirks will be gone when there is only one view via #554

@barinali
Copy link
Contributor

@tilmx @marionebl you are welcome! I am happy to help as long as I can.

I can't wait to see #554 in! 👍

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

No branches or pull requests

3 participants