Skip to content

Clean up Blockly BlockChange Events #5397

@BeksOmega

Description

@BeksOmega

Is your feature request related to a problem? Please describe.

Similar to #4203

The BlockChange event type covers lots of different kinds of changes, when ideally it would be split up into more even types. Encapsulating them in a single type causes problems with:

Describe the solution you'd like

Split the BlockChange event into different events.

Current setup:

element old value new value field
field any any string
comment string string null
collapsed boolean boolean null
disabled boolean boolean null
inline boolean boolean null
mutation string string null

Suggested classes:

class properties
BlockFieldChange oldValue, newValue, fieldName
BlockCommentChange oldComment, newComment
BlockCollapsedChange isCollapsed
BlockDisabledChange isDisabled
BlockInlinedChange isInline
BlockMutationChange oldMutation, newMutation, isXml

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions