code-dot-org/blockly — pull request #664 by cpirich (2014-06-11 23:26:47+00:00)
Title: [finishes #70102748]: improve feedback blocks

4 issues here (#3 requires a little review):

(1) the requiredBlocks for studio didn't specify title params that matched the toolbox title params. fixed in levels.js
(2) the IFRAME in the feedback dialog was not wide enough to show some of the new blocks. changed the stylesheet to widen this to 400px (it was 300px by default)
(3) the blocks for Studio are different based on some per-level settings (notably the number of sprites in the map). the feedback "readonly" codepath never gives the app a chance to initialize, so these per-level settings don't impact the blocks that appear in the feedback dialog. I fixed this by adding the ability for the app to implement an initReadonly() method - if it does, the appMain code will call that function instead of BlocklyApps.initReadonly. The app version of that function is expected to call BlocklyApps.initReadonly() (similar to how init() is handled). I use this now in Studio and re-arranged the init() code slightly so that a subset of it can be called in initReadonly()
(4) unrelated to above, but the startBlocks vertical spacing needed to be adjusted after Brian made some of the K-1 blocks taller. Fixed in levels.js