bbcmicrobit / bbcmicrobit/PythonEditor

blocks: no warnings when connecting 'incompatible' blocks

Aperta
#40 5 commenti 1 reazione 0 assegnatari Vedi su GitHub
Lingua principale
JavaScript
Stelle
201
Fork
126
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

(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'?

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

La issue non indica file, test o punti di ingresso. Inizia riproducendo nel browser e sul micro:bit l'esempio di blocchi incompatibili, quindi analizza il comportamento attuale della gestione dei tipi in Blockly/Python. Il lavoro sarà considerato completato quando sarà stato concordato un approccio che fornisca un feedback immediato sulle incompatibilità di tipo o inserisca conversioni sicure.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
javascript, python
Ambito
embedded-iot, frontend
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.