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

✨Enable cut, copy and paste node #105

Merged
merged 6 commits into from
Feb 22, 2022
Merged

✨Enable cut, copy and paste node #105

merged 6 commits into from
Feb 22, 2022

Conversation

AdrySky
Copy link
Contributor

@AdrySky AdrySky commented Feb 17, 2022

Description

This will allow to cut, copy and paste any node via context menu or shortcuts.

For shortcut(Windows),

  1. Cut: Ctrl + x
  2. Copy: Ctrl + c
  3. Paste: Ctrl + v

Pull Request Type

  • Xircuits Core (Jupyterlab Related changes)
  • Xircuits Canvas (Custom RD Related changes)
  • Xircuits Component Library
  • Documentation
  • Others (Please Specify)

Type of Change

  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Tests

  1. Try each function via context menu.
  2. Try each function via shortcut keys.

Tested on?

  • Windows
  • Linux Ubuntu
  • Centos
  • Mac
  • Others (State here -> xxx )

@AdrySky AdrySky added the enhancement New feature or request label Feb 17, 2022
@AdrySky AdrySky requested a review from MFA-X-AI February 17, 2022 08:37
@AdrySky AdrySky self-assigned this Feb 17, 2022
@AdrySky AdrySky changed the title Enable cut, copy and paste node ✨Enable cut, copy and paste node Feb 17, 2022
Copy link
Member

@MFA-X-AI MFA-X-AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the pull request!

We can do copy paste stuff now, nice. Definitely a core feature for any canvas editor. I've also noted that you've refactored the custom actions. Very nice!

I've noted the following behaviors:

Bugs:

  1. Copy cut pasting 2 nodes linked together would copy 2 nodes unlinked and 1 empty node at coordinate (0,0)

  2. The copy cut paste command works across different .xircuits using the context menu, but is buggy when transferring via ctrl + c -> ctrl +v. After closing the other xircuits the issue still persists, so might want to disable this feature in the meantime.

Would be nice to have in future pull requests:

  1. When pasting using context, paste at mouse location rather than at the original node position.

That's all for now. Ideally bug 1 should be fixed before merging since users will most probably try it out, and bug 2 can be easily commented out for now since cross xircuits bugs are troublesome.

@AdrySky
Copy link
Contributor Author

AdrySky commented Feb 22, 2022

Thanks for the review and comment. Finally solved the first bugs which took longer than expected. I agree with you regarding the second bugs as I commented out the command. I tried to solve it but haven't figure it out yet. Will add in the Wishlist.

Also, fixed the name when creating xircuits file via launcher and context menu.

Copy link
Member

@MFA-X-AI MFA-X-AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and feels less buggy! Noted the future feature request log, so let's merge this.

@MFA-X-AI MFA-X-AI merged commit 648c480 into master Feb 22, 2022
@MFA-X-AI MFA-X-AI deleted the adry/cut-copy-paste branch February 22, 2022 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants