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

Shadow blocks custom context menu #8615

Open
1 task done
FranciscoCaetano88 opened this issue Oct 9, 2024 · 0 comments
Open
1 task done

Shadow blocks custom context menu #8615

FranciscoCaetano88 opened this issue Oct 9, 2024 · 0 comments
Labels
issue: feature request Describes a new feature and why it should be added issue: triage Issues awaiting triage by a Blockly team member

Comments

@FranciscoCaetano88
Copy link

Check for duplicates

  • I have searched for similar issues before opening a new one.

Problem

I'm working on creating a function block using the new version of Blockly, where users can dynamically add or remove multiple arguments that themselves are shadow blocks. Most blocks shouldn't be able to connect to this inputs but there are a few exceptions. I've also implemented a custom dragging strategy that allows new argument blocks to be created by dragging this shadow argument blocks.

Now, I wanted to enhance the shadow blocks by adding a context menu that allows users to edit or remove the selected block. However this is not possible due to a rule in the gesture class that makes the target of every shadow block its parent. I experimented with making the argument blocks non-movable instead of using shadow blocks, but this approach didn’t work with the dragging strategy.

Request

I would like to be able to add a custom context menu to shadow blocks.

Alternatives considered

No response

Additional context

No response

@FranciscoCaetano88 FranciscoCaetano88 added issue: feature request Describes a new feature and why it should be added issue: triage Issues awaiting triage by a Blockly team member labels Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue: feature request Describes a new feature and why it should be added issue: triage Issues awaiting triage by a Blockly team member
Projects
None yet
Development

No branches or pull requests

1 participant