Giter Site home page Giter Site logo

code-dot-org / blockly Goto Github PK

View Code? Open in Web Editor NEW
60.0 60.0 26.0 24.48 MB

Blockly (Code Studio fork)

Home Page: https://code-dot-org.github.io/blockly/tests/playground.html

License: Apache License 2.0

Python 1.03% HTML 0.77% JavaScript 98.14% Shell 0.05% Perl 0.01%

blockly's Introduction

Code.org

Welcome! You've found the source code for the Code.org website and the Code Studio platform. Code.org is a non-profit dedicated to expanding access to computer science education. You can read more about our efforts at code.org/about.

Quick start

  1. Follow our setup guide to configure your workstation.
  2. rake build to build the application if you have not done so already
  3. bin/dashboard-server to launch the development server.
  4. Open your browser to http://localhost-studio.code.org:3000/.

To see a list of all build commands, run rake from the repository root.

How to help

Wondering where to start? See our contribution guidelines.

What's in this repo?

Here's a quick overview of the major landmarks:

Documentation

The server for our Code Studio learning platform, a Ruby on Rails application responsible for:

  • Our courses, tutorials, and puzzle configurations
  • User accounts
  • Student progress and projects
  • The "levelbuilder" content creation tools

The server for the Code.org website, a Sinatra application responsible for:

The JavaScript 'engine' for all of our tutorials, puzzle types and online tools. It gets built into a static package that we serve through dashboard. Though there are currently some exceptions, the goal is that all JS code ultimately lives here, so that it gets the benefit of linting/JSX/ES6/etc. Start here if you are looking for:

Everything else

  • aws: Configuration and scripts that manage our deployments.
  • bin: Developer utilities.
  • cookbooks: Configuration management through Chef.
  • shared: Source and assets used by many parts of our application.
  • tools: Git commit hooks.

blockly's People

Contributors

ajpal avatar balderdash avatar bcjordan avatar bethanyaconnor avatar bjvanminnen avatar breville avatar caleybrock avatar cpirich avatar davidsbailey avatar deploy-code-org avatar dju90 avatar ebeastlake avatar erin007 avatar geoffrey-elliott avatar hamms avatar islemaster avatar jilliank avatar jmkulwik avatar joshlory avatar laurelfan avatar levadadenys avatar marcd123 avatar mgc1194 avatar mikeharv avatar nkiruka avatar phantommike avatar sureshc avatar tanyaparker avatar tim-dot-org avatar wjordan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

blockly's Issues

Generator tests are never run

AFAICT, we were never able to run the tests under tests/generators/ from the command line. In upstream blockly, the tests are run by opening up tests/generators/index.html in Firefox/Safari (security restrictions prevent them from working in Chrome) and clicking a button.

That page has been completely broken since my compilation changes in #135, but it was mostly broken ever since we spun out the separate blockly repo (it throws javascript errors attempting to load blocks, before even trying to run the tests).

Scrollable dropdowns not discoverable

When there is a dropdown with a lot of options on a block, it isn't apparent that you can scroll and see more options. One example of this is from the Minecraft: Hero's Journey activity.

screen shot 2018-09-14 at 3 21 40 pm

Some possible solutions:

  • Make the scrollbar always visible, so it's clear to the user that it is scrollable.
  • Show a small arrow at the bottom (this would especially be helpful for touch users).
  • Make the last viewable item on the list only half shown so it's clear that there are more options.

Separately, it might also be helpful if the dropdown menu took up more space (height) on the screen to reduce times when the user would have to scroll.

Roll custom RTL positioning code into this repo

https://github.com/code-dot-org/code-dot-org/blob/8ec4f3aafe97968dd18f8f318bb15a6c6b50a422/apps/src/StudioApp.js#L1183-L1192

    // Keep blocks static relative to the right edge in RTL mode
    if (this.isUsingBlockly() && Blockly.RTL) {
      if (this.lastWorkspaceWidth && (this.lastWorkspaceWidth !== workspaceWidth)) {
        var blockOffset = workspaceWidth - this.lastWorkspaceWidth;
        Blockly.mainBlockSpace.getTopBlocks().forEach(function (topBlock) {
          topBlock.moveBy(blockOffset, 0);
        });
      }
    }
    this.lastWorkspaceWidth = workspaceWidth;

Block copy/paste maintains absolute position

When pasting in a copied block it goes to the absolute position from which it was copied. This results in a few confusing behaviors, including:

  • Copy/pasting a block attached to an event shifts the whole event block stack instead of shifting the pasted block
  • Copying from the top (or another page) and scrolling down lower to paste appears to not work because the block gets pasted outside of the canvas view

How to add python code generator support?

I found that the code of google's blockly is not applicable, example:

Blockly.Python.init = function(workspace) {
  /**
   * Empty loops or conditionals are not allowed in Python.
   */
  Blockly.Python.PASS = this.INDENT + 'pass\n';
  // Create a dictionary of definitions to be printed before the code.
  Blockly.Python.definitions_ = Object.create(null);
  // Create a dictionary mapping desired function names in definitions_
  // to actual function names (to avoid collisions with user functions).
  Blockly.Python.functionNames_ = Object.create(null);

  if (!Blockly.Python.variableDB_) {
    Blockly.Python.variableDB_ =
        new Blockly.Names(Blockly.Python.RESERVED_WORDS_);
  } else {
    Blockly.Python.variableDB_.reset();
  }

  Blockly.Python.variableDB_.setVariableMap(workspace.getVariableMap());

  var defvars = [];
  // Add developer variables (not created or named by the user).
  var devVarList = Blockly.Variables.allDeveloperVariables(workspace);
  for (var i = 0; i < devVarList.length; i++) {
    defvars.push(Blockly.Python.variableDB_.getName(devVarList[i],
        Blockly.Names.DEVELOPER_VARIABLE_TYPE) + ' = None');
  }

  // Add user variables, but only ones that are being used.
  var variables = Blockly.Variables.allUsedVarModels(workspace);
  for (var i = 0; i < variables.length; i++) {
    defvars.push(Blockly.Python.variableDB_.getName(variables[i].getId(),
        Blockly.VARIABLE_CATEGORY_NAME) + ' = None');
  }

  Blockly.Python.definitions_['variables'] = defvars.join('\n');
};

Translations of core.json really outdated (e.g. german de_DE)

Hi there,
please point me to the right place, if this isn't appropriate:
I wanted to help with code.org translations, but then noticed, that even the most aggressive translation mistakes, were already corrected up to five years ago in crowdin, though not approved in crowdin.

What can I do help get the blockly/core.json file updated or incorrect translations unapproved in crowdin?

I'd love to contribute by translating code.org blockly core or materials into german, but it doesn't seem worthwhile if files are not updated. Would it be easier if I generate a pull request for german core.json?

Thank you.

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.