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

Add 'Redo (un-undo)' function #2221

Merged
merged 8 commits into from Aug 12, 2019
Merged

Conversation

k-toumura
Copy link
Contributor

@k-toumura k-toumura commented Jun 23, 2019

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Proposed changes

This PR adds a 'redo' function to the Node-RED flow editor.
By this function, developers can cancel an undo operation.

Keyboard shortcut of redo is assigned to 'Ctrl-Shift-Z'.

To discuss implementation details, I opened this PR as a draft at first.

Checklist

  • I have read the contribution guidelines
  • For non-bugfix PRs, I have discussed this change on the mailing list/slack team.
  • I have run grunt to verify the unit tests pass
  • I have added suitable unit tests to cover the new/changed functionality

@coveralls
Copy link

coveralls commented Jun 23, 2019

Coverage Status

Coverage remained the same at 77.535% when pulling b749a27 on node-red-hitachi:dev-redo into a376d6e on node-red:dev.

@k-toumura
Copy link
Contributor Author

Fixed minor bug and tested handling of each history event, so I publish this PR for review.

@k-toumura k-toumura marked this pull request as ready for review July 18, 2019 00:13
@k-toumura k-toumura changed the title [Draft] Add 'Redo (un-undo)' function Add 'Redo (un-undo)' function Jul 18, 2019
@k-toumura
Copy link
Contributor Author

Keyboard shortcut of redo is assigned to 'Ctrl-Shift-Z'.

I assigned this shortcut based on Apple's Human Interface Guideline, and Ubuntu's manual.
On the other hand, Microsoft's guideline suggests to use 'Ctrl-Y' for redo function.

Which keyboard shortcut is better for redo function?

We could assign both of shortcuts for redo (add each definitions in keymap.json), but this is somewhat confusing.

@k-toumura
Copy link
Contributor Author

Which keyboard shortcut is better for redo function?

In Chrome and Safari on macOS, ctrl-y is already assigned to 'show all history'.
This assignment can be overridden in workspace, but it can't in node editor tray (It is not clear why it can't...).

@knolleary knolleary merged commit b749a27 into node-red:dev Aug 12, 2019
@knolleary
Copy link
Member

After you opened this, an issue was spotted and fixed in the code to undo 'creating subflow from selection'. The same fix was needed into the inverse event you had introduced - which I have applied here: c8acc6a

Thanks!

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.

None yet

3 participants