code-dot-org / blockly

Blockly (Code Studio fork)
https://code-dot-org.github.io/blockly/tests/playground.html
Apache License 2.0
60 stars 26 forks source link

Serialize to <field> and deserialize from <field> #287

Closed ajpal closed 2 years ago

ajpal commented 2 years ago

This change in the fork will facilitate migration to Google Blockly. Google Blockly renamed <title> to <field> in 2013. Currently, we have an override in our Google Blockly wrapper layer to make sure we still serialize XML using <title> tags here Instead, we should change our fork to match Google Blockly's behavior. With this change, Cdo Blockly will serialize XML using <field> tags, and then we can remove the override of fieldToDom_ to that Google Blockly also serializes using <field> tags. Both versions of Blockly will still be able to deserialize XML that uses <title> tags, which is important for backwards compatibility.

Before image

After image Import from XML still works with <title> elements image Import from XML also works with <field> elements image