blocks: how to handle 'undocked' blocks
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 25/100
- Issue 类型
- 功能
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- javascript
- 领域
- frontend
调研方向
先阅读此 issue 中的讨论,尤其是未停靠块的示例,然后查看 issue #42 和所引用的 PXT issue #849。在开始实现之前,需要先为未停靠块确定一致的行为;此处未定义完成标准。
由索引模型根据 Issue 内容生成。
描述
(this is a complex one that I think needs some discussion - opening this issue as a place for that)
At the moment in blocks, as far as I can see, any block on the canvas will cause code to be generated and likely run. There aren't 'hats' or 'events', not even an 'on start' one.
This can cause a few possible issues.
For one, it's fundamentally different to scratch

In this case, the 'hmm' will never happen.
The difference is not in itself a reason to change, but In the past we've seen kids use 'undocking' blocks as a way to 'comment them out' (IE you build a complex set of blocks and then 'undock' them in order to stop them running. This is one good reason to think about how things work.
(it's also different from PXT, too)
Secondly, it can create some confusing things on canvas if your project has grown and then shrunk again.
For example, someone who knows how to code will easily spot the issue here:

...but for someone who is only focused on the blocks this could be really confusing. This is a slightly artificial example, but I think the problem in general is real, especially given the lack of clear notification that things are not currently visible, etc. (see in part #42 )
Note that PXT removed 'hats' early on in development and decided to add them back. There's a good discussion about that here:
https://github.com/Microsoft/pxt/issues/849
- 主要语言
- JavaScript
- 星标
- 201
- 派生
- 126
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
bbcmicrobit/PythonEditor 的其他 Issue
-
难度 5/5 一周以上 新手友好度 15/100
bbcmicrobit/PythonEditor#406 ·
-
U 未关闭
难度 5/5 一周以上 新手友好度 1/100
bbcmicrobit/PythonEditor#405 ·
-
难度 5/5 一周以上 新手友好度 10/100
bbcmicrobit/PythonEditor#391 · 2 条评论 · 6 个 reaction ·
-
难度 3/5 1-2 天 新手友好度 25/100
bbcmicrobit/PythonEditor#375 ·
-
难度 3/5 1-2 天 新手友好度 35/100
bbcmicrobit/PythonEditor#367 ·
查看 bbcmicrobit/PythonEditor 的全部 Issue
相似的 Issue
-
bug confirmed issue
难度 2/5 1-3 小时 新手友好度 75/100
open-webui/open-webui#30750 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 70/100
-
难度 2/5 1-3 小时 新手友好度 75/100
-
Mend: dependency security vulnerability untriaged
难度 2/5 1-3 小时 新手友好度 70/100