Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Just being honest #20713

Merged
merged 19 commits into from
Feb 19, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 2 additions & 5 deletions apps/src/StudioApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,6 @@ StudioApp.prototype.configure = function (options) {
this.scratch = options.level && options.level.scratch;
this.usingBlockly_ = !this.editCode && !this.scratch;

// TODO (bbuchanan) : Replace this editorless-hack with setting an editor enum
// or (even better) inject an appropriate editor-adaptor.
if (options.isEditorless) {
this.editCode = false;
this.usingBlockly_ = false;
Expand Down Expand Up @@ -691,11 +689,11 @@ StudioApp.prototype.handleClearPuzzle = function (config) {
// Don't pass CRLF pairs to droplet until they fix CR handling:
resetValue = config.level.startBlocks.replace(/\r\n/g, '\n');
}
// TODO (bbuchanan): This getValue() call is a workaround for a Droplet bug,
// This getValue() call is a workaround for a Droplet bug,
// See https://github.com/droplet-editor/droplet/issues/137
// Calling getValue() updates the cached ace editor value, which can be
// out-of-date in droplet and cause an incorrect early-out.
// Remove this line once that bug is fixed and our Droplet lib is updated.
// Could remove this line once that bug is fixed and Droplet is updated.
this.editor.getValue();
this.editor.setValue(resetValue);

Expand Down Expand Up @@ -851,7 +849,6 @@ StudioApp.prototype.assetUrl_ = function (path) {
* to be played.
*/
StudioApp.prototype.reset = function (shouldPlayOpeningAnimation) {
// TODO (bbuchanan): Look for comon reset logic we can pull here
// Override in app subclass
};

Expand Down
2 changes: 0 additions & 2 deletions apps/src/appMain.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ import {addReadyListener} from './dom';
import * as blocksCommon from './blocksCommon';
import * as commonReducers from './redux/commonReducers';

// TODO (br-pair) : This is to expose methods we need in the global namespace
// for testing purpose. Would be nice to eliminate this eventually.
window.__TestInterface = {
loadBlocks: (...args) => studioApp().loadBlocks(...args),
arrangeBlockPosition: (...args) => studioApp().arrangeBlockPosition(...args),
Expand Down
6 changes: 2 additions & 4 deletions apps/src/applab/designElements/chart.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,8 @@ class ChartProperties extends React.Component {
element={this.props.element}
onDepthChange={this.props.onDepthChange}
/>
</div>);

// TODO (bbuchanan):
// chart-specific properties!
</div>
);
}
}

Expand Down
4 changes: 0 additions & 4 deletions apps/src/gamelab/AnimationPicker/animationPickerModule.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,6 @@ export function handleUploadComplete(result) {
const key = result.filename.replace(/\.png$/i, '');
const sourceUrl = animationsApi.basePath(key + '.png');

// TODO (bbuchanan): This sequencing feels backwards. Eventually, we
// ought to preview and get dimensions from the local filesystem, async
// with the upload itself, but that will mean refactoring away from the
// jQuery uploader.
loadImageMetadata(sourceUrl, metadata => {
const animation = _.assign({}, metadata, {
name: uploadFilename,
Expand Down
1 change: 0 additions & 1 deletion apps/src/gamelab/levels.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ var blockUtils = require('../block_utils');
var tb = blockUtils.createToolbox;
import { GamelabBlocks } from '@cdo/apps/gamelab/sharedGamelabBlocks';

// TODO (bbuchanan): Continue documenting the game lab level object properties.
/**
* Properties of the game lab level object
* @typedef {Object} GameLabLevel
Expand Down
1 change: 0 additions & 1 deletion apps/src/jigsaw/jigsaw.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ Jigsaw.init = function (config) {
}
Blockly.SNAP_RADIUS = level.snapRadius || 90;

// TODO (br-pair) : I think this is something that's happening in all apps?
config.loadAudio = function () {
studioApp().loadAudio(skin.winSound, 'win');
studioApp().loadAudio(skin.startSound, 'start');
Expand Down
4 changes: 0 additions & 4 deletions apps/src/lib/kits/maker/CircuitPlaygroundBoard.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ export default class CircuitPlaygroundBoard extends EventEmitter {
// Deregister Firmata sysex response handler for circuit playground commands,
// or playground-io will fail to register a new one next time we construct it
// and the old playground-io instance will get events.
// TODO (bbuchanan): Improve Firmata+Playground-io so this isn't needed
if (Firmata.SYSEX_RESPONSE) {
delete Firmata.SYSEX_RESPONSE[CP_COMMAND];
}
Expand All @@ -157,9 +156,6 @@ export default class CircuitPlaygroundBoard extends EventEmitter {
return new Promise((resolve) => {
// It can take a moment for the reset() command to reach the board, so defer
// closing the serialport for a moment.
// TODO (Brad): Make changes to Firmata so we can be notified when writes
// succeed instead of making a 50ms guess, and make this a properly async
// method.
setTimeout(() => {
// Close the serialport, cleaning it up properly so we can open it again
// on the next run.
Expand Down
1 change: 0 additions & 1 deletion apps/src/lib/kits/maker/PlaygroundComponents.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,6 @@ function initializeAccelerometer(board) {
board,
controller: PlaygroundIO.Accelerometer
});
// TODO (bbuchanan): Push these helpers down into playground-io
accelerometer.start = function () {
accelerometer.io.sysexCommand([CP_COMMAND, CP_ACCEL_STREAM_ON]);
};
Expand Down
1 change: 0 additions & 1 deletion apps/src/lib/kits/maker/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ export function boardConnected() {
* @param {function} opts.callback
*/
export function onBoardEvent(opts) {
// TODO (bbuchanan): Validate arguments?
let {component, event, callback} = opts;
if (BOARD_EVENT_ALIASES[event]) {
event = BOARD_EVENT_ALIASES[event];
Expand Down
3 changes: 0 additions & 3 deletions apps/src/netsim/DashboardUser.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ import $ from 'jquery';
* @property {number} id - Section's numeric identifier in Dashboard.
*/

// TODO (bbuchanan): This whole file should go away when we have a shared
// Javascript User object that can be available on page load.

/**
* Represents a Dashboard user account - could be a teacher, a student, etc.
* @constructor
Expand Down
4 changes: 0 additions & 4 deletions apps/src/netsim/NetSimLobby.js
Original file line number Diff line number Diff line change
Expand Up @@ -579,10 +579,6 @@ NetSimLobby.prototype.buildShardChoiceList_ = function (
* @private
*/
NetSimLobby.prototype.makeShardIDFromSeed_ = function (seed) {
// TODO (bbuchanan) : Hash shard ID, more likely to ensure it's unique
// and fits within 48 characters.
// Maybe grab this MIT-licensed implementation via node?
// https://github.com/blueimp/JavaScript-MD5
return ('ns_' + this.levelKey_ + '_' + seed).substr(0, 48);
};

Expand Down
9 changes: 0 additions & 9 deletions apps/src/netsim/NetSimLocalClientNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@ var MessageGranularity = NetSimConstants.MessageGranularity;
var NetSimLocalClientNode = module.exports = function (shard, clientRow) {
NetSimClientNode.call(this, shard, clientRow);

// TODO (bbuchanan): Consider:
// Do we benefit from inheritance here? Would it be cleaner to make this
// not-an-entity that manipulates a stock NetSimClientNode? Will another
// developer find it easy to understand how this class works?

/**
* Client nodes can be connected to other clients.
* @type {NetSimClientNode}
Expand Down Expand Up @@ -107,8 +102,6 @@ NetSimLocalClientNode.inherits(NetSimClientNode);
* created entity, or null if entity creation failed.
*/
NetSimLocalClientNode.create = function (shard, displayName, onComplete) {
// TODO (bbuchanan): Modify and return the template node instead of
// making two in this method.
var templateNode = new NetSimLocalClientNode(shard);
templateNode.displayName_ = displayName;
templateNode.getTable().create(templateNode.buildRow(), function (err, row) {
Expand Down Expand Up @@ -172,8 +165,6 @@ NetSimLocalClientNode.prototype.stopSimulation = function () {
* @param {!RunLoop.Clock} clock
*/
NetSimLocalClientNode.prototype.tick = function (clock) {
// TODO (bbuchanan): Move the router collection and ticking the
// routers up to netsim.js (or elsewhere)
this.routers_.forEach(function (router) {
router.tick(clock);
});
Expand Down
1 change: 0 additions & 1 deletion apps/src/netsim/netsim.js
Original file line number Diff line number Diff line change
Expand Up @@ -924,7 +924,6 @@ NetSim.prototype.setRouterDataRate_ = function (dataRateBitsPerSecond) {

/**
* Load audio assets for this app
* TODO (bbuchanan): Ought to pull this into an audio management module
* @private
*/
NetSim.prototype.loadAudio_ = function () {
Expand Down
1 change: 0 additions & 1 deletion apps/src/turtle/turtle.js
Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,6 @@ Artist.prototype.afterInject_ = function (config) {
var visualization = document.getElementById('visualization');
visualization.appendChild(this.visualization.displayCanvas);

// TODO (br-pair): - pull this out?
if (this.studioApp_.isUsingBlockly() && this.isFrozenSkin()) {
// Override colour_random to only generate random colors from within our frozen
// palette
Expand Down