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

Context menu, delete, duplicate, and pin function #293

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

DoomTas3r
Copy link
Contributor

@DoomTas3r DoomTas3r commented Oct 25, 2024

Adds a context menu with 4 functions: duplicate, summary, pin, and delete

Adds a duplicate function with ctrl + d as a shortcut as suggested by #201 (comment) and #267 (comment). The offset is 100 pixels right, 50 pixels down. The snapped blocks and parameter values are also duplicated

The summary shows the tooltip of the block, intended to be replaced by a more detailed overview like #291 (comment)

Adds a pin function with ctrl + p as a shortcut. Pinned blocks can't be dragged. Snapped blocks can pin with their parent block. This feature doesn't need to be added because the undo feature can undo the effects of accidental drags or deletes, so this is just for convenience

_confirm_delete is its own function

Functions that check snapped blocks only check Container nodes because only they have SnapPoint nodes

When the drag drop area receives a right click, a new popup menu determines which function is called from the parent block
image
image

@manuq
Copy link
Contributor

manuq commented Oct 26, 2024

@DoomTas3r thanks! There is a bounty for the duplicate functionality. Please follow the steps in #201 (comment) if you would like to attempt it.

@DoomTas3r
Copy link
Contributor Author

Thanks, but I will not accept or claim the bounty

@manuq
Copy link
Contributor

manuq commented Oct 28, 2024

@DoomTas3r I see that you are trying to add pin functionality to this PR as well, which was never discussed. My suggestion is to try contributing smaller chunks, because they are more likely to be merged. For example I would start with a context menu and just the current Delete functionality that is already there (as Del key shortcut).

@DoomTas3r DoomTas3r changed the title WIP: Context menu, delete, duplicate, and pin function Context menu, delete, duplicate, and pin function Oct 30, 2024
@DoomTas3r DoomTas3r marked this pull request as ready for review October 30, 2024 17:44
@DoomTas3r DoomTas3r force-pushed the context-menu branch 3 times, most recently from 4225006 to a5249a0 Compare November 1, 2024 02:22
Adds a context menu with duplicate, summary, pin, and delete functions with shortcuts ctrl + d to duplicate, ctrl + p to pin. Duplicate and pin affects snapped blocks. Context menu displays when drag drop area receives a right click
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.

2 participants