ControlCore-Project / concore-editor

The concore Editor
http://controlcore-project.github.io/concore-editor
BSD 3-Clause "New" or "Revised" License
9 stars 19 forks source link

issue #153 resolved #154

Closed Rahuljagwani closed 1 year ago

Rahuljagwani commented 1 year ago

To avoid any conflicts and overlapping, a new button "Reset" is added. Test can be performed here: https://rahuljagwani.github.io/concore-editor/

Rahuljagwani commented 1 year ago

@pradeeban this can be reviewed.

pradeeban commented 1 year ago

I have merged. Thanks, @Rahuljagwani.

Can you tell me your intentions for this new button besides "Resetting" the "Empty" action? (also include that in your project proposal).

Rahuljagwani commented 1 year ago

I have merged. Thanks, @Rahuljagwani.

Can you tell me your intentions for this new button besides "Resetting" the "Empty" action? (also include that in your project proposal).

Basically, "Reset" contains code of rebuilding the graph from start after the workspace is emptied using "Empty" action and also disables "Undo" and "Redo" when workspace is empty. The other approach to solve this issue was to change the "Undo'' action's code and rebuild the graph. But complexities were arising as user may use "Undo" and "Redo" actions after restoring the graph (after emptying it with "Empty" action). Therefore, new button "Reset" just executes the code to restore a particular graph completely and user can even perform "Redo" and "Undo" actions after restoring it. Also there might be some issues arising with this new button but, I will fix them in coming days.

pradeeban commented 1 year ago

Got it. We may need a different icon for the "Reset" button to distinguish it from the Undo. Perhaps, a double-pointed arrow instead of a single (as in Undo and Redo).

Rahuljagwani commented 1 year ago

Got it. We may need a different icon for the "Reset" button to distinguish it from the Undo. Perhaps, a double-pointed arrow instead of a single (as in Undo and Redo).

Sure I will be sending a PR changing its icon and solving some issues related with it.

parteekcoder commented 1 year ago

Nice @Rahuljagwani, does this button restores the last empty graph, or does it also depend on the workspace currently opened?

Also, I think the reset name is quite confusing I think it should be restore instead, what do you think @pradeeban

Rahuljagwani commented 1 year ago

Nice @Rahuljagwani, does this button restores the last empty graph, or does it also depend on the workspace currently opened?

Also, I think the reset name is quite confusing I think it should be restore instead, what do you think @pradeeban

Hi @parteekcoder No currently this button does not depend on workspace due to which a lot of possible bugs are there related to it which we can find and solve together. Yes, the name of button can be changed which is trivial but good suggestion. May be @pradeeban can give more appropriate suggestions regarding this.

pradeeban commented 1 year ago

"Restore" is a better name. Good suggestion. Please change the label, @Rahuljagwani.