Giter Club home page Giter Club logo

blockly's Introduction

Blockly

Google's Blockly is a web-based, visual programming editor. Users can drag blocks together to build programs. All code is free and open source.

The project page is https://developers.google.com/blockly/

You use this git repo to build the msg directory and the blockly-compressed.js for the Open-Roberta lab.

Build the Resources for the Open-Roberta Lab

On linux systems one possibility is

  • you have the closure-library next to this project (you need version 20200719.0.0) make sure to remove the version number from the folder name. buily.py requires the closure-library folder to be named closure-library
  • you have installed the closure compiler via npm:
    • e.g. npm install --save google-closure-compiler@20200719
    • check the version: npx google-closure-compiler --version => v20200719
  • you have installed python 2.7 (:-<)
  • run the build.py script

A second solution is to install docker. Then run

GIT=:your-blockly-git-full-path:
docker run \
       --mount type=bind,source=$GIT,destination=/opt/blockly/blockly \
       -u $(id -u):$(id -g) \
       openroberta/blocklybuilder:22.04

You can put everything into one line, of course. The strange looking -u parameter is needed to give correct ownership and permission to the files generated if docker runs as non-root.

Workflow

  • you have cloned the blockly git https://github.com/OpenRoberta/blockly.git into :your-blockly-git:
  • you have a feature branch git checkout -b feature/myChanges
  • you edit a file in the blocks folder to add or change a blockly block and edit the file robMsg/robMessages.js to add or change a message and then re-build the resources. Use one of the possibilities described above. Never change a file in the msg folder, because these changes are overwritten by the next build.
  • check your changes in the blockly playground found in the directory tests. One of the many playgrounds will fit your need. You may copy one and modify it. If you are satisfies with your results, continue.
  • try your results in the Open-Roberta lab: copy the msg directory and the blockly-compressed.js into :your-openroberta-lab-git:/OpenrobertaServer/staticResources/blockly. If you are satisfies with your results, continue.
  • rebase your feature branch in the blockly repo against master: git fetch;git rebase master
  • merge your feature branch in the blockly repo into master: git checkout master;git merge feature/myChanges;git push
  • later delete your feature branch git branch -d feature/myChanges
  • your changes to blockly are now persisted in the blockly repo and contained in your :your-openroberta-lab-git:. You have to commit these changes in your feature branch in the openroberta repo and you'll should soon merge your changes to develop!

Note, that the blockly repo only provides a master branch. There is no high traffic and thus it ok to simplify the repo structure.

How to create the blocklybuilder image

cd z-docker
docker build -t openroberta/blocklybuilder:22.04 .

Look into the Dockerfile to see what is stored in the image

blockly's People

Contributors

allisonshaw avatar bagridag avatar bjost2s avatar boonto avatar carloslfu avatar carlosperate avatar cvejoski avatar daarond avatar dlaliberte avatar drigz avatar elhele avatar espertus avatar heini208 avatar immortalin avatar janism91 avatar kaworru avatar miguel76 avatar neilfraser avatar nihoffmann avatar nikerabbit avatar pamocurtis avatar picklesrus avatar pkendall64 avatar rachel-fenichel avatar raghuvirshirodkar avatar rbudde avatar siebrand avatar techturtle11 avatar trodi avatar vinart avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

blockly's Issues

blocks_compressed.js: that is not definied

Please re-build and merge the blocky components. The variable "that" is not defined in the compressed blocky build.
ReferenceError: that is not defined [] blocks_compressed.js:104:152 updatePorts /blockly/blocks_compressed.js:104

Thanks!

Plus/Minus mutator for variables

Hi,
First of all many thanks for your great implementation of blockly. I'm interested in having your variable handling in my application. Also, the if-then-else block with the +/- icons are much easier to use than the original.
Can anybody please give me some hints on how to implement this functionality in a "plain" google blockly setup?
I noticed it has to do something with the mutatorMinus.js and mutatorPlus.js files.
Thanks a lot for your feedbak!

blocklyaddremove

Calliope configurationblocks ultrasonic and colourtcs3472 have wrong pins

configurationbock ultrasonic for calliope

Pin is [A1, 1]
Pin should be [A1, 5]

Pic 1
Bildschirmfoto von 2021-12-18 18-42-03

configurationsblock colourtcs3472 for calliope

Pin is [A0, A0]
Pin should be [A0, 4]

Pic 2
Bildschirmfoto von 2021-12-18 18-41-30

Picture of the pin mapping for calliope

Bildschirmfoto von 2021-12-18 19-22-57

The Problem is that the pin overlap checker for calliope can't check these two blocks properly which can lead to buggy code

Add Chinese localization

Hi,

Kudos for this great project! I would like to help to make Chinese localization but I don't know where to start. Is it sufficient to create a zh-hans.json containing all the translation rules in the robMsg folder? Please let me know, thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.