blockly-samples
blockly-samples copied to clipboard
Update dev-tools to use JSON toolbox definitions instead of xml
Category
- Plugins
Component
dev-tools
Is your feature request related to a problem? Please describe.
Many of the examples and plugins use XML toolboxes instead of the new JSON API. We should have our example code use the new APIs to best model what other developers can do with Blockly.
Describe the solution you'd like
Update the code in blockly-samples to use the JSON toolbox API.
Additional context
To work on this issue, first read the background information about how to contribute to samples and verify your changes.
- Learn about defining a toolbox and read about the XML format vs the JSON format.
- In blockly-samples, navigate to the dev-tools plugin's directory and run
npm run startto start the playground. Look at the toolbox and what blocks are available. - Write a new copy of the toolbox definition in the JSON format instead of the XML format. The toolbox definition for dev-tools can be found in toolboxCategories.js and toolboxSimple.js.
- Refresh the playground page and make sure the toolbox looks the same as it did before. You can compare against the version in master on the samples site to make sure the behavior hasn't changed.
- Follow the rest of the instructions in the Contributing docs to verify your change and open a PR.