bbcmicrobit / bbcmicrobit/PythonEditor

blocks: no warnings when connecting 'incompatible' blocks

未關閉
#40 5 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
JavaScript
星號
201
分支
126
PR 合併指標
30 天內沒有已合併 PR

描述

(This one probably isn't trivial, as I think it's partially a blockly/Python limitation)

One of the things that blocks is quite good at is avoid syntax errors.

However, our current implementation doesn't protect the user from type error as well as it could.

For example, the following code fails as soon as it is run on the micro:bit
![image](https://cloud.githubusercontent.com/assets/147113/23947894/8abfaf0a-0978-11e7-844b-abc617bc3b8b.png)

PXT gives slightly more useful feedback:
![blocks types](https://cloud.githubusercontent.com/assets/147113/23947948/c7bb7ba0-0978-11e7-9f30-014e40112a2d.gif)

Do we have a way of giving more immediate feedback to users about type mismatches? Or even better, perhaps (although it's spooky action at a distance) automatically inserting the required conversion so it 'just works'?

貢獻指南

開啟貢獻指南

研究方向

該 issue 未指出任何檔案、測試或進入點。首先在瀏覽器和 micro:bit 上重現不相容 block 的範例,然後調查 Blockly/Python 目前的型別處理行為。完成的標準是形成一個經過同意的方法,能夠立即提供型別不相符的回饋,或插入安全的轉換。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
javascript, python
領域
embedded-iot, frontend
Issue 類型
功能
難度
5/5
預估耗時
一週以上
活躍度
停滯
描述清晰度
需要釐清
新手友好度
25/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。