Skip to content

Create API to restrict a block to be nested inside another. #5737

@NeilFraser

Description

@NeilFraser

The break/continue block disables itself unless it is inside one of the loop blocks. The if-return block disables itself unless it is inside one of the procedure definition blocks. Local variable get/set blocks might disable themselves unless they are within a scope block.

We need an API so that a block can (at minimum) specify a list of block types which they must be inside of. This is not currently possible with connection type checking.

It's also possible that the API could be waaay more flexible: allowing for direct vs nested connection checking, having a list of specific blocks rather than block types, or disabling if the block is in a named block type, and so on. But beware of adding a bunch of extra unrequested features that get used by virtually nobody and that constantly break.

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue: feature requestDescribes a new feature and why it should be added

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions