You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, I noticed while making the plugin that when editing a boolean field, the resulting block change event is assigned an empty string as the group name. This makes it impossible to group new events with this block change event (unless you retroactively overwrite the event's group name in the change listener).
In fact, I'm not sure why it would ever be desirable to have an ungroupable event. Why prevent grouping new events with an old event? Maybe every event should have a group name, even if only one event is in the group. I believe the same situation applies to dropdown fields too, and maybe other kinds of edit events.
Drag the controls_if block with shadowed children into the workspace, and edit one of the boolean fields on a shadowed block. The block will be automatically converted to a real block.
Try undoing the events. The block shadow change events will not be grouped with the boolean field change events. However, if you try this again with a different field type, the events will be properly grouped.
Expected behavior
Events created in response to boolean field change events should be able to be grouped with them.
The text was updated successfully, but these errors were encountered:
Describe the bug
It is not unusual for change listeners to attempt to create new events that are grouped with the event they are responding to. CONTROL_FLOW_IN_LOOP_CHECK_MIXIN.onChange does this, for example, and so does the shadow-block-converter plugin in: https://github.com/google/blockly-samples/blob/master/plugins/shadow-block-converter/src/shadow_block_converter.ts
However, I noticed while making the plugin that when editing a boolean field, the resulting block change event is assigned an empty string as the group name. This makes it impossible to group new events with this block change event (unless you retroactively overwrite the event's group name in the change listener).
In fact, I'm not sure why it would ever be desirable to have an ungroupable event. Why prevent grouping new events with an old event? Maybe every event should have a group name, even if only one event is in the group. I believe the same situation applies to dropdown fields too, and maybe other kinds of edit events.
To Reproduce
Navigate to: https://google.github.io/blockly-samples/plugins/shadow-block-converter/test/
Drag the
controls_if
block with shadowed children into the workspace, and edit one of the boolean fields on a shadowed block. The block will be automatically converted to a real block.Try undoing the events. The block shadow change events will not be grouped with the boolean field change events. However, if you try this again with a different field type, the events will be properly grouped.
Expected behavior
Events created in response to boolean field change events should be able to be grouped with them.
The text was updated successfully, but these errors were encountered: