blockly-samples icon indicating copy to clipboard operation
blockly-samples copied to clipboard

toolboxCategories has two lists_creates_with blocks with the same itemCount

Open rpbourret opened this issue 1 month ago • 0 comments

Check for duplicates

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

Component

No response

Description

Commit c524d26 converted toolboxCategories.js from XML to JSON.

The commit accidentally dropped the items="0" mutation state from the first lists_create_with block. As a result, the Lists category has two lists_create_with blocks with 3 inputs, instead of one with 0 inputs and one with 3 inputs.

To fix, change the first lists_create_with block in the Lists category (line 624) from:

        {
          type: 'lists_create_with',
          kind: 'block',
        },

to:

        {
          type: 'lists_create_with',
          kind: 'block',
          extraState: {
            itemCount: 0,
          },
        },

Reproduction steps

  1. Open the Lists category in the Advanced Playground.

Stack trace


Screenshots

No response

rpbourret avatar Nov 25 '25 19:11 rpbourret