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 context menu #99

Merged
merged 12 commits into from
Feb 14, 2022
Merged

✨Add context menu #99

merged 12 commits into from
Feb 14, 2022

Conversation

AdrySky
Copy link
Contributor

@AdrySky AdrySky commented Feb 10, 2022

Description

This added a context menu for xircuits by right-clicking it.

Currently, the context menu have 6 options which are:

  1. Edit
  2. Delete
  3. Save
  4. Run Xircuits
  5. Create New Xircuits
  6. Open Xircuits Log Console

For Edit & Delete, it's only enable when right-clicking a node. However, Edit only works for Literal Node.

Also, fix literal node editing when cancel is pressed or no input provided.

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. Do test the 6 options in the context menu. All of these options are explanatory by their given name except for 1) & 2)
    1. Edit: Enable to edit Literal Value
    2. Delete: Enable to delete any node
  2. Do check the previous function for edit and delete still works
    1. Edit: Double clicking Literal Node
    2. Delete: Press 'Delete' or 'backspace' keys on any node
  3. While editing, either provide an empty string, press cancel or ok
    1. It shouldn't do anything.

Tested on?

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

Notes

The Shift+Right Click for Browser Menu can't be removed as it's hardcoded in JupyterLab itself.

@AdrySky AdrySky added the enhancement New feature or request label Feb 10, 2022
@AdrySky AdrySky requested a review from MFA-X-AI February 10, 2022 07:16
@AdrySky AdrySky self-assigned this Feb 10, 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.

Sorry for the delay, I thought the open component function was broken again just to realize this pull request was made before it. After rebasing I confirmed that it's all good.
Really good groundwork for right click menu, didn't find any bugs.

Also appreciated the fix to the double click component, feels much easier to use now. :D

@MFA-X-AI MFA-X-AI merged commit a746884 into master Feb 14, 2022
@MFA-X-AI MFA-X-AI deleted the adry/context-menu branch February 14, 2022 08:11
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