diff --git a/TODO.md b/TODO.md index aab5ef7..d443be4 100644 --- a/TODO.md +++ b/TODO.md @@ -7,6 +7,8 @@ loose doc to capture some ideas as i work ## Events +Would be good to wrap events in a nice interface, as well. + Blockly events are bad, as written. You can attach listeners to the workspace or to blocks, but they fire on every workspace event and you have to filter out all the ones you don't care about: ```js block.addChangeListener(function({ blockId, type, name, element, newValue, oldValue }) { @@ -26,3 +28,5 @@ listenFor({ block: [aBlock, "block-type", blockFunc(block)] }) ```` + +Then we can do the filtering efficiently, in one spot, with tests, and expose a nice interface, or layers of interfaces (kitchen sink/low-level vs porcelain/higher-order-functions) diff --git a/app/blocks/power_ups/weather_mixin.js b/app/blocks/power_ups/weather_mixin.js index 55093ca..d0c63d7 100644 --- a/app/blocks/power_ups/weather_mixin.js +++ b/app/blocks/power_ups/weather_mixin.js @@ -138,6 +138,7 @@ export default { helpField.setValue(current) }, + // a placeholder for the incoming preview data from live weatherkit requests currentWeatherByLocation: {}, CURRENT_PROPS: [