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

Issues with test blocks in field plugins #2356

Closed
1 task done
rachel-fenichel opened this issue May 15, 2024 · 0 comments
Closed
1 task done

Issues with test blocks in field plugins #2356

rachel-fenichel opened this issue May 15, 2024 · 0 comments
Assignees
Labels
type: bug Something isn't working

Comments

@rachel-fenichel
Copy link
Collaborator

Check for duplicates

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

Component

Bitmap: “TypeError: Invalid block definition for type: 1test_field_bitmap_single”
Colour-hsv-slider: “TypeError: Invalid block definition for type: 1test_field_colour_hsv_sliders_single”
Date: “ TypeError: Invalid block definition for type: 1test_field_date_single”
Slider: “TypeError: Invalid block definition for type: 1test_field_slider_single”
Angle: “TypeError: Invalid block definition for type: 1test_field_angle_single”
Grid dropdown: “TypeError: Invalid block definition for type: 1test_field_grid_dropdown_single”

Description

The field plugins call generateFieldTestBlocks to define blocks and a toolbox with the field under test on multiple blocks.

generateFieldTestBlocks avoids code duplication but also adds a level of indirection that makes it hard to debug the plugins. It generates XML instead of JSON for the block definition.

generateFieldTestBlocks currently adds the blocks to the wrong Blockly.Blocks object, probably due to the dual package hazard. Given the other issues with it, we're choosing to remove its uses in favor of explicitly defined test blocks.

Reproduction steps

Open the test page for each plugin. Note that no Blockly workspace shows up, and there are errors in the console.

Stack trace

No response

Screenshots

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants