TidyBlocks: Contributing

Contributions of all kinds are welcome. By offering a contribution, you agree to abide by our Code of Conduct and that your work may be made available under the terms of our license.

Who Can Help and How

Asha is a high school mathematics teacher whose students are using TidyBlocks to do their homework. She can help by filing bug reports and feature suggestions, and by providing questions and solutions for our gallery of examples.

Lupita is using TidyBlocks to learn basic data science. She can help by translating blocks and block descriptions into Bantu to make TidyBlocks more accessible to her fellow students.

Raniere is a data scientist who uses R and Python in his work. He can help by creating code generators for those languages and by extending our visualization toolkit.

Yatindra is a web programmer who is fluent in JavaScript. They can help by bringing our code and tooling into line with modern standards and by adding features to make TidyBlocks easier to use.

What Goes Where

  1. To report a bug or request a new feature, please check the list of open issues to see if it's already there, and if not, file as complete a description as you can.

  2. If you have made a fix or improvement, please create a pull request; we review these as quickly as we can. If you are tackling an issue that has already been opened, please name your branch number-some-description (e.g., 20-highlighting-active-block) and put Closes #N (e.g., Closes #20) on a line by itself at the end of the pull request's long description.

  3. All contributors will be added to the authors list, and if you become a regular contributor we will invite you to join our Slack channel.

Getting Started

  1. Fork https://github.com/tidyblocks/tidyblocks/ and clone it to your desktop.

  2. Go into the newly-created tidyblocks directory and run npm run install to install all of the packages we depend on.

  3. Run npm run test to re-run the unit tests in the tests/ directory to make sure everything is working.

  4. Run npm run build to rebuild the JavaScript, and then npm run serve to run a local server to try it out. (Point your browser at http://localhost:8080.)



Blocks are defined in JavaScript files located in ./blocks/*.js. Each file starts with a lookup table called MESSAGES that has one entry for each block with one sub-entry for each translatable fragment of text in that block. Messages are looked up using two-letter language codes, such as pt for Portuguese and ar for Arabic. To translate a block's messages:

  1. Run TidyBlocks in a language that already has a translation and look at what text appears where in that block.

  2. Look at the translation strings for the block in that language.

  3. Add the translation string for the target language.

  4. When you are done, create a pull request that includes the translations for review.

If you are the first person to do translations in some language, please also add a line to ./index.html to link to the main page for that language.



TidyBlocks uses Blockly for the workspace, React for the user interface, and Jekyll + GitHub Pages for the website as a whole.

Other Files