-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Add serialization of mutators #5054
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
BeksOmega
merged 8 commits into
RaspberryPiFoundation:project-cereal
from
BeksOmega:cereal/mutator-serialization
Jul 30, 2021
Merged
Add serialization of mutators #5054
BeksOmega
merged 8 commits into
RaspberryPiFoundation:project-cereal
from
BeksOmega:cereal/mutator-serialization
Jul 30, 2021
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
f3633ff to
21ff2a8
Compare
3 tasks
BeksOmega
commented
Jul 19, 2021
3 tasks
ae80a35 to
9980a25
Compare
Contributor
Author
|
@NeilFraser do you want to grab this one? |
NeilFraser
approved these changes
Jul 30, 2021
core/serialization/blocks.js
Outdated
| * Adds any extra state the block may provide to the given state object. | ||
| * @param {!Blockly.Block} block The block to serialize the extra state of. | ||
| * @param {!State} state The state object to append | ||
| * to. |
Contributor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment can be one line. Same for line 74 whence this was copied.
BeksOmega
added a commit
to BeksOmega/blockly
that referenced
this pull request
Sep 13, 2021
* Add tests for saving extra state * Add serializing extra state * Fix backwards compatibility * Switch to other function declarations * Handle null returns from hooks * Remove backwards compatibility * Remove XML require, and fix type * Fix JSDoc formatting
BeksOmega
added a commit
that referenced
this pull request
Sep 17, 2021
* Add tests for saving extra state * Add serializing extra state * Fix backwards compatibility * Switch to other function declarations * Handle null returns from hooks * Remove backwards compatibility * Remove XML require, and fix type * Fix JSDoc formatting
alschmiedt
pushed a commit
to alschmiedt/blockly
that referenced
this pull request
Sep 20, 2021
* Add tests for saving extra state * Add serializing extra state * Fix backwards compatibility * Switch to other function declarations * Handle null returns from hooks * Remove backwards compatibility * Remove XML require, and fix type * Fix JSDoc formatting
alschmiedt
pushed a commit
that referenced
this pull request
Sep 20, 2021
* Add tests for saving extra state * Add serializing extra state * Fix backwards compatibility * Switch to other function declarations * Handle null returns from hooks * Remove backwards compatibility * Remove XML require, and fix type * Fix JSDoc formatting
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The basics
Link for Diff: BeksOmega/blockly@cereal/block-serialization...BeksOmega:cereal/mutator-serialization
The details
Resolves
Work on project cereal.
Dependent on #5053
Proposed Changes
Adds serialization of mutators on blocks.
Handles backwards compatibility with the XML hooks by converting them to a string before appending them to the JSO.That was removed in favor of investigating upgrading developers' files directly using a script.Does not handle deserialization.
Reason for Changes
Serializing state is good.
Test Coverage
Added tests for the different categories of objects the save function could return. Also added a test for wrapping the
mutationToDomhook.