Sugar Labs

Music Blocks Refactoring: Convert block generation to use inheriting of a block base class

In an effort to make the code base easier to read and maintain, we are migrating the block generation process to be class-based. Steps:

  • Convert blocks from basicblocks.js to BlockBase-inheriting classes. See https://github.com/sugarlabs/musicblocks/pull/1994 for details on that process.
  • Convert formatting from protoblocks.js, per block, to this.formBlock. Again, see #1994 for additional details.
  • Produce an abstracted interface for the wheelnav
  • Implement this API in place of existing wheelnav code in all places relevant
  • Assess the blockfactory. The current block formatting API acts as a crutch between the blockfactory and an abstracted interface. It may be possible to merge the two by rewriting parts of the factory.
  • Assess palette.js in depth. How much of the code here can instead be offloaded into BlockBase, and how much can be further abstracted into additional palette-related classes?

Task tags

  • javascript

Students who completed this task

Bottersnike

Task type

  • code Code
close

2019